Merge lp:~danilo/launchpad/bug-423836-a into lp:~danilo/launchpad/bug-427264

Proposed by Данило Шеган
Status: Merged
Merge reported by: Данило Шеган
Merged at revision: not available
Proposed branch: lp:~danilo/launchpad/bug-423836-a
Merge into: lp:~danilo/launchpad/bug-427264
Diff against target: None lines
To merge this branch: bzr merge lp:~danilo/launchpad/bug-423836-a
Reviewer Review Type Date Requested Status
Michael Nelson (community) code Approve
Данило Шеган Pending
Review via email: mp+11512@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

= Bug 423836: distroserieslanguage page =

(WARNING: Look at the attached diff in MP, not the full diff)

This branch migrates distroserieslanguage page to 3.0 layout. It's
split up from productserieslanguage migration (which reuses the same
template), so lint still has one error which will be fixed by a followup
branch.

It also introduces some global bits like a TranslationsLanguage
breadcrumb, which will be reused in the followup branch (i.e. it's
"global" instead of specific to DSL for a reason).

I also add missing tests for translation group breadcrumbs, which I
introduced earlier.

= Tests =

 bin/test -vvt 'translations.*breadcrumbs' -t stories.translations

(stories/translations/43-distrorelease-translations is the relevant page
test)

= Demo & QA =

 https://translations.launchpad.dev/ubuntu/hoary/+lang/es

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/pagetitles.py
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/translations/configure.zcml
  lib/lp/translations/browser/configure.zcml
  lib/lp/translations/browser/distroserieslanguage.py
  lib/lp/translations/browser/translations.py
  lib/lp/translations/browser/tests/test_breadcrumbs.py
  lib/lp/translations/doc/canonical_url_examples.txt
  lib/lp/translations/model/distroserieslanguage.py
  lib/lp/translations/stories/standalone/xx-test-potlists.txt

lib/lp/translations/stories/translations/43-distrorelease-translations.txt
  lib/lp/translations/templates/serieslanguage-index.pt

== Pyflakes notices ==

lib/lp/translations/browser/tests/test_breadcrumbs.py
    16: 'IProductSeriesLanguageSet' imported but unused

== Pylint notices ==

lib/lp/translations/browser/tests/test_breadcrumbs.py
    16: [W0611] Unused import IProductSeriesLanguageSet

Revision history for this message
Michael Nelson (michael.nelson) wrote :
Download full text (16.3 KiB)

Wow - a huge amount of work has gone into this Danilo!

I've mainly got a few questions below, but there was one thing that needs fixing - a CSS rule that I think you meant to apply just to your table, but applies globally to all th's.

Phew! I'm glad you managed to split them up now - I don't think I could sensibly do another review today :)

Cheers,
-Michael

> === modified file 'lib/canonical/launchpad/icing/style-3-0.css'
> --- lib/canonical/launchpad/icing/style-3-0.css 2009-09-05 03:17:24 +0000
> +++ lib/canonical/launchpad/icing/style-3-0.css 2009-09-09 18:52:48 +0000
> @@ -748,6 +748,38 @@
> padding: 2px 1em 2px 2px;
> }
>
> +/* Translations statistics and legend.
> + *
> + * Examples:
> + * https://translations.launchpad.dev/ubuntu/hoary/+lang/es
> + * https://translations.launchpad.dev/evolution/trunk/+lang/es
> + */

Great to see examples in there as recommended the other week!

> +
> +div.translations-legend {
> + padding-top: 2em;
> + padding-bottom: 1em;
> +}

Note: although we didn't get to it in the reviewers meeting on 09/09/09,
I saw that barry had an agenda item:

* 4-space indents for CSS styles [barry]

Also, if that table can get large, and you want to do easy
alternate-row-shading, I just found the other day that you can do things like:

tbody.translation-stats tr:nth-child(odd) {...}

which works in FF3.5, webkit/chromium etc., without having to add markup.
See http://dev.opera.com/articles/view/zebra-striping-tables-with-css3/
if you're interested.

This CSS could possibly be much simpler if you put
the 'translation-stats' class on the table element (instead of on the
tbody). Then you could remove the overall-translation-stats class and do:

