F Wolff(e)k dio:
On Do, 2008-08-21 at 11:01 +0200, Julen wrote:
On Mon, Aug 18, 2008 at 9:54 AM, Dwayne Bailey <[EMAIL PROTECTED]> wrote:
On Fri, 2008-08-15 at 12:54 +0200, F Wolff wrote:
--- templates/translatepage.html (revision 8053)
+++ templates/translatepage.html (working copy)
@@ -282,8 +282,11 @@
<input name="doassign" type="submit" value="${assigns.submit_text}"/>
</form>
- <div class="side" py:if="defined('checking_text')"
py:content="checking_text">
- checking has-suggestion, etc
+ <div class="side" py:if="defined('checking_text')">
+ <a href="http://translate.sourceforge.net/wiki/toolkit/pofilter_tests" target="_new"
py:content="checking_text">
+ checking has-suggestion, etc
+ </a>
Can we make this use http://.....#chedckname as that will take the
translator directly to the correct check. Not essential but a useful
change.
Yes, it's very useful but we can have different tests running at the
same time, can't we? Since we are formatting a localized string
("checking %s") it doesn't seem to be possible to achieve that in a
straightforward manner. If we put the url in the python script the
tags are not interpreted so we don't get links anymore.
Julen.
The anchors on that page is sorted alphabetically, so we could just go
to the first one, sorted according to English sorting rules. We just
need to pass that information to the template to construct the correct
URL. The only common case where multiple checks are reviewed is part of
"quick translate" - we could simply not make the link clickable in this
case. Either of these alternatives is OK for now, I think.
Check this please. If there's more than one check, the anchor links to
the entire document, otherwise to the concrete check. I've also added
quotes to each check name, as it was marked as TODO.
Julen.
diff --git a/html/images/information.png b/html/images/information.png
new file mode 100644
index
0000000000000000000000000000000000000000..12cd1aef900803abba99b26920337ec01ad5c267
GIT binary patch
literal 778
zcmV+l1NHogP)<h;3K|[EMAIL PROTECTED]
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!oJmAMR5;6}
zlgn$=R~*GZcTB8gOeQf3nTa-!([EMAIL PROTECTED];ZqApx?m2DMV`5y=hK32Z4
zrF5FEg<6`FhR&iJnZ_{H#59l57&FNv{mtC(z4z-vNPM&#J<Bg&J{&mb7**wcRP*K`
[EMAIL PROTECTED];ru8;m+XMPaeMdZ(eoq#g&nawQ{i|p~;@MMjF<x0bn6=
z3>BVme|mWaqy4$_pJm?y9KM{-*hp?1+Ey3e-CEDooTa!B;e(Q>TSF?bj>5At13y1p
[EMAIL PROTECTED]<[EMAIL PROTECTED]@N~g=sW=
zn!9%NQ4BzW>+5LH)Q)[EMAIL PROTECTED](LD$xXlt$7A5CgE@
zpV-&l%vf;[EMAIL PROTECTED]&=cuwt>!vJ^#(&n|LcZyUzi6Duj$$hJ1s*HD-#;k-w@
zpdrwAuoDG_N2bvb07G$Zk*?Hc)JLtW4yqOnic_$zO7NZ#l>Fm){;fE?b$IbOaX2fe
z0la4g0Dfw2xk7Wi7NapVD8YMPCZu?A1QCK*67dgsvRKBLFtrM>?$%&_lD1882mzdO
zWPdw5KWw6IT`m1b_8=lS5jt8D3=RDa=&jWzR-)[EMAIL PROTECTED])-wpXB>rNBQ>N
zU#K`#1B&v|_AQK;7I~B}OdGiUT9LX>f0xm6<;Le<?v8hEtmnbwS!SP?2`;dqv5sw9
zni(%Gaqov;mNB)bas%IF->P!=vFjPsUQF*wCJ*dO)[EMAIL PROTECTED]|q#K
[EMAIL PROTECTED];[EMAIL PROTECTED]&N!V2mjOHw|*<kAZXlKc;ul3#dPWds((2xc~qF07*qo
IM6N<$f<v}uGXMYp
literal 0
HcmV?d00001
diff --git a/html/pootle.css b/html/pootle.css
index 9e9db81..3a817f7 100644
--- a/html/pootle.css
+++ b/html/pootle.css
@@ -550,6 +550,11 @@ div.info {
line-height:150%;
padding:2px;
}
+
+.checkinfo {
+ vertical-align: top;
+}
+
.account
{
}
diff --git a/templates/translatepage.html b/templates/translatepage.html
index 68acc76..4771d49 100644
--- a/templates/translatepage.html
+++ b/templates/translatepage.html
@@ -283,8 +283,9 @@ from Pootle.templates import pootlepage, navbar
<input name="action" value="translate" title="${assigns.action_title}"/>
<input name="doassign" type="submit" value="${assigns.submit_text}"/>
</form>
- <div class="side" py:if="defined('checking_text')"
py:content="checking_text">
- checking has-suggestion, etc
+ <div class="side" py:if="defined('checking_text')">
+ <img src="${baseurl}images/information.png" class="checkinfo" alt="" />
+ <a href="${checking_url}" target="_blank"
py:content="checking_text">checking has-suggestion, etc</a>
</div>
</div>
<div py:replace="pootlepage.user_links(links, session, uidir, uilanguage,
baseurl, show_assigns())"/>
diff --git a/translatepage.py b/translatepage.py
index 2661ae1..f081bad 100644
--- a/translatepage.py
+++ b/translatepage.py
@@ -224,10 +224,13 @@ class TranslatePage(pagelayout.PootleNavPage):
self.templatevars["assigns"] = self.getassignbox()
if self.pofilename is not None:
if self.matchnames:
- checknames = [matchname.replace("check-", "", 1) for matchname in
self.matchnames]
- # TODO: put the following parameter in quotes, since it will be
foreign in all target languages
+ checknames = ["'%s'" % matchname.replace("check-", "", 1) for
matchname in self.matchnames]
# l10n: the parameter is the name of one of the quality checks, like
"fuzzy"
self.templatevars["checking_text"] = self.localize("checking %s", ",
".join(checknames))
+ checking_url =
"http://translate.sourceforge.net/wiki/toolkit/pofilter_tests"
+ if len(checknames) == 1:
+ checking_url = "%s#%s" % (checking_url, checknames[0].replace("'",
""))
+ self.templatevars["checking_url"] = checking_url
def getassignbox(self):
"""gets strings if the user can assign strings"""
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle