Merge lp:~danilo/launchpad/project-and-products into lp:launchpad

Proposed by Данило Шеган
Status: Merged
Merged at revision: not available
Proposed branch: lp:~danilo/launchpad/project-and-products
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~danilo/launchpad/project-and-products
Reviewer Review Type Date Requested Status
Celso Providelo (community) code Approve
Review via email: mp+11550@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :
Download full text (3.7 KiB)

= Bug #427486 =

Migrate product-translations.pt and project-translations.pt pages to
3.0 layout with mostly mechanical changes.

Xmllint reports problem in a page I have touched just so it doesn't
OOPS, which is not migrated yet (next step), so that's where I'll fix
xmllint issues as well.

== Proposed fix ==

1. https://translations.launchpad.dev/gnome (project page)

   * Move permissions display and settings inline
   * Add untranslated applications next to translated applications

   (this is just a very minor step, which is why changes are considered
   'mechanical': in the future, this page should aggregate statistics
   over all translatable projects)

2. https://translations.launchpad.dev/evolution
   https://translations.launchpad.dev/firefox (not using translations, strictly mechanical changes)

   * Move 'translation focus' (direct link, and upload and download links
     for those who can see them) inline.
   * Move 'import queue' link inline.
   * Move permissions display and settings inline (reuse the same portlet)
   * Use two column layout and list all translatable series on the top of
     the page (people had trouble to find these when they were at the bottom)
   * For those who manage translations for this project, also show a list of
     all series which do not have translations with direct links on how they
     can set them up

== Tests ==

Strictly relevant tests:

  bin/test -vvt xx-productseries-translation-export.txt -t xx-product-export.txt -t xx-project-translations.txt -t xx-product-translations.txt -t xx-translation-import-queue-targets.txt -t stories.translationgroups

But basically, all translations tests cover this:

  bin/test -vvt 'translations.*stories'

== Demo and Q/A ==

 https://translations.launchpad.dev/gnome
 https://translations.launchpad.dev/evolution
 https://translations.launchpad.dev/firefox

= Launchpad lint =

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

Linting changed files:
  lib/lp/translations/browser/project.py
  lib/lp/translations/browser/configure.zcml
  lib/lp/translations/stories/standalone/xx-product-translations.txt
  lib/lp/translations/stories/translationgroups/20-project-translationgroup.txt
  lib/lp/translations/stories/standalone/xx-product-export.txt
  lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt
  lib/lp/translations/templates/productseries-translations.pt
  lib/lp/translations/templates/product-translations.pt
  lib/lp/translations/browser/product.py
  lib/lp/translations/templates/project-translations.pt
  lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt
  lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt
  lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt
  lib/lp/translations/templates/product-portlet-translatables.pt
  lib/lp/translations/templates/productseries-translations-languages.pt
  lib/lp/translations/stories/translationgroups/15-product-translation-group.txt
  lib/lp/translations/stories/project/xx-project-translations...

Read more...

Revision history for this message
Celso Providelo (cprov) wrote :

Hi Danilo,

Thanks for working on these pages, they looks good.

I agree that this branch fits in ui=rs, trivial but precise changes.

Land it!

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 11:44:08 +0000
@@ -815,6 +815,7 @@
815 for="lp.registry.interfaces.project.IProject"815 for="lp.registry.interfaces.project.IProject"
816 permission="zope.Public"816 permission="zope.Public"
817 name="+translations"817 name="+translations"
818 class="lp.translations.browser.project.ProjectView"
818 template="../templates/project-translations.pt"819 template="../templates/project-translations.pt"
819 layer="canonical.launchpad.layers.TranslationsLayer"/>820 layer="canonical.launchpad.layers.TranslationsLayer"/>
820 <browser:page821 <browser:page
821822
=== modified file 'lib/lp/translations/browser/product.py'
--- lib/lp/translations/browser/product.py 2009-08-31 00:31:01 +0000
+++ lib/lp/translations/browser/product.py 2009-09-10 18:35:28 +0000
@@ -29,7 +29,7 @@
29 facet = 'translations'29 facet = 'translations'
30 links = (30 links = (
31 'overview',31 'overview',
32 'translators',32 'settings',
33 'translationdownload',33 'translationdownload',
34 'imports',34 'imports',
35 )35 )
@@ -39,7 +39,7 @@
39 return Link('+imports', text)39 return Link('+imports', text)
4040
41 @enabled_with_permission('launchpad.Edit')41 @enabled_with_permission('launchpad.Edit')
42 def translators(self):42 def settings(self):
43 text = 'Settings'43 text = 'Settings'
44 return Link('+changetranslators', text, icon='edit')44 return Link('+changetranslators', text, icon='edit')
4545
@@ -113,3 +113,10 @@
113 'potemplates': translatable.getCurrentTranslationTemplates(),113 'potemplates': translatable.getCurrentTranslationTemplates(),
114 'base_url': canonical_url(translatable)114 'base_url': canonical_url(translatable)
115 }115 }
116
117 @cachedproperty
118 def untranslatable_series(self):
119 """Return series which are not yet set up for translations."""
120 all_series = set(self.context.serieses)
121 translatable = set(self.context.translatable_series)
122 return all_series - translatable
116123
=== modified file 'lib/lp/translations/browser/project.py'
--- lib/lp/translations/browser/project.py 2009-08-31 00:31:01 +0000
+++ lib/lp/translations/browser/project.py 2009-09-10 11:44:08 +0000
@@ -23,10 +23,10 @@
2323
24 usedfor = IProject24 usedfor = IProject
25 facet = 'translations'25 facet = 'translations'
26 links = ['products', 'changetranslators', 'overview']26 links = ['products', 'settings', 'overview']
2727
28 @enabled_with_permission('launchpad.Edit')28 @enabled_with_permission('launchpad.Edit')
29 def changetranslators(self):29 def settings(self):
30 text = 'Settings'30 text = 'Settings'
31 return Link('+changetranslators', text, icon='edit')31 return Link('+changetranslators', text, icon='edit')
3232
@@ -41,7 +41,12 @@
4141
4242
43class ProjectView(LaunchpadView):43class ProjectView(LaunchpadView):
44 pass44 """A view for `IProject` in the translations context."""
45 @property
46 def untranslatables(self):
47 translatables = set(self.context.translatables())
48 all_products = set(self.context.products)
49 return list(all_products - translatables)
4550
4651
47class ProjectChangeTranslatorsView(TranslationsMixin, ProjectEditView):52class ProjectChangeTranslatorsView(TranslationsMixin, ProjectEditView):
4853
=== modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt'
--- lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt 2009-09-01 20:06:37 +0000
+++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt 2009-09-10 18:35:28 +0000
@@ -51,7 +51,7 @@
51The import queue is linked from the translations page for products.51The import queue is linked from the translations page for products.
5252
53 >>> user_browser.open('http://translations.launchpad.dev/evolution')53 >>> user_browser.open('http://translations.launchpad.dev/evolution')
54 >>> user_browser.getLink('Import queue').click()54 >>> user_browser.getLink('Evolution import queue').click()
5555
56This time, we do have content for this product:56This time, we do have content for this product:
5757
5858
=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt'
--- lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt 2009-08-28 15:54:41 +0000
+++ lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt 2009-09-10 18:35:28 +0000
@@ -22,7 +22,7 @@
2222
23 >>> user_browser.open(23 >>> user_browser.open(
24 ... 'http://translations.launchpad.dev/evolution/+translations')24 ... 'http://translations.launchpad.dev/evolution/+translations')
25 >>> user_browser.getLink('Download').click()25 >>> user_browser.getLink('download').click()
26 >>> print user_browser.url26 >>> print user_browser.url
27 http://translations.launchpad.dev/evolution/trunk/+export27 http://translations.launchpad.dev/evolution/trunk/+export
2828
2929
=== modified file 'lib/lp/translations/stories/project/xx-project-translations.txt'
--- lib/lp/translations/stories/project/xx-project-translations.txt 2009-07-10 12:49:30 +0000
+++ lib/lp/translations/stories/project/xx-project-translations.txt 2009-09-10 18:35:28 +0000
@@ -11,28 +11,33 @@
1111
12 >>> evo_link = browser.getLink('Evolution')12 >>> evo_link = browser.getLink('Evolution')
13 >>> print evo_link.url13 >>> print evo_link.url
14 http://translations.launchpad.dev/evolution14 http://launchpad.dev/evolution/+translations
1515
16 >>> browser.open('http://translations.launchpad.dev/gnome')16 >>> browser.open('http://translations.launchpad.dev/gnome')
17 >>> print browser.url17 >>> print browser.url
18 http://translations.launchpad.dev/gnome18 http://translations.launchpad.dev/gnome
1919
20Netapplet is another product of GNOME project. It has translations, but it's not20Netapplet is another product of GNOME project. It has translations,
21using Launchpad officially, so it's not in this page.21but it's not using Launchpad officially, so it's not listed among
2222translatable projects.
23 >>> browser.getLink('Network Applet')23
24 Traceback (most recent call last):24 >>> translated_projects = find_tag_by_id(
25 ...25 ... browser.contents, 'translatable-projects')
26 LinkNotFoundError26 >>> link = translated_projects.find(text='Network Applet')
27 >>> print link
28 None
29
30It does show up among untranslated projects.
31
32 >>> untranslated_projects = find_tag_by_id(
33 ... browser.contents, 'untranslatable-projects')
34 >>> link = untranslated_projects.find(text='NetApplet').parent
35 >>> link['href']
36 u'http://launchpad.dev/netapplet/+translations'
2737
28Let's confirm what we just stated.38Let's confirm what we just stated.
2939
30 >>> anon_browser.open('http://launchpad.dev/gnome')40 >>> anon_browser.open('http://launchpad.dev/gnome')
31 >>> print anon_browser.title
32 The GNOME Project in Launchpad
33
34Netapplet is in fact a product belonging to GNOME project.
35
36 >>> anon_browser.getLink('NetApplet').click()41 >>> anon_browser.getLink('NetApplet').click()
37 >>> print anon_browser.title42 >>> print anon_browser.title
38 Network Applet in Launchpad43 Network Applet in Launchpad
@@ -54,17 +59,6 @@
54 ... 'portlet-obsolete-translatable-series') is None59 ... 'portlet-obsolete-translatable-series') is None
55 True60 True
5661
57but administrators see translations disabled.
58
59 >>> admin_browser.open(anon_browser.url)
60 >>> print admin_browser.title
61 Translations of Network Applet in Launchpad
62 >>> print extract_text(find_tag_by_id(
63 ... admin_browser.contents,
64 ... 'portlet-obsolete-translatable-series'))
65 All product series with obsolete templates
66 NetApplet trunk series
67
68alsa-utils is a product that doesn't belong to GNOME project. It has62alsa-utils is a product that doesn't belong to GNOME project. It has
69translations and is using Launchpad Translations officially, and it63translations and is using Launchpad Translations officially, and it
70shouldn't appear in GNOME project translations page.64shouldn't appear in GNOME project translations page.
@@ -106,13 +100,3 @@
106 >>> alsa_utils_spanish = browser.getLink('Spanish')100 >>> alsa_utils_spanish = browser.getLink('Spanish')
107 >>> print alsa_utils_spanish.url101 >>> print alsa_utils_spanish.url
108 http://translations.../alsa-utils/trunk/+pots/alsa-utils/es/+translate102 http://translations.../alsa-utils/trunk/+pots/alsa-utils/es/+translate
109
110The translations page has also a link to the product search page to see
111whether a product is registered in Launchpad.
112
113 >>> browser.open('http://translations.launchpad.dev/gnome')
114 >>> print browser.url
115 http://translations.launchpad.dev/gnome
116 >>> browser.getLink('registered with Launchpad').click()
117 >>> print browser.url
118 http://translations.launchpad.dev/projects
119103
=== modified file 'lib/lp/translations/stories/standalone/xx-product-export.txt'
--- lib/lp/translations/stories/standalone/xx-product-export.txt 2009-08-28 15:54:41 +0000
+++ lib/lp/translations/stories/standalone/xx-product-export.txt 2009-09-10 18:35:28 +0000
@@ -4,7 +4,7 @@
4translation downloads.4translation downloads.
55
6 >>> user_browser.open('http://translations.launchpad.dev/evolution')6 >>> user_browser.open('http://translations.launchpad.dev/evolution')
7 >>> download = user_browser.getLink('Download "trunk"')7 >>> download = user_browser.getLink('download')
88
9For products, that option downloads translations for the series that is9For products, that option downloads translations for the series that is
10currently the preferred translation target.10currently the preferred translation target.
@@ -45,7 +45,7 @@
45 >>> product.official_rosetta = False45 >>> product.official_rosetta = False
46 >>> product.sync()46 >>> product.sync()
47 >>> user_browser.open('http://translations.launchpad.dev/evolution')47 >>> user_browser.open('http://translations.launchpad.dev/evolution')
48 >>> user_browser.getLink('Download "trunk"')48 >>> user_browser.getLink('download')
49 Traceback (most recent call last):49 Traceback (most recent call last):
50 ...50 ...
51 LinkNotFoundError51 LinkNotFoundError
@@ -54,7 +54,7 @@
54 >>> product.official_rosetta = True54 >>> product.official_rosetta = True
55 >>> product.sync()55 >>> product.sync()
56 >>> user_browser.open('http://translations.launchpad.dev/evolution')56 >>> user_browser.open('http://translations.launchpad.dev/evolution')
57 >>> user_browser.getLink('Download "trunk"') is not None57 >>> user_browser.getLink('download') is not None
58 True58 True
5959
6060
@@ -63,7 +63,7 @@
63Only logged-in users get the option to request downloads.63Only logged-in users get the option to request downloads.
6464
65 >>> anon_browser.open('http://translations.launchpad.dev/evolution/')65 >>> anon_browser.open('http://translations.launchpad.dev/evolution/')
66 >>> anon_browser.getLink('Download "trunk"').click()66 >>> anon_browser.getLink('download').click()
67 Traceback (most recent call last):67 Traceback (most recent call last):
68 ...68 ...
69 LinkNotFoundError69 LinkNotFoundError
7070
=== modified file 'lib/lp/translations/stories/standalone/xx-product-translations.txt'
--- lib/lp/translations/stories/standalone/xx-product-translations.txt 2009-08-13 19:03:36 +0000
+++ lib/lp/translations/stories/standalone/xx-product-translations.txt 2009-09-10 18:35:28 +0000
@@ -79,9 +79,9 @@
79 >>> unprivileged = setupBrowser(auth='Basic no-priv@canonical.com:test')79 >>> unprivileged = setupBrowser(auth='Basic no-priv@canonical.com:test')
80 >>> unprivileged.open('http://translations.launchpad.dev/gnomebaker')80 >>> unprivileged.open('http://translations.launchpad.dev/gnomebaker')
81 >>> print extract_text(find_main_content(unprivileged.contents))81 >>> print extract_text(find_main_content(unprivileged.contents))
82 Overview / Import queue82 Gnome Baker
83 ...
83 Translation setup needed84 Translation setup needed
84 ...
85 This project is not configured to use Launchpad for translations.85 This project is not configured to use Launchpad for translations.
86 The gnomebaker project is not set up for translation in Launchpad.86 The gnomebaker project is not set up for translation in Launchpad.
87 You might want to talk with Foo Bar, the project registrant, about87 You might want to talk with Foo Bar, the project registrant, about
@@ -121,9 +121,9 @@
121121
122 >>> anon_browser.open('http://translations.launchpad.dev/gnomebaker')122 >>> anon_browser.open('http://translations.launchpad.dev/gnomebaker')
123 >>> print extract_text(find_main_content(anon_browser.contents))123 >>> print extract_text(find_main_content(anon_browser.contents))
124 Overview / Import queue124 Gnome Baker
125 ...
125 Translation setup needed126 Translation setup needed
126 ...
127 This project is not configured to use Launchpad for translations.127 This project is not configured to use Launchpad for translations.
128 The gnomebaker project is not set up for translation in Launchpad.128 The gnomebaker project is not set up for translation in Launchpad.
129 If you are Foo Bar, log in to begin the setup process.129 If you are Foo Bar, log in to begin the setup process.
@@ -153,21 +153,12 @@
153 >>> print find_tag_by_id(anon_browser.contents, 'language-chart')153 >>> print find_tag_by_id(anon_browser.contents, 'language-chart')
154 None154 None
155155
156When browsing it as an admin, we can see that it has some 'obsolete'156Even when browsing it as an admin, 'obsolete' translations are not
157translation templates, which is just that the product is not using157shown since it is not marked as using Launchpad for translation.
158them anymore.
159158
160 >>> admin_browser.open('http://translations.launchpad.dev/netapplet')159 >>> admin_browser.open('http://translations.launchpad.dev/netapplet')
161 >>> print extract_text(160 >>> print find_tag_by_id(admin_browser.contents,
162 ... find_tag_by_id(admin_browser.contents,161 ... 'portlet-obsolete-translatable-series')
163 ... 'portlet-obsolete-translatable-series'))
164 All product series with obsolete templates
165 NetApplet trunk series
166
167While we can see that anonymous people are not getting such information:
168
169 >>> print find_tag_by_id(anon_browser.contents,
170 ... 'portlet-obsolete-translatable-series')
171 None162 None
172163
173If the netapplet project is updated to use Launchpad for translations...164If the netapplet project is updated to use Launchpad for translations...
174165
=== modified file 'lib/lp/translations/stories/translationgroups/15-product-translation-group.txt'
--- lib/lp/translations/stories/translationgroups/15-product-translation-group.txt 2009-08-31 22:13:07 +0000
+++ lib/lp/translations/stories/translationgroups/15-product-translation-group.txt 2009-09-10 18:35:28 +0000
@@ -36,13 +36,12 @@
36 ... find_tag_by_id(netapplet_owner_browser.contents,36 ... find_tag_by_id(netapplet_owner_browser.contents,
37 ... 'translation-permissions'))37 ... 'translation-permissions'))
38 NetApplet (Unspecified) is translated with Open permissions.38 NetApplet (Unspecified) is translated with Open permissions.
39 You can modify permissions on the Settings page.
4039
41Now let's make sure we can see the page to let us change translation40Now let's make sure we can see the page to let us change translation
42group and permissions.41group and permissions.
4342
44 >>> translations_page_url = netapplet_owner_browser.url43 >>> translations_page_url = netapplet_owner_browser.url
45 >>> netapplet_owner_browser.getLink('Settings').click()44 >>> netapplet_owner_browser.getLink('Change permissions').click()
46 >>> change_translators_url = netapplet_owner_browser.url45 >>> change_translators_url = netapplet_owner_browser.url
4746
48 >>> print netapplet_owner_browser.title47 >>> print netapplet_owner_browser.title
@@ -57,11 +56,11 @@
57 ... 'Translation group').displayValue56 ... 'Translation group').displayValue
58 ['(no value)']57 ['(no value)']
5958
60Ordinary users cannot see the "Settings" link or the page it59Ordinary users cannot see the "Change permissions" link or the page it
61leads to.60leads to.
6261
63 >>> user_browser.open(translations_page_url)62 >>> user_browser.open(translations_page_url)
64 >>> user_browser.getLink('Settings').click()63 >>> user_browser.getLink('Change permissions').click()
65 Traceback (most recent call last):64 Traceback (most recent call last):
66 ...65 ...
67 LinkNotFoundError66 LinkNotFoundError
6867
=== modified file 'lib/lp/translations/stories/translationgroups/20-project-translationgroup.txt'
--- lib/lp/translations/stories/translationgroups/20-project-translationgroup.txt 2009-08-31 22:13:07 +0000
+++ lib/lp/translations/stories/translationgroups/20-project-translationgroup.txt 2009-09-10 18:35:28 +0000
@@ -13,7 +13,7 @@
13And now make sure we can see the form to change the translation group13And now make sure we can see the form to change the translation group
14and permissions on a project.14and permissions on a project.
1515
16 >>> gnome_owner_browser.getLink('Settings').click()16 >>> gnome_owner_browser.getLink('Change permissions').click()
17 >>> print gnome_owner_browser.title17 >>> print gnome_owner_browser.title
18 Set translation permissions for GNOME18 Set translation permissions for GNOME
1919
@@ -21,7 +21,7 @@
21to access the page it leads to.21to access the page it leads to.
2222
23 >>> user_browser.open(translations_page_url)23 >>> user_browser.open(translations_page_url)
24 >>> user_browser.getLink('Settings').click()24 >>> user_browser.getLink('Change permissions').click()
25 Traceback (most recent call last):25 Traceback (most recent call last):
26 ...26 ...
27 LinkNotFoundError27 LinkNotFoundError
2828
=== modified file 'lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt'
--- lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt 2009-08-31 22:13:07 +0000
+++ lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt 2009-09-10 18:35:28 +0000
@@ -13,7 +13,7 @@
13as the translation group for the netapplet product...13as the translation group for the netapplet product...
1414
15 >>> admin_browser.getLink('Translations').click()15 >>> admin_browser.getLink('Translations').click()
16 >>> admin_browser.getLink('Settings').click()16 >>> admin_browser.getLink('Change permissions').click()
17 >>> admin_browser.getControl('Translation group').displayOptions17 >>> admin_browser.getControl('Translation group').displayOptions
18 ['(no value)', 'Single-language Translators',18 ['(no value)', 'Single-language Translators',
19 'The PolyGlot Translation Group', 'Just a testing team']19 'The PolyGlot Translation Group', 'Just a testing team']
2020
=== modified file 'lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt'
--- lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/hastranslationgroup-portlet-translation-groups-and-permission.pt 2009-09-10 18:47:57 +0000
@@ -1,22 +1,21 @@
1<div class="portlet" id="portlet-translation-permissions">1<div id="portlet-translation-permissions"
2 <h2>Translation permissions</h2>2 xmlns="http://www.w3.org/1999/xhtml"
3 <div class="portletBody">3 xmlns:tal="http://xml.zope.org/namespaces/tal">
4 <table>4 <p id="translation-permissions">
5 <tr>5 <tal:product replace="structure context/fmt:link">This
6 <th>Translation group:</th>6 project</tal:product> is translated
7 <td tal:condition="not: context/translationgroup">7 <tal:hasgroup condition="context/translationgroup">by
8 Not assigned8 <a tal:replace="structure context/translationgroup/fmt:link"
9 </td>9 >translators</a>
10 <td tal:condition="context/translationgroup">10 </tal:hasgroup>
11 <a tal:attributes="href context/translationgroup/fmt:url"11 with <a target="help" href="/+help/permissions-policies.html"
12 tal:content="context/translationgroup/title" />12 tal:content="context/translationpermission/title">certain</a>
13 </td>13 permissions.
14 </tr>14 </p>
15 <tr>15 <div tal:condition="context/required:launchpad.Edit">
16 <th>Permissions:</th>16 <a class="edit sprite"
17 <td tal:content="context/translationpermission/title">Open</td>17 tal:define="link context/menu:navigation/settings"
18 </tr>18 tal:attributes="href link/url"
19 </table>19 >Change permissions</a>
20 </div>20 </div>
21</div>21</div>
22
2322
=== modified file 'lib/lp/translations/templates/product-portlet-translatables.pt'
--- lib/lp/translations/templates/product-portlet-translatables.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/product-portlet-translatables.pt 2009-09-10 18:35:28 +0000
@@ -6,10 +6,9 @@
66
7<div class="portlet" id="portlet-translatable-branches"7<div class="portlet" id="portlet-translatable-branches"
8 tal:condition="context/translatable_series">8 tal:condition="context/translatable_series">
9 <h2>All translatable series</h2>9 <h3>All translatable series</h3>
1010
11 <div class="portletBody portletContent">11 <div class="portletBody portletContent">
12
13 <ul>12 <ul>
14 <li class="translations"13 <li class="translations"
15 tal:repeat="series context/translatable_series">14 tal:repeat="series context/translatable_series">
@@ -18,14 +17,37 @@
18 series title</a>17 series title</a>
19 </li>18 </li>
20 </ul>19 </ul>
2120 </div>
21</div>
22
23<div tal:condition="context/required:launchpad.Edit">
24 <div class="portlet" id="portlet-untranslatable-branches"
25 tal:condition="view/untranslatable_series">
26 <h3>Set up translations for other series</h3>
27
28 <div class="portletBody portletContent">
29 <ul>
30 <li class="translations"
31 tal:repeat="series view/untranslatable_series">
32 <a tal:content="series/title"
33 tal:attributes="href string:${series/fmt:url}/+translations">
34 series title</a> —
35 <a tal:attributes="
36 href string:${series/fmt:url}/+translations-upload">
37 upload</a> or
38 <a tal:attributes="
39 href string:${series/fmt:url}/+translations-settings">
40 set up a bzr import</a>.
41 </li>
42 </ul>
43 </div>
22 </div>44 </div>
23</div>45</div>
2446
25<div class="portlet" id="portlet-translatable-packages"47<div class="portlet" id="portlet-translatable-packages"
26 tal:condition="context/translatable_packages">48 tal:condition="context/translatable_packages">
2749
28 <h2>All translatable distribution packages</h2>50 <h3>All translatable distribution packages</h3>
2951
30 <div class="portletBody portletContent ">52 <div class="portletBody portletContent ">
3153
3254
=== modified file 'lib/lp/translations/templates/product-translations.pt'
--- lib/lp/translations/templates/product-translations.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/product-translations.pt 2009-09-10 18:35:28 +0000
@@ -2,30 +2,13 @@
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="view/macro:page/onecolumn"
10 i18n:domain="launchpad"
11>6>
12 <!-- metal:use-macro="context/@@main_template/master" -->
137
14 <body>8 <body>
15 <div metal:fill-slot="main"9 <div metal:fill-slot="main"
16 tal:define="uses_translations view/uses_translations;10 tal:define="uses_translations view/uses_translations;
17 admin_user context/required:launchpad.TranslationsAdmin">11 admin_user context/required:launchpad.TranslationsAdmin">
18 <tal:uses-translations condition="uses_translations">
19 <h1>Translation overview</h1>
20 </tal:uses-translations>
21 <tal:not-uses-translations condition="not: uses_translations">
22 <h1 tal:condition="admin_user">
23 How to start using Launchpad Translations
24 </h1>
25 <h1 tal:condition="not: admin_user">
26 Translation setup needed
27 </h1>
28 </tal:not-uses-translations>
29 <ul class="helplinks">12 <ul class="helplinks">
30 <li>13 <li>
31 <a href="https://help.launchpad.net/Translations"14 <a href="https://help.launchpad.net/Translations"
@@ -35,31 +18,80 @@
35 </li>18 </li>
36 </ul>19 </ul>
37 <tal:uses-translations condition="uses_translations">20 <tal:uses-translations condition="uses_translations">
21 <h1>Translation overview</h1>
22 </tal:uses-translations>
23 <tal:not-uses-translations condition="not: uses_translations">
24 <h1 tal:condition="admin_user">
25 How to start using Launchpad Translations
26 </h1>
27 <h1 tal:condition="not: admin_user">
28 Translation setup needed
29 </h1>
30 </tal:not-uses-translations>
31 <tal:uses-translations condition="uses_translations">
38 <tal:translatable define="target context/primary_translatable">32 <tal:translatable define="target context/primary_translatable">
39 <p id="translation-permissions">33
40 <tal:product replace="structure context/fmt:link">This34 <div class="top-portlet">
41 project</tal:product> is translated35 </div>
42 <tal:hasgroup condition="context/translationgroup">by36
43 <a tal:attributes="href context/translationgroup/fmt:url"37 <div class="yui-g">
44 tal:content="context/translationgroup/title">translators</a>38 <div class="yui-u first">
45 </tal:hasgroup>39 <div class="portlet">
46 with <a target="help" href="/+help/permissions-policies.html"40 <h3>Translation details</h3>
47 tal:content="context/translationpermission/title">certain</a>41 <p>
48 permissions.42 Launchpad currently recommends translating
49 <tal:permissions condition="context/required:launchpad.Edit">43 <tal:target replace="structure target/fmt:link/+translations"
50 You can modify permissions on the44 >trunk</tal:target>.
51 <a45 <tal:admins condition="context/required:launchpad.AnyPerson">
52 tal:define="link context/menu:navigation/translators"46 You can also
53 tal:attributes="href link/url"47 <a tal:attributes="href target/fmt:url/+export"
54 >Settings</a> page.48 >download</a> or
55 </tal:permissions>49 <a tal:attributes="
56 </p>50 href target/fmt:url/+translations-upload"
57 <h2>Translation for51 >upload</a> translations for
58 <span tal:replace="target/displayname">main</span></h2>52 <tal:target replace="structure target/name"
59 <div tal:replace="structure target/@@+languages" />53 >trunk</tal:target>.
60 <div style="height:1em;"></div>54 </tal:admins>
61 <div tal:replace="structure context/@@+rosetta-status-legend" />55 </p>
62 <div tal:replace="structure context/@@+portlet-translatables" />56 <p>To see all the translation files that are waiting to be
57 imported, please look at
58 <a tal:attributes="href context/fmt:url/+imports"
59 tal:content="string:${context/displayname} import queue">
60 import queue</a>.
61 </p>
62 </div>
63 <div class="portlet">
64 <h3>Permissions</h3>
65 <p>
66 <tal:permissions replace="
67 structure
68 context/@@+portlet-translation-groups-and-permission"/>
69 </p>
70 </div>
71 </div>
72 <div class="yui-u">
73 <div>
74 <tal:registrant-or-admin
75 condition="admin_user">
76 <tal:has-obsolete-entries
77 condition="context/obsolete_translatable_series">
78 <div tal:replace="
79 structure
80 context/@@+portlet-obsolete-translatables" />
81 </tal:has-obsolete-entries>
82 </tal:registrant-or-admin>
83 </div>
84 <div tal:replace="structure context/@@+portlet-translatables" />
85 </div>
86 </div>
87
88 <div class="yui-b">
89 <h2>Translation for
90 <span tal:replace="target/displayname">main</span></h2>
91 <div tal:replace="structure target/@@+languages" />
92 <div style="height:1em;"></div>
93 <div tal:replace="structure context/@@+rosetta-status-legend" />
94 </div>
63 </tal:translatable>95 </tal:translatable>
64 </tal:uses-translations>96 </tal:uses-translations>
65 <tal:not-uses-translations condition="not: uses_translations">97 <tal:not-uses-translations condition="not: uses_translations">
@@ -123,14 +155,6 @@
123 </p>155 </p>
124 </tal:other>156 </tal:other>
125 </tal:not-uses-translations>157 </tal:not-uses-translations>
126 <tal:registrant-or-admin
127 condition="admin_user">
128 <tal:has-obsolete-entries
129 condition="context/obsolete_translatable_series">
130 <div
131 tal:replace="structure context/@@+portlet-obsolete-translatables" />
132 </tal:has-obsolete-entries>
133 </tal:registrant-or-admin>
134 </div>158 </div>
135 </body>159 </body>
136</html>160</html>
137161
=== modified file 'lib/lp/translations/templates/productseries-translations-languages.pt'
--- lib/lp/translations/templates/productseries-translations-languages.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/productseries-translations-languages.pt 2009-09-10 07:24:24 +0000
@@ -3,7 +3,7 @@
3 xmlns:metal="http://xml.zope.org/namespaces/metal"3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">5 omit-tag="">
6 <table class="sortable listing" style="width:auto;" id="languagestats">6 <table class="sortable listing" style="width:100%;" id="languagestats">
7 <thead>7 <thead>
8 <tr>8 <tr>
9 <th>Language</th>9 <th>Language</th>
1010
=== modified file 'lib/lp/translations/templates/productseries-translations.pt'
--- lib/lp/translations/templates/productseries-translations.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/productseries-translations.pt 2009-09-10 07:24:24 +0000
@@ -70,7 +70,7 @@
70 <tal:permissions condition="context/product/required:launchpad.Edit">70 <tal:permissions condition="context/product/required:launchpad.Edit">
71 You can modify permissions on the71 You can modify permissions on the
72 <a72 <a
73 tal:define="link context/product/menu:navigation/translators"73 tal:define="link context/product/menu:navigation/settings"
74 tal:attributes="href link/url"74 tal:attributes="href link/url"
75 >project settings</a> page.75 >project settings</a> page.
76 </tal:permissions>76 </tal:permissions>
7777
=== modified file 'lib/lp/translations/templates/project-translations.pt'
--- lib/lp/translations/templates/project-translations.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/project-translations.pt 2009-09-10 18:35:28 +0000
@@ -2,80 +2,88 @@
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="view/macro:page/onecolumn"
10 i18n:domain="launchpad"
11>6>
12 <body>7<body>
13 <metal:portlets fill-slot="portlets">8 <div metal:fill-slot="main">
14 <tal:portlet9
15 replace="structure context/@@+portlet-translation-groups-and-permission"10 <h1>Translatable applications</h1>
16 />11
17 <tal:portlet replace="structure context/@@+portlet-preflangs" />12 <div class="top-portlet">
18 </metal:portlets>13 <p tal:condition="context/translatables">
1914 Select a project you want to translate into your own language.
20 <metal:heading fill-slot="pageheading">15 </p>
2116 <p tal:condition="not:context/translatables">
22 <tal:block condition="view/required:launchpad.Edit">17 There are no translatable projects in
23 <p tal:condition="not: context/products" class="warning message"> 18 <span tal:content="context/displayname">GNOME</span>.
24 There are no projects registered for19 </p>
25 <span tal:replace="context/displayname">project displayname</span>.20 <p tal:condition="not:view/required:launchpad.Edit">
26 <br />21 If a project for <span tal:content="context/displayname">Project
27 You need to <a href="+newproduct">register another project that is22 </span> is not listed here, get in touch with
28 part of <tal:project replace="context/displayname" /></a> or associate23 <a tal:replace="structure context/owner/fmt:link">owner</a> who is
29 an existing project with it.24 the administrator for the project.
30 </p>25 </p>
31 </tal:block>
32
33 <tal:untranslatable condition="not: context/translatables">
34 <h1 tal:condition="context/required:launchpad.Edit">
35 How to set up translations
36 </h1>
37 <h1 tal:condition="not: context/required:launchpad.Edit">
38 Translation setup needed
39 </h1>
40 </tal:untranslatable>
41 </metal:heading>
42
43 <div metal:fill-slot="main">
44
45 <h2>Translatable applications</h2>
4626
47 <p>27 <p>
48 Select a project to begin translating it into your own language.28 <tal:permissions
49 If a project for <span tal:content="context/displayname">Project29 replace="structure
50 </span> is not listed here, check that it&#8217;s30 context/@@+portlet-translation-groups-and-permission"
51 <a href="/projects">registered with Launchpad</a>, and follow the31 />
52 instructions described at32 </p>
53 <a href="https://help.launchpad.net/RosettaFAQ">RosettaFAQ</a>33 </div>
54 </p>34
5535 <div class="yui-g">
56 <table class="listing">36 <div class="yui-u first">
57 <thead>37 <div class="portlet" id="translatable-projects">
58 <tr>38 <h3>Translatable projects</h3>
59 <th>Project</th>39 <dl tal:condition="context/translatables">
60 <th>Title</th>40 <tal:project repeat="product context/translatables">
61 </tr>41 <dt>
62 </thead>42 <a tal:replace="structure product/fmt:link/+translations">
63 <tbody>43 Evolution
64 <tr tal:repeat="product context/translatables">44 </a>
65 <td>45 </dt>
66 <img alt="" src="/@@/product" />46 <dd>
67 <a tal:content="product/displayname"47 <span tal:replace="product/title">
68 tal:attributes="48 The Evolution Groupware Application
69 href product/fmt:url">Evolution</a>49 </span>
70 </td>50 </dd>
71 <td>51 </tal:project>
72 <span tal:replace="product/title">52 </dl>
73 The Evolution Groupware Application53 </div>
74 </span>54 </div>
75 </td>55 <div class="yui-u">
76 </tr>56 <div class="portlet" id="untranslatable-projects">
77 </tbody>57 <h3>Other projects in
78 </table>58 <tal:group replace="context/displayname">GNOME</tal:group>
79 </div><!--main-->59 </h3>
80 </body>60 <p>
61 These projects are not yet set up for translation in Launchpad.
62 </p>
63 <dl tal:condition="view/untranslatables">
64 <tal:project repeat="product view/untranslatables">
65 <dt>
66 <a tal:replace="structure product/fmt:link/+translations">
67 Evolution
68 </a>
69 </dt>
70 <dd>
71 <span tal:replace="product/title">
72 The Evolution Groupware Application
73 </span>
74 </dd>
75 </tal:project>
76 </dl>
77 </div>
78 </div>
79 </div>
80 <div class="yui-b">
81 <p tal:condition="view/required:launchpad.Edit">
82 <a class="add sprite" href="+newproduct">Add another project</a>
83 </p>
84 </div>
85
86
87 </div><!--main-->
88</body>
81</html>89</html>
8290