> +tbody.translation-stats td {

table.translation-stats td {...

(that way you don't need a separate rule for the tfoot below.)

> + text-align:center;
> +}
> +tbody.translation-stats td.template-name {

table.translation-stats td.template-name {...

(no difference there).

> + text-align:left;
> +}
> +tfoot tr.overall-translation-stats td, th {

Yikes - careful there. This actually reads currently as:

"Apply the following styles to any td's inside a tr...etc., or *any* th."

So, for example, you can see this is being applied to th's at:

https://launchpad.dev/builders

Anyway, if you updated the class as suggested above, you could write it
as:
table.translation-stats tfoot td, table.translation-stats tfoot th {...

> + background-color: #f7f7f7;
> + border: 0px;
> + border-top: 2px solid #d2d2d2;
> + border-bottom: 2px solid #d2d2d2;
> + padding-top: 5px;
> + padding-bottom: 5px;
> + font-weight: bold;
> +}
> +tfoot tr.overall-translation-stats th {

table.translation-stats tfoot th { ...

> + text-align:left;
> +}
> +tfoot tr.overall-translation-stats td {

table.translation-stats tfoot td { ...

> + text-align:center;
> +}
> table.narrow-listing {
> width: 45em;
> }
>

[snip]
> === modified file 'lib/lp/translations/browser/distroserieslanguage.py'
> --- lib/lp/translations/browser/distroserieslanguage.py 2009-07-17 00:26:05 +0000
> +++ lib/lp/translations/browser/distroserieslanguage.py 2009-09-10 09:45:00 +0000
> @@ -5,17 +5,26 @@
>
> __meta...

review: Needs Fixing (code)
Revision history for this message
Данило Шеган (danilo) wrote :
Download full text (9.8 KiB)

Hi Michael,

Thanks a lot for the review. Comments inline.

У чет, 10. 09 2009. у 14:44 +0000, Michael Nelson пише:

> I've mainly got a few questions below, but there was one thing that
> needs fixing - a CSS rule that I think you meant to apply just to your
> table, but applies globally to all th's.

Indeed, this is something I forgot to fix up from the 'prototyping'
phase.

> > === modified file 'lib/canonical/launchpad/icing/style-3-0.css'
> > --- lib/canonical/launchpad/icing/style-3-0.css 2009-09-05 03:17:24 +0000
> > +++ lib/canonical/launchpad/icing/style-3-0.css 2009-09-09 18:52:48 +0000
...
> > +
> > +div.translations-legend {
> > + padding-top: 2em;
> > + padding-bottom: 1em;
> > +}
>
> Note: although we didn't get to it in the reviewers meeting on 09/09/09,
> I saw that barry had an agenda item:
>
> * 4-space indents for CSS styles [barry]

Fixed.

> Also, if that table can get large, and you want to do easy
> alternate-row-shading, I just found the other day that you can do things like:
>
> tbody.translation-stats tr:nth-child(odd) {...}

Oh, I know about that CSS3 feature. However, considering my main
browser is Epiphany which still uses xulrunner 1.9 (I believe shared
with Firefox 2 or 3), I am not personally interested :)

Just kidding, I am not going to change styles on existing table too
much, if at all. I am trying to make this mostly mechanical.

> This CSS could possibly be much simpler if you put
> the 'translation-stats' class on the table element (instead of on the
> tbody). Then you could remove the overall-translation-stats class and do:

That's actually what I started with. However, fighting legacy CSS code
is hell. 'table.listing tbody td' takes precedence over
'table.translation-stats tbody td'. I am not yet ready to do away with
class='listing' on these tables, though, simply because I am not trying
to solve all the problems with these pages. It's mostly mechanical
changes, and no real redesign.

> > +tbody.translation-stats td {
>
> table.translation-stats td {...
>
> (that way you don't need a separate rule for the tfoot below.)

Actually, the 'cascading' of CSS seems to cause me problems in at least
Epiphany (xulrunner 1.9): if I set the rule up like that (that's what I
started with), it doesn't get picked up. I'll play a bit more with CSS
and will follow up.

It's good to know that even CSS precedence rules differ between
browsers. :(

> > +tfoot tr.overall-translation-stats td, th {
>
> Yikes - careful there. This actually reads currently as:
>
> "Apply the following styles to any td's inside a tr...etc., or *any* th."
>
> So, for example, you can see this is being applied to th's at:
>
> https://launchpad.dev/builders

Right, fixed.

> > === modified file 'lib/lp/translations/browser/distroserieslanguage.py'
...
> >
> > + @property
> > + def page_title(self):
> > + return self.context.title
> > +
>
> Just note that you will probably need to remove this soon - when barry's
> branch lands that calculates the <title> automatically. It should only
> be overridden here in special cases (yes, this changed... see the points
> under "Here are the specific coding recommendations fo...

=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-09-09 18:52:48 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-09-11 06:26:18 +0000
@@ -695,32 +695,32 @@
695/* ==== Translations hand-made forms ==== */695/* ==== Translations hand-made forms ==== */
696696
697form.translations div.fields {697form.translations div.fields {
698 padding: 1em;698 padding: 1em;
699}699}
700700
701form.translations div.actions {701form.translations div.actions {
702 padding: 1em;702 padding: 1em;
703 text-align: right;703 text-align: right;
704 clear:both;704 clear:both;
705}705}
706706
707form.translations input {707form.translations input {
708 padding-left: 0.5em;708 padding-left: 0.5em;
709 padding-right: 0.5em;709 padding-right: 0.5em;
710}710}
711711
712form.translations select {712form.translations select {
713 margin-left: 0.5em;713 margin-left: 0.5em;
714 padding-right: 0.5em;714 padding-right: 0.5em;
715}715}
716716
717form.translations label {717form.translations label {
718 padding-left: 0.5em;718 padding-left: 0.5em;
719 padding-right: 1em;719 padding-right: 1em;
720}720}
721721
722form.translations .listbox label {722form.translations .listbox label {
723 padding: 2px 1em 2px 2px;723 padding: 2px 1em 2px 2px;
724}724}
725725
726/* Provide top-alignment for radio boxes and longer explanations726/* Provide top-alignment for radio boxes and longer explanations
@@ -731,21 +731,21 @@
731 * https://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/+export731 * https://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/+export
732 */732 */
733form.translations div.alignment .content {733form.translations div.alignment .content {
734 float:left;734 float:left;
735}735}
736form.translations div.alignment .selector {736form.translations div.alignment .selector {
737 margin-right: 0.5em;737 margin-right: 0.5em;
738 float: left;738 float: left;
739 clear: both;739 clear: both;
740}740}
741form.translations div.alignment .content label {741form.translations div.alignment .content label {
742 padding: 0px;742 padding: 0px;
743 margin: 0px;743 margin: 0px;
744 font-weight: bold;744 font-weight: bold;
745}745}
746form.translations div.alignment .secondary label {746form.translations div.alignment .secondary label {
747 font-weight: normal;747 font-weight: normal;
748 padding: 2px 1em 2px 2px;748 padding: 2px 1em 2px 2px;
749}749}
750750
751/* Translations statistics and legend.751/* Translations statistics and legend.
@@ -756,30 +756,31 @@
756 */756 */
757757
758div.translations-legend {758div.translations-legend {
759 padding-top: 2em;759 padding-top: 2em;
760 padding-bottom: 1em;760 padding-bottom: 1em;
761}761}
762tbody.translation-stats td {762tbody.translation-stats td {
763 text-align:center;763 text-align:center;
764}764}
765tbody.translation-stats td.template-name {765tbody.translation-stats td.template-name {
766 text-align:left;766 text-align:left;
767}767}
768tfoot tr.overall-translation-stats td, th {768tfoot tr.overall-translation-stats td,
769 background-color: #f7f7f7;769tfoot tr.overall-translation-stats th {
770 border: 0px;770 background-color: #f7f7f7;
771 border-top: 2px solid #d2d2d2;771 border: 0px;
772 border-bottom: 2px solid #d2d2d2;772 border-top: 2px solid #d2d2d2;
773 padding-top: 5px;773 border-bottom: 2px solid #d2d2d2;
774 padding-bottom: 5px;774 padding-top: 5px;
775 font-weight: bold;775 padding-bottom: 5px;
776}776 font-weight: bold;
777tfoot tr.overall-translation-stats th {777}
778 text-align:left;778tfoot tr.overall-translation-stats th {
779 text-align:left;
779}780}
780tfoot tr.overall-translation-stats td {781tfoot tr.overall-translation-stats td {
781 text-align:center;782 text-align:center;
782}783}
783table.narrow-listing {784table.narrow-listing {
784 width: 45em;785 width: 45em;
785}786}
786787
=== added file 'lib/lp/translations/browser/tests/test_distroserieslanguage_views.py'
--- lib/lp/translations/browser/tests/test_distroserieslanguage_views.py 1970-01-01 00:00:00 +0000
+++ lib/lp/translations/browser/tests/test_distroserieslanguage_views.py 2009-09-11 06:42:33 +0000
@@ -0,0 +1,72 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).
3
4__metaclass__ = type
5
6import transaction
7import unittest
8
9from zope.component import getUtility
10
11from lp.translations.browser.distroserieslanguage import (
12 DistroSeriesLanguageView)
13from lp.translations.interfaces.translator import ITranslatorSet
14from canonical.launchpad.webapp.servers import LaunchpadTestRequest
15from canonical.testing import LaunchpadZopelessLayer
16from lp.translations.browser.distroseries import DistroSeriesView
17from lp.services.worlddata.interfaces.language import ILanguageSet
18from lp.testing import TestCaseWithFactory, login_person
19
20
21class TestDistroSeriesLanguage(TestCaseWithFactory):
22 """Test DistroSeriesLanguage view."""
23
24 layer = LaunchpadZopelessLayer
25
26 def setUp(self):
27 # Create a distroseries that uses translations.
28 TestCaseWithFactory.setUp(self)
29 self.distroseries = self.factory.makeDistroRelease()
30 self.distroseries.distribution.official_rosetta = True
31 self.language = getUtility(ILanguageSet).getLanguageByCode('sr')
32 sourcepackagename = self.factory.makeSourcePackageName()
33 potemplate = self.factory.makePOTemplate(
34 distroseries=self.distroseries,
35 sourcepackagename=sourcepackagename)
36 pofile = self.factory.makePOFile('sr', potemplate)
37 self.distroseries.updateStatistics(transaction)
38 self.dsl = self.distroseries.distroserieslanguages[0]
39 self.view = DistroSeriesLanguageView(
40 self.dsl, LaunchpadTestRequest())
41
42 def test_empty_view(self):
43 self.assertEquals(self.view.translation_group, None)
44 self.assertEquals(self.view.translation_team, None)
45 self.assertEquals(self.view.context, self.dsl)
46
47 def test_translation_group(self):
48 group = self.factory.makeTranslationGroup(
49 self.distroseries.distribution.owner, url=None)
50 self.distroseries.distribution.translationgroup = group
51 self.assertEquals(self.view.translation_group, group)
52
53 def test_translation_team(self):
54 # Just having a group doesn't mean there's a translation
55 # team as well.
56 group = self.factory.makeTranslationGroup(
57 self.distroseries.distribution.owner, url=None)
58 self.distroseries.distribution.translationgroup = group
59 self.assertEquals(self.view.translation_team, None)
60
61 # Setting a translator for this languages makes it
62 # appear as the translation_team.
63 team = self.factory.makeTeam()
64 translator = getUtility(ITranslatorSet).new(
65 group, self.language, team)
66 # Recreate the view because we are using a cached property.
67 self.view = DistroSeriesLanguageView(
68 self.dsl, LaunchpadTestRequest())
69 self.assertEquals(self.view.translation_team, translator)
70
71def test_suite():
72 return unittest.TestLoader().loadTestsFromName(__name__)
073
=== modified file 'lib/lp/translations/doc/distroseries-language.txt'
--- lib/lp/translations/doc/distroseries-language.txt 2009-07-14 12:37:42 +0000
+++ lib/lp/translations/doc/distroseries-language.txt 2009-09-11 06:46:22 +0000
@@ -19,6 +19,11 @@
19 >>> spanish = getUtility(ILanguageSet)['es']19 >>> spanish = getUtility(ILanguageSet)['es']
20 >>> hoary_spanish = hoary.getDistroSeriesLanguage(spanish)20 >>> hoary_spanish = hoary.getDistroSeriesLanguage(spanish)
2121
22DistroSeriesLanguage provides basic `title` describing what is it about.
23
24 >>> hoary_spanish.title
25 Spanish translations of Ubuntu Hoary
26
22In DistroSeriesLanguage.pofiles we find real POFiles for the given27In DistroSeriesLanguage.pofiles we find real POFiles for the given
23DistroSeries in the given language. That is, translations that actually28DistroSeries in the given language. That is, translations that actually
24contain messages.29contain messages.
2530
=== modified file 'lib/lp/translations/model/distroserieslanguage.py'
--- lib/lp/translations/model/distroserieslanguage.py 2009-09-09 11:57:25 +0000
+++ lib/lp/translations/model/distroserieslanguage.py 2009-09-11 06:45:34 +0000
@@ -58,10 +58,6 @@
58 self.distroseries.displayname)58 self.distroseries.displayname)
5959
60 @property60 @property
61 def text(self):
62 return self.language.englishname
63
64 @property
65 def pofiles(self):61 def pofiles(self):
66 return POFile.select('''62 return POFile.select('''
67 POFile.language = %s AND63 POFile.language = %s AND
6864
Revision history for this message
Michael Nelson (michael.nelson) wrote :
Download full text (10.0 KiB)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Данило Шеган wrote:
> Hi Michael,
>
> Thanks a lot for the review. Comments inline.
>

Thanks for the changes! r=me - some comments below.

Cheers,
Michael.

>
>> This CSS could possibly be much simpler if you put
>> the 'translation-stats' class on the table element (instead of on the
>> tbody). Then you could remove the overall-translation-stats class and do:
>
> That's actually what I started with. However, fighting legacy CSS code
> is hell. 'table.listing tbody td' takes precedence over
> 'table.translation-stats tbody td'. I am not yet ready to do away with
> class='listing' on these tables, though, simply because I am not trying
> to solve all the problems with these pages. It's mostly mechanical
> changes, and no real redesign.

OK. It's up to you, but I'm guessing:

table.listing.translation-stats tbody td {...}

would take precedence (ie. selecting both classes - as it's more
specific). I'm not fussed either way - what you've got works, and it's
not a huge improvement to remove one class.

>
>>> +tbody.translation-stats td {
>> table.translation-stats td {...
>>
>> (that way you don't need a separate rule for the tfoot below.)
>
> Actually, the 'cascading' of CSS seems to cause me problems in at least
> Epiphany (xulrunner 1.9): if I set the rule up like that (that's what I
> started with), it doesn't get picked up. I'll play a bit more with CSS
> and will follow up.
>
> It's good to know that even CSS precedence rules differ between
> browsers. :(

Really? That is very strange. Try the more specific one I mentioned
above - selecting both classes - I'd be interested to know why it was
been over-ruled... is there something like firebug for epiphany?

>
>>> +tfoot tr.overall-translation-stats td, th {
>> Yikes - careful there. This actually reads currently as:
>>
>> "Apply the following styles to any td's inside a tr...etc., or *any* th."
>>
>> So, for example, you can see this is being applied to th's at:
>>
>> https://launchpad.dev/builders
>
> Right, fixed.

Great.

>
>>> === modified file 'lib/lp/translations/browser/distroserieslanguage.py'
> ...
>>>
>>> + @property
>>> + def page_title(self):
>>> + return self.context.title
>>> +
>> Just note that you will probably need to remove this soon - when barry's
>> branch lands that calculates the <title> automatically. It should only
>> be overridden here in special cases (yes, this changed... see the points
>> under "Here are the specific coding recommendations for your templates"
>> at: https://dev.launchpad.net/VersionThreeDotO/UI/Conversion#Heading%20rules
>
> At the moment, I either can't remove it from pagetitles.py or I have to
> define it like this. And yes, I am completely aware of the work Barry's
> doing, and I am completely aware that I'll have to go through all the
> translations pages to make sure that breadcrumbs, page titles, h2's and
> h1's make sense on them. And that's exactly what I was planning to do
> anyway.

Well *sorrrry* - I'd forgotten it was you helping barry with the rules -
 in previous reviews people haven't been aware. Next time I'll just keep
my mouth shut ;)

>
>>> @@ -25...

Revision history for this message
Michael Nelson (michael.nelson) :
review: Approve (code)
Revision history for this message
Данило Шеган (danilo) wrote :
Download full text (3.5 KiB)

У пет, 11. 09 2009. у 07:18 +0000, Michael Nelson пише:

> >> This CSS could possibly be much simpler if you put
> >> the 'translation-stats' class on the table element (instead of on the
> >> tbody). Then you could remove the overall-translation-stats class and do:
> >
> > That's actually what I started with. However, fighting legacy CSS code
> > is hell. 'table.listing tbody td' takes precedence over
> > 'table.translation-stats tbody td'. I am not yet ready to do away with
> > class='listing' on these tables, though, simply because I am not trying
> > to solve all the problems with these pages. It's mostly mechanical
> > changes, and no real redesign.
>
> OK. It's up to you, but I'm guessing:
>
> table.listing.translation-stats tbody td {...}

> would take precedence (ie. selecting both classes - as it's more
> specific). I'm not fussed either way - what you've got works, and it's
> not a huge improvement to remove one class.

Actually, it seems the problem was the 'tr' I had in when I tried this.
It "suddenly" just works.

Btw, I wouldn't think of combining classes like this, so thanks for the
pointer: I am sure it'll be useful in the future, but the simpler stuff
works here :)

> >>> +tbody.translation-stats td {
> >> table.translation-stats td {...
> >>
> >> (that way you don't need a separate rule for the tfoot below.)
> >
> > Actually, the 'cascading' of CSS seems to cause me problems in at least
> > Epiphany (xulrunner 1.9): if I set the rule up like that (that's what I
> > started with), it doesn't get picked up. I'll play a bit more with CSS
> > and will follow up.
> >
> > It's good to know that even CSS precedence rules differ between
> > browsers. :(
>
> Really? That is very strange. Try the more specific one I mentioned
> above - selecting both classes - I'd be interested to know why it was
> been over-ruled... is there something like firebug for epiphany?

Oh, it seems they don't differ: I was using a CSS rule with 'tr' in it
as well, and that probably caused problems. With that removed, it works
in Epiphany as well.

Also, I was under the impression that you tried this out in Firefox 3.5:
I did try this out in whatever-firefox-is-in-jaunty with firebug (which
is how I've seen that it doesn't really work properly). There is not
yet anything like firebug for epiphany, so in hard cases, I resort to
firefox :)

> Well *sorrrry* - I'd forgotten it was you helping barry with the rules -
> in previous reviews people haven't been aware. Next time I'll just keep
> my mouth shut ;)

Not at all! I think you should keep mentioning it: it's important that
everybody is aware of it.

> > Perhaps it'd make some sense for me to provide Navigation class for
> > ITranslationGroupSet, just so it's more consistent and so no confusion
> > arises in the future. Or perhaps just comment that this doesn't show up
> > in the request.traversed_objects because it doesn't provide Navigation
> > class.
> >
> > What do you think?
>
> I think a comment would be fine - it would have cleared up my confusion.

Done.

> No problem - I hope you didn't feel patronized by me pointing out things
> that were already obvious to you.

Don't worry at a...

Read more...

=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-09-11 06:57:21 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-09-11 08:20:21 +0000
@@ -685,6 +685,9 @@ table.listing thead {
685table.listing th {685table.listing th {
686 font-weight: bold;686 font-weight: bold;
687}687}
688table.narrow-listing {
689 width: 45em;
690}
688691
689ul.language, li.language {692ul.language, li.language {
690 list-style-image: url(/@@/language);693 list-style-image: url(/@@/language);
@@ -759,14 +762,14 @@ div.translations-legend {
759 padding-top: 2em;762 padding-top: 2em;
760 padding-bottom: 1em;763 padding-bottom: 1em;
761}764}
762tbody.translation-stats td {765table.translation-stats td {
763 text-align:center;766 text-align:center;
764}767}
765tbody.translation-stats td.template-name {768table.translation-stats td.template-name {
766 text-align:left;769 text-align:left;
767}770}
768tfoot tr.overall-translation-stats td,771table.translation-stats tfoot td,
769tfoot tr.overall-translation-stats th {772table.translation-stats tfoot th {
770 background-color: #f7f7f7;773 background-color: #f7f7f7;
771 border: 0px;774 border: 0px;
772 border-top: 2px solid #d2d2d2;775 border-top: 2px solid #d2d2d2;
@@ -775,12 +778,9 @@ tfoot tr.overall-translation-stats th {
775 padding-bottom: 5px;778 padding-bottom: 5px;
776 font-weight: bold;779 font-weight: bold;
777}780}
778tfoot tr.overall-translation-stats th {781table.translation-stats tfoot th {
779 text-align:left;782 text-align:left;
780}783}
781tfoot tr.overall-translation-stats td {784table.translation-stats tfoot td {
782 text-align:center;785 text-align:center;
783}786}
784table.narrow-listing {
785 width: 45em;
786}
787787
=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
--- lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-10 10:27:20 +0000
+++ lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-11 08:20:13 +0000
@@ -104,6 +104,9 @@ class TestTranslationGroupsBreadcrumbs(B
104 group_set = getUtility(ITranslationGroupSet)104 group_set = getUtility(ITranslationGroupSet)
105 url = canonical_url(group_set, rootsite='translations')105 url = canonical_url(group_set, rootsite='translations')
106 # Translation group listing is top-level, so no breadcrumbs show up.106 # Translation group listing is top-level, so no breadcrumbs show up.
107 # Note that the first parameter is an empty list because
108 # ITranslationGroupSet doesn't register Navigation class, and
109 # thus doesn't show up in request.traversed_objects.
107 self._testContextBreadcrumbs(110 self._testContextBreadcrumbs(
108 [], [], [],111 [], [], [],
109 url=url)112 url=url)
110113
=== modified file 'lib/lp/translations/templates/serieslanguage-index.pt'
--- lib/lp/translations/templates/serieslanguage-index.pt 2009-09-09 18:52:48 +0000
+++ lib/lp/translations/templates/serieslanguage-index.pt 2009-09-11 08:20:21 +0000
@@ -51,7 +51,7 @@
51 <div style="max-width:840px;">51 <div style="max-width:840px;">
52 <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />52 <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />
5353
54 <table class="listing sortable" id="translationstatuses">54 <table class="listing sortable translation-stats">
55 <thead>55 <thead>
56 <tr>56 <tr>
57 <th>Template Name</th>57 <th>Template Name</th>
@@ -64,7 +64,7 @@
64 <th>By</th>64 <th>By</th>
65 </tr>65 </tr>
66 </thead>66 </thead>
67 <tbody class="translation-stats">67 <tbody>
68 <tr tal:repeat="entry view/pofiles"68 <tr tal:repeat="entry view/pofiles"
69 tal:attributes="id string:${entry/potemplate/name}">69 tal:attributes="id string:${entry/potemplate/name}">
70 <td class="template-name">70 <td class="template-name">
@@ -159,7 +159,7 @@
159 </td>159 </td>
160 </tr>160 </tr>
161 <tfoot>161 <tfoot>
162 <tr class="overall-translation-stats">162 <tr>
163 <th>Overall statistics:</th>163 <th>Overall statistics:</th>
164 <td><span tal:replace="context/messageCount">N</span></td>164 <td><span tal:replace="context/messageCount">N</span></td>
165 <td>165 <td>
166166

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-09-05 03:17:24 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-09-09 18:52:48 +0000
@@ -748,6 +748,38 @@
748 padding: 2px 1em 2px 2px;748 padding: 2px 1em 2px 2px;
749}749}
750750
751/* Translations statistics and legend.
752 *
753 * Examples:
754 * https://translations.launchpad.dev/ubuntu/hoary/+lang/es
755 * https://translations.launchpad.dev/evolution/trunk/+lang/es
756 */
757
758div.translations-legend {
759 padding-top: 2em;
760 padding-bottom: 1em;
761}
762tbody.translation-stats td {
763 text-align:center;
764}
765tbody.translation-stats td.template-name {
766 text-align:left;
767}
768tfoot tr.overall-translation-stats td, th {
769 background-color: #f7f7f7;
770 border: 0px;
771 border-top: 2px solid #d2d2d2;
772 border-bottom: 2px solid #d2d2d2;
773 padding-top: 5px;
774 padding-bottom: 5px;
775 font-weight: bold;
776}
777tfoot tr.overall-translation-stats th {
778 text-align:left;
779}
780tfoot tr.overall-translation-stats td {
781 text-align:center;
782}
751table.narrow-listing {783table.narrow-listing {
752 width: 45em;784 width: 45em;
753}785}
754786
=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-09-10 01:35:03 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-09-10 10:27:20 +0000
@@ -399,8 +399,6 @@
399399
400distroseries_queue = ContextTitle('Queue for %s')400distroseries_queue = ContextTitle('Queue for %s')
401401
402distroserieslanguage_index = ContextTitle('%s')
403
404distroseriessourcepackagerelease_index = ContextTitle('%s')402distroseriessourcepackagerelease_index = ContextTitle('%s')
405403
406errorservice_config = 'Configure error log'404errorservice_config = 'Configure error log'
407405
=== modified file 'lib/lp/translations/browser/configure.zcml'
--- lib/lp/translations/browser/configure.zcml 2009-09-01 11:09:53 +0000
+++ lib/lp/translations/browser/configure.zcml 2009-09-10 10:27:20 +0000
@@ -35,12 +35,9 @@
35 <browser:page35 <browser:page
36 name="+products-with-translations"36 name="+products-with-translations"
37 template="../templates/rosetta-products.pt"/>37 template="../templates/rosetta-products.pt"/>
38 38
39 <!-- portlets -->39 <!-- portlets -->
40 40
41 <browser:page
42 name="+portlet-stats"
43 template="../templates/rosetta-portlet-stats.pt"/>
44 <browser:page41 <browser:page
45 name="+portlet-groups"42 name="+portlet-groups"
46 template="../templates/rosetta-portlet-groups.pt"/>43 template="../templates/rosetta-portlet-groups.pt"/>
@@ -155,19 +152,22 @@
155 <browser:url152 <browser:url
156 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"153 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
157 path_expression="string:+lang/${language/code}"154 path_expression="string:+lang/${language/code}"
158 attribute_to_parent="distroseries"/>155 attribute_to_parent="distroseries"
156 rootsite="translations"/>
157 <browser:navigation
158 module="lp.translations.browser.distroserieslanguage"
159 classes="
160 DistroSeriesLanguageNavigation"/>
159 <browser:defaultView161 <browser:defaultView
160 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"162 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
161 name="+index"/>163 name="+index"
164 layer="canonical.launchpad.layers.TranslationsLayer"/>
162 <browser:pages165 <browser:pages
163 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"166 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
164 permission="zope.Public"167 permission="zope.Public"
165 facet="translations"168 facet="translations"
166 layer="canonical.launchpad.layers.TranslationsLayer">169 layer="canonical.launchpad.layers.TranslationsLayer">
167 <browser:page170 <browser:page
168 name="+portlet-stats"
169 template="../templates/distroserieslanguage-portlet-stats.pt"/>
170 <browser:page
171 name="+rosetta-status-legend"171 name="+rosetta-status-legend"
172 template="../templates/rosetta-status-legend.pt"/>172 template="../templates/rosetta-status-legend.pt"/>
173 </browser:pages>173 </browser:pages>
@@ -175,7 +175,7 @@
175 name="+index"175 name="+index"
176 permission="zope.Public"176 permission="zope.Public"
177 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"177 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
178 template="../templates/distroserieslanguage-index.pt"178 template="../templates/serieslanguage-index.pt"
179 class="lp.translations.browser.distroserieslanguage.DistroSeriesLanguageView"179 class="lp.translations.browser.distroserieslanguage.DistroSeriesLanguageView"
180 facet="translations"180 facet="translations"
181 layer="canonical.launchpad.layers.TranslationsLayer"/>181 layer="canonical.launchpad.layers.TranslationsLayer"/>
@@ -906,9 +906,6 @@
906 <browser:page906 <browser:page
907 name="+langchart"907 name="+langchart"
908 template="../templates/distroseries-langchart.pt"/>908 template="../templates/distroseries-langchart.pt"/>
909 <browser:page
910 name="+potlist"
911 template="../templates/object-pots.pt"/>
912 </browser:pages>909 </browser:pages>
913 <browser:page910 <browser:page
914 for="lp.registry.interfaces.distroseries.IDistroSeries"911 for="lp.registry.interfaces.distroseries.IDistroSeries"
915912
=== modified file 'lib/lp/translations/browser/distroserieslanguage.py'
--- lib/lp/translations/browser/distroserieslanguage.py 2009-07-17 00:26:05 +0000
+++ lib/lp/translations/browser/distroserieslanguage.py 2009-09-10 09:45:00 +0000
@@ -5,17 +5,26 @@
55
6__metaclass__ = type6__metaclass__ = type
77
8__all__ = ['DistroSeriesLanguageView']8__all__ = [
9 'DistroSeriesLanguageNavigation',
10 'DistroSeriesLanguageView',
11 ]
912
10from canonical.launchpad.webapp import LaunchpadView13from canonical.launchpad.webapp import LaunchpadView
11from canonical.launchpad.webapp.batching import BatchNavigator14from canonical.launchpad.webapp.batching import BatchNavigator
1215from canonical.launchpad.webapp.publisher import Navigation
16from lp.translations.interfaces.distroserieslanguage import (
17 IDistroSeriesLanguage)
1318
14class DistroSeriesLanguageView(LaunchpadView):19class DistroSeriesLanguageView(LaunchpadView):
15 """View class to render translation status for an `IDistroSeries`."""20 """View class to render translation status for an `IDistroSeries`."""
1621
17 pofiles = None22 pofiles = None
1823
24 @property
25 def page_title(self):
26 return self.context.title
27
19 def initialize(self):28 def initialize(self):
20 self.form = self.request.form29 self.form = self.request.form
2130
@@ -25,3 +34,23 @@
2534
26 self.pofiles = self.context.getPOFilesFor(35 self.pofiles = self.context.getPOFilesFor(
27 self.batchnav.currentBatch())36 self.batchnav.currentBatch())
37 self.parent = self.context.distroseries.distribution
38
39 @property
40 def translation_group(self):
41 return self.context.distroseries.distribution.translationgroup
42
43 @property
44 def translation_team(self):
45 """Is there a translation team for this translation."""
46 if self.translation_group is not None:
47 team = self.translation_group.query_translator(
48 self.context.language)
49 else:
50 team = None
51 return team
52
53
54class DistroSeriesLanguageNavigation(Navigation):
55 """Navigation for `IDistroSeriesLanguage`."""
56 usedfor = IDistroSeriesLanguage
2857
=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
--- lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-10 09:58:30 +0000
+++ lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-10 10:27:20 +0000
@@ -98,6 +98,46 @@
98 ["Crumb Tester", "Translations"])98 ["Crumb Tester", "Translations"])
9999
100100
101class TestTranslationGroupsBreadcrumbs(BaseTranslationsBreadcrumbTestCase):
102
103 def test_translationgroupset(self):
104 group_set = getUtility(ITranslationGroupSet)
105 url = canonical_url(group_set, rootsite='translations')
106 # Translation group listing is top-level, so no breadcrumbs show up.
107 self._testContextBreadcrumbs(
108 [], [], [],
109 url=url)
110
111 def test_translationgroup(self):
112 group_set = getUtility(ITranslationGroupSet)
113 group = self.factory.makeTranslationGroup(
114 name='test-translators', title='Test translators')
115 self._testContextBreadcrumbs(
116 [group_set, group],
117 ["http://translations.launchpad.dev/+groups",
118 "http://translations.launchpad.dev/+groups/test-translators"],
119 ["Translation groups", "Test translators"])
120
121
122class TestSeriesLanguageBreadcrumbs(BaseTranslationsBreadcrumbTestCase):
123 def setUp(self):
124 super(TestSeriesLanguageBreadcrumbs, self).setUp()
125 self.language = getUtility(ILanguageSet)['sr']
126
127 def test_distroserieslanguage(self):
128 distribution = self.factory.makeDistribution(
129 name='crumb-tester', displayname="Crumb Tester")
130 series = self.factory.makeDistroRelease(
131 name="test", version="1.0", distribution=distribution)
132 serieslanguage = getUtility(IDistroSeriesLanguageSet).getDummy(
133 series, self.language)
134 self._testContextBreadcrumbs(
135 [distribution, series, serieslanguage],
136 ["http://launchpad.dev/crumb-tester",
137 "http://launchpad.dev/crumb-tester/test",
138 "http://translations.launchpad.dev/crumb-tester/test",
139 "http://translations.launchpad.dev/crumb-tester/test/+lang/sr"],
140 ["Crumb Tester", "1.0", "Translations", "Serbian (sr)"])
101141
102142
103def test_suite():143def test_suite():
104144
=== modified file 'lib/lp/translations/browser/translations.py'
--- lib/lp/translations/browser/translations.py 2009-09-10 09:58:30 +0000
+++ lib/lp/translations/browser/translations.py 2009-09-10 10:27:20 +0000
@@ -9,6 +9,7 @@
9 'RosettaStatsView',9 'RosettaStatsView',
10 'RosettaApplicationNavigation',10 'RosettaApplicationNavigation',
11 'TranslateRedirectView',11 'TranslateRedirectView',
12 'TranslationsLanguageBreadcrumb',
12 'TranslationsMixin',13 'TranslationsMixin',
13 'TranslationsRedirectView',14 'TranslationsRedirectView',
14 'TranslationsVHostBreadcrumb',15 'TranslationsVHostBreadcrumb',
@@ -192,3 +193,10 @@
192 @property193 @property
193 def text(self):194 def text(self):
194 return 'Translations'195 return 'Translations'
196
197
198class TranslationsLanguageBreadcrumb(Breadcrumb):
199 """Breadcrumb for objects with language."""
200 @property
201 def text(self):
202 return self.context.language.displayname
195203
=== modified file 'lib/lp/translations/configure.zcml'
--- lib/lp/translations/configure.zcml 2009-09-10 09:58:30 +0000
+++ lib/lp/translations/configure.zcml 2009-09-10 10:27:20 +0000
@@ -250,6 +250,12 @@
250250
251 <!-- DistroSeriesLanguage and Dummy -->251 <!-- DistroSeriesLanguage and Dummy -->
252252
253 <adapter
254 provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
255 for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
256 factory="lp.translations.browser.translations.TranslationsLanguageBreadcrumb"
257 permission="zope.Public"/>
258
253 <class259 <class
254 class="lp.translations.model.distroserieslanguage.DistroSeriesLanguage">260 class="lp.translations.model.distroserieslanguage.DistroSeriesLanguage">
255 <allow261 <allow
256262
=== modified file 'lib/lp/translations/doc/canonical_url_examples.txt'
--- lib/lp/translations/doc/canonical_url_examples.txt 2009-09-10 09:58:30 +0000
+++ lib/lp/translations/doc/canonical_url_examples.txt 2009-09-10 10:27:20 +0000
@@ -151,7 +151,7 @@
151 >>> boo_bah_serbian = getUtility(IDistroSeriesLanguageSet).getDummy(151 >>> boo_bah_serbian = getUtility(IDistroSeriesLanguageSet).getDummy(
152 ... distroseries, serbian)152 ... distroseries, serbian)
153 >>> canonical_url(boo_bah_serbian)153 >>> canonical_url(boo_bah_serbian)
154 u'http://launchpad.dev/boo/bah/+lang/sr'154 u'http://translations.launchpad.dev/boo/bah/+lang/sr'
155155
156Product, ProductSeries and ProductSeriesLanguage156Product, ProductSeries and ProductSeriesLanguage
157---------------------------------------------------157---------------------------------------------------
158158
=== modified file 'lib/lp/translations/model/distroserieslanguage.py'
--- lib/lp/translations/model/distroserieslanguage.py 2009-07-17 00:26:05 +0000
+++ lib/lp/translations/model/distroserieslanguage.py 2009-09-09 11:57:25 +0000
@@ -52,10 +52,14 @@
5252
53 @property53 @property
54 def title(self):54 def title(self):
55 return '%s translations of applications in %s, %s' % (55 return '%s translations of %s %s' % (
56 self.language.englishname,56 self.language.englishname,
57 self.distroseries.distribution.displayname,57 self.distroseries.distribution.displayname,
58 self.distroseries.title)58 self.distroseries.displayname)
59
60 @property
61 def text(self):
62 return self.language.englishname
5963
60 @property64 @property
61 def pofiles(self):65 def pofiles(self):
@@ -158,10 +162,10 @@
158 self.dateupdated = datetime.now(tz=pytz.timezone('UTC'))162 self.dateupdated = datetime.now(tz=pytz.timezone('UTC'))
159 self.translator_count = 0163 self.translator_count = 0
160 self.contributor_count = 0164 self.contributor_count = 0
161 self.title = '%s translations of applications in %s, %s' % (165 self.title = '%s translations of %s %s' % (
162 self.language.englishname,166 self.language.englishname,
163 self.distroseries.distribution.displayname,167 self.distroseries.distribution.displayname,
164 self.distroseries.title)168 self.distroseries.displayname)
165169
166 @property170 @property
167 def pofiles(self):171 def pofiles(self):
168172
=== modified file 'lib/lp/translations/stories/standalone/xx-test-potlists.txt'
--- lib/lp/translations/stories/standalone/xx-test-potlists.txt 2009-07-01 20:45:39 +0000
+++ lib/lp/translations/stories/standalone/xx-test-potlists.txt 2009-09-09 12:41:48 +0000
@@ -11,17 +11,3 @@
11 ...11 ...
12 ...Listing of FEW templates...12 ...Listing of FEW templates...
13 ...13 ...
14
15Check that we can get a potlist for a distroseries:
16
17 >>> print http(r"""
18 ... GET /ubuntu/hoary/+potlist HTTP/1.1
19 ... Host: translations.launchpad.dev
20 ... """)
21 HTTP/1.1 200 Ok
22 Content-Length: ...
23 Content-Type: text/html;charset=utf-8
24 <BLANKLINE>
25 ...
26 ...Listing of FEW templates...
27 ...
2814
=== modified file 'lib/lp/translations/stories/translations/43-distrorelease-translations.txt'
--- lib/lp/translations/stories/translations/43-distrorelease-translations.txt 2008-09-09 08:13:14 +0000
+++ lib/lp/translations/stories/translations/43-distrorelease-translations.txt 2009-09-09 12:41:48 +0000
@@ -43,7 +43,7 @@
43 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/hr?batch=2')43 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/hr?batch=2')
44 >>> 'Croatian' in browser.contents44 >>> 'Croatian' in browser.contents
45 True45 True
46 >>> 'Programs you can translate' in browser.contents46 >>> 'Translatable templates' in browser.contents
47 True47 True
48 >>> print browser.getLink('evolution-2.2').url48 >>> print browser.getLink('evolution-2.2').url
49 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/hr/+translate49 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/hr/+translate
5050
=== removed file 'lib/lp/translations/templates/distroserieslanguage-portlet-stats.pt'
--- lib/lp/translations/templates/distroserieslanguage-portlet-stats.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/distroserieslanguage-portlet-stats.pt 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
1<div
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 class="portlet" id="portlet-stats">
6
7 <h2><span tal:replace="context/language/englishname">French</span>
8 statistics in <span
9 tal:replace="context/distroseries/displayname">Hoary</span></h2>
10
11 <div class="portletBody portletContent">
12
13 <b>Translatable items:</b>
14 <span tal:replace="context/messageCount">N</span>
15 <br/>
16 <b>Untranslated:</b>
17 <span tal:replace="context/untranslatedCount">N</span>
18 <br />
19 <span style="white-space: nowrap"
20 tal:content="structure context/@@+barchart">--</span>
21 <br />
22
23 </div>
24
25</div>
260
=== renamed file 'lib/lp/translations/templates/distroserieslanguage-index.pt' => 'lib/lp/translations/templates/serieslanguage-index.pt'
--- lib/lp/translations/templates/distroserieslanguage-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/serieslanguage-index.pt 2009-09-09 18:52:48 +0000
@@ -2,27 +2,11 @@
2 xmlns="http://www.w3.org/1999/xhtml"2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 metal:use-macro="view/macro:page/main_only"
6 xml:lang="en"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="rosetta"
11>6>
127
13<body>8<body>
149
15<metal:rightportlets fill-slot="portlets_one">
16 <div tal:replace="structure context/@@+portlet-stats" />
17</metal:rightportlets>
18
19<metal:heading fill-slot="pageheading">
20 <h1>
21 Programs you can translate into
22 <tal:language replace="context/language/englishname">Catalan</tal:language>
23 </h1>
24</metal:heading>
25
26<div metal:fill-slot="main">10<div metal:fill-slot="main">
27 <tal:block condition="not:view/pofiles">11 <tal:block condition="not:view/pofiles">
28 <div class="documentDescription">12 <div class="documentDescription">
@@ -31,15 +15,43 @@
31 </tal:block>15 </tal:block>
3216
33 <tal:block condition="view/pofiles">17 <tal:block condition="view/pofiles">
3418 <h1>Translatable templates</h1>
35 <p>19 <div class="top-portlet">
36 Choose a template name to begin translating. Templates that are20 <tal:with_group condition="view/translation_group">
37 considered more important for translation are listed first.21 <p tal:condition="view/translation_team">
38 </p>22 <tal:product replace="structure
3923 view/parent/fmt:link">Evolution</tal:product>
24 is translated by
25 <tal:team replace="structure
26 view/translation_team/translator/fmt:link">
27 Serbian translators</tal:team> — if you need help, or your
28 translations are not being reviewed, please get in touch with them.
29 </p>
30
31 <p tal:condition="not:view/translation_team">
32 There is no team to translate
33 <tal:product replace="structure
34 view/parent/fmt:link">Evolution</tal:product>
35 to
36 <a tal:attributes="href context/language/fmt:url"
37 tal:content="context/language/englishname">Serbian</a>.
38 To set one up, please get in touch with
39 <a tal:replace="structure view/translation_group/fmt:link"
40 >Launchpad Translators</a>
41 coordinator.
42 </p>
43 </tal:with_group>
44
45 <p>
46 Choose a template name to begin translating.
47 Templates which are more important to translate are listed first.
48 </p>
49 </div>
50
51 <div style="max-width:840px;">
40 <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />52 <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />
4153
42 <table class="listing sortable" width="100%" id="translationstatuses">54 <table class="listing sortable" id="translationstatuses">
43 <thead>55 <thead>
44 <tr>56 <tr>
45 <th>Template Name</th>57 <th>Template Name</th>
@@ -52,10 +64,10 @@
52 <th>By</th>64 <th>By</th>
53 </tr>65 </tr>
54 </thead>66 </thead>
55 <tbody>67 <tbody class="translation-stats">
56 <tr tal:repeat="entry view/pofiles"68 <tr tal:repeat="entry view/pofiles"
57 tal:attributes="id string:${entry/potemplate/name}">69 tal:attributes="id string:${entry/potemplate/name}">
58 <td>70 <td class="template-name">
59 <a tal:attributes="href string:${entry/fmt:url}/+translate"71 <a tal:attributes="href string:${entry/fmt:url}/+translate"
60 tal:content="entry/potemplate/name">72 tal:content="entry/potemplate/name">
61 apache2-dev73 apache2-dev
@@ -146,34 +158,31 @@
146 </tal:block>158 </tal:block>
147 </td>159 </td>
148 </tr>160 </tr>
161 <tfoot>
162 <tr class="overall-translation-stats">
163 <th>Overall statistics:</th>
164 <td><span tal:replace="context/messageCount">N</span></td>
165 <td>
166 <span style="white-space: nowrap"
167 tal:content="structure context/@@+barchart">--</span>
168 </td>
169 <td><span tal:replace="context/untranslatedCount">N</span></td>
170 <td><span tal:replace="context/unreviewedCount">N</span></td>
171 <td><span tal:replace="context/updatesCount">N</span></td>
172 <td colspan="2"></td>
173 </tr>
174 </tfoot>
149 </tbody>175 </tbody>
150 </table>176 </table>
151
152 <tal:navigation replace="structure view/batchnav/@@+navigation-links-lower" />177 <tal:navigation replace="structure view/batchnav/@@+navigation-links-lower" />
153178
154 <div tal:replace="structure context/@@+rosetta-status-legend" />179 <div class="translations-legend">
155180 <div tal:replace="structure context/@@+rosetta-status-legend" />
181 </div>
182 </div><!-- max-width -->
156 </tal:block>183 </tal:block>
157184
158</div>185</div>
159186
160<div metal:fill-slot="help">
161 <p>
162 This page shows each of the translation templates in each of the source
163 packages in the
164 <span tal:replace="context/distroseries/displayname">hoary</span>
165 series of
166 <span tal:replace="context/distroseries/distribution/displayname">Ubuntu
167 </span>. Select a template to start translating.
168 </p>
169 <ul class="info">
170 <li>
171 <a href="https://help.launchpad.net/RosettaFAQ"
172 >Frequently asked questions</a>
173 </li>
174 </ul>
175</div>
176
177
178</body>187</body>
179</html>188</html>
180189

Subscribers

People subscribed via source and target branches

to all changes: