Merge lp://staging/~henninge/launchpad/bug-427956 into lp://staging/launchpad

Proposed by Henning Eggers
Status: Merged
Approved by: Henning Eggers
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~henninge/launchpad/bug-427956
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~henninge/launchpad/bug-427956
Reviewer Review Type Date Requested Status
Jeroen T. Vermeulen (community) Approve
Review via email: mp+11823@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) wrote :

= Overview =

Mechanical conversion of POFile:+translate page to 3.0.

Along with that I also changed:
- DefaultView for POFile to +translate which reflects the current practice.
- POFile:+index renamed to +details, because it is not the index any more.
- Renamed menu entries to be usable for in-page links.

The changes drew in a host of page test failures that had to be addressed so the diff has grown bigger than expected. I moved menu-pages.txt into translations because we are the only ones using it.

= Test command =

bin/test -vv -t breadcrumbs -t menu-pages.txt -t xx-licensing.txt -t xx-pofile-details.txt -t xx-pofile-translate-alternative-language.txt -t xx-pofile-translate-message-filtering.txt -t xx-rosetta-pofile-export.txt -t pofile.txt -t translationgroups

= 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/lp/translations/configure.zcml
  lib/lp/translations/browser/configure.zcml
  lib/lp/translations/browser/pofile.py
  lib/lp/translations/browser/tests/menu-pages.txt
  lib/lp/translations/browser/tests/test_breadcrumbs.py
  lib/lp/translations/stories/navigation-links/pofile.txt
  lib/lp/translations/stories/standalone/xx-licensing.txt
  lib/lp/translations/stories/standalone/xx-pofile-details.txt
  lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt
  lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt
  lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt
  lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt
  lib/lp/translations/templates/pofile-translate.pt

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Looks good. Not entirely happy about having menu-pages.txt in our tree
since it tests navigation menus using our pages as examples, not our
pages in the context of navigation menus, but I don't see an easy
solution that would solve everything there.

The new page title for POFiles is ugly, and lists neither the language
nor the product. I'm surprised the new breadcrumbs don't solve that.
But given that we're making those a separate effort, it shouldn't hold
up this branch.

Also thanks for making the translation view the default page for the
POFile. That's something we've been wanting for some time now.

Jeroen

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-09-15 05:45:10 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-09-15 16:52:45 +0000
@@ -719,11 +719,6 @@
719719
720pofile_index = ContextTitle(smartquote('Translation overview for "%s"'))720pofile_index = ContextTitle(smartquote('Translation overview for "%s"'))
721721
722def pofile_translate(context, view):
723 """Return the page to translate a template into a language."""
724 return 'Translating %s into %s' % (
725 context.potemplate.displayname, context.language.englishname)
726
727# portlet_* are portlets722# portlet_* are portlets
728723
729poll_edit = ContextTitle(smartquote('Edit poll "%s"'))724poll_edit = ContextTitle(smartquote('Edit poll "%s"'))
730725
=== modified file 'lib/lp/translations/browser/configure.zcml'
--- lib/lp/translations/browser/configure.zcml 2009-09-14 15:41:21 +0000
+++ lib/lp/translations/browser/configure.zcml 2009-09-15 16:52:45 +0000
@@ -201,7 +201,7 @@
201 POFileNavigationMenu"/>201 POFileNavigationMenu"/>
202 <browser:defaultView202 <browser:defaultView
203 for="lp.translations.interfaces.pofile.IPOFile"203 for="lp.translations.interfaces.pofile.IPOFile"
204 name="+index"204 name="+translate"
205 layer="canonical.launchpad.layers.TranslationsLayer"/>205 layer="canonical.launchpad.layers.TranslationsLayer"/>
206 <browser:pages206 <browser:pages
207 for="lp.translations.interfaces.pofile.IPOFile"207 for="lp.translations.interfaces.pofile.IPOFile"
@@ -209,11 +209,9 @@
209 class="lp.translations.browser.pofile.POFileView"209 class="lp.translations.browser.pofile.POFileView"
210 layer="canonical.launchpad.layers.TranslationsLayer">210 layer="canonical.launchpad.layers.TranslationsLayer">
211 <browser:page211 <browser:page
212 name="+index"212 name="+details"
213 template="../templates/pofile-index.pt"/>213 template="../templates/pofile-index.pt"/>
214
215 <!-- POFile Portlets -->214 <!-- POFile Portlets -->
216
217 <browser:page215 <browser:page
218 name="+contributors"216 name="+contributors"
219 template="../templates/pofile-translate-contributors.pt"/>217 template="../templates/pofile-translate-contributors.pt"/>
220218
=== modified file 'lib/lp/translations/browser/pofile.py'
--- lib/lp/translations/browser/pofile.py 2009-09-10 09:57:58 +0000
+++ lib/lp/translations/browser/pofile.py 2009-09-15 18:53:26 +0000
@@ -111,9 +111,9 @@
111class POFileMenuMixin:111class POFileMenuMixin:
112 """Mixin class to share code between navigation and action menus."""112 """Mixin class to share code between navigation and action menus."""
113113
114 def description(self):114 def details(self):
115 text = 'Description'115 text = 'Translation details'
116 return Link('', text)116 return Link('+details', text, icon='info')
117117
118 def translate(self):118 def translate(self):
119 text = 'Translate'119 text = 'Translate'
@@ -121,11 +121,11 @@
121121
122 @enabled_with_permission('launchpad.Edit')122 @enabled_with_permission('launchpad.Edit')
123 def upload(self):123 def upload(self):
124 text = 'Upload a file'124 text = 'Upload translation'
125 return Link('+upload', text, icon='edit')125 return Link('+upload', text, icon='add')
126126
127 def download(self):127 def download(self):
128 text = 'Download'128 text = 'Download translation'
129 return Link('+export', text, icon='download')129 return Link('+export', text, icon='download')
130130
131131
@@ -133,7 +133,7 @@
133 """Navigation menus for `IPOFile` objects."""133 """Navigation menus for `IPOFile` objects."""
134 usedfor = IPOFile134 usedfor = IPOFile
135 facet = 'translations'135 facet = 'translations'
136 links = ('description', 'translate', 'upload', 'download')136 links = ('details', 'translate', 'upload', 'download')
137137
138138
139class POFileBaseView(LaunchpadView):139class POFileBaseView(LaunchpadView):
@@ -659,6 +659,15 @@
659 DEFAULT_SHOW = 'all'659 DEFAULT_SHOW = 'all'
660 DEFAULT_SIZE = 10660 DEFAULT_SIZE = 10
661661
662 @property
663 def label(self):
664 """Return the page to translate a template into a language."""
665 if self.form_is_writeable:
666 form_label = 'Translating into %s'
667 else:
668 form_label = 'Browsing %s translation'
669 return form_label % self.context.language.englishname
670
662 def initialize(self):671 def initialize(self):
663 self.pofile = self.context672 self.pofile = self.context
664 translations_person = ITranslationsPerson(self.user, None)673 translations_person = ITranslationsPerson(self.user, None)
665674
=== renamed file 'lib/canonical/launchpad/doc/menu-pages.txt' => 'lib/lp/translations/browser/tests/menu-pages.txt'
--- lib/canonical/launchpad/doc/menu-pages.txt 2009-09-11 18:02:33 +0000
+++ lib/lp/translations/browser/tests/menu-pages.txt 2009-09-15 18:53:26 +0000
@@ -87,10 +87,10 @@
87 'http://translations.../evolution/trunk/+pots/evolution-2.2/es'87 'http://translations.../evolution/trunk/+pots/evolution-2.2/es'
8888
89 >>> print_menu_view_links(nav_menu_view)89 >>> print_menu_view_links(nav_menu_view)
90 http://translations.../evolution/trunk/+pots/evolution-2.2/es90 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
91 name: description91 name: details
92 enabled: True92 enabled: True
93 linked: False93 linked: True
94 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate94 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
95 name: translate95 name: translate
96 enabled: True96 enabled: True
@@ -117,8 +117,8 @@
117117
118 >>> nav_menu_view.initialize()118 >>> nav_menu_view.initialize()
119 >>> print_menu_view_links(nav_menu_view)119 >>> print_menu_view_links(nav_menu_view)
120 http://translations.../evolution/trunk/+pots/evolution-2.2/es120 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
121 name: description121 name: details
122 enabled: True122 enabled: True
123 linked: True123 linked: True
124 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate124 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
@@ -142,14 +142,14 @@
142 >>> from lp.translations.browser.pofile import POFileNavigationMenu142 >>> from lp.translations.browser.pofile import POFileNavigationMenu
143143
144 >>> original_enable_only = POFileNavigationMenu.enable_only144 >>> original_enable_only = POFileNavigationMenu.enable_only
145 >>> POFileNavigationMenu.enable_only = ['description', 'translate']145 >>> POFileNavigationMenu.enable_only = ['details', 'translate']
146 >>> config.devmode146 >>> config.devmode
147 True147 True
148148
149 >>> nav_menu_view.initialize()149 >>> nav_menu_view.initialize()
150 >>> print_menu_view_links(nav_menu_view)150 >>> print_menu_view_links(nav_menu_view)
151 http://translations.../evolution/trunk/+pots/evolution-2.2/es151 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
152 name: description152 name: details
153 enabled: True153 enabled: True
154 linked: True154 linked: True
155 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate155 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
@@ -172,8 +172,8 @@
172172
173 >>> nav_menu_view.initialize()173 >>> nav_menu_view.initialize()
174 >>> print_menu_view_links(nav_menu_view)174 >>> print_menu_view_links(nav_menu_view)
175 http://translations.../evolution/trunk/+pots/evolution-2.2/es175 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
176 name: description176 name: details
177 enabled: True177 enabled: True
178 linked: True178 linked: True
179 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate179 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
180180
=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
--- lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-11 10:38:49 +0000
+++ lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-14 16:19:15 +0000
@@ -158,5 +158,27 @@
158 ["Crumb Tester", "Series test", "Translations", "Serbian (sr)"])158 ["Crumb Tester", "Series test", "Translations", "Serbian (sr)"])
159159
160160
161class TestPOFileBreadcrumbs(BaseTranslationsBreadcrumbTestCase):
162
163 def setUp(self):
164 super(TestPOFileBreadcrumbs, self).setUp()
165 self.language = getUtility(ILanguageSet)['eo']
166 self.product = self.factory.makeProduct(
167 name='crumb-tester', displayname="Crumb Tester")
168 self.series = self.factory.makeProductSeries(
169 name="test", product=self.product)
170 self.potemplate = self.factory.makePOTemplate(self.series,
171 name="test-template")
172 self.pofile = self.factory.makePOFile('eo', self.potemplate)
173
174 def test_pofiletranslate(self):
175 self._testContextBreadcrumbs(
176 [self.product, self.series, self.potemplate, self.pofile],
177 ["http://launchpad.dev/crumb-tester",
178 "http://launchpad.dev/crumb-tester/test",
179 "http://translations.launchpad.dev/crumb-tester/test"],
180 ["Crumb Tester", "Series test", "Translations"])
181
182
161def test_suite():183def test_suite():
162 return unittest.TestLoader().loadTestsFromName(__name__)184 return unittest.TestLoader().loadTestsFromName(__name__)
163185
=== modified file 'lib/lp/translations/configure.zcml'
--- lib/lp/translations/configure.zcml 2009-09-10 10:50:55 +0000
+++ lib/lp/translations/configure.zcml 2009-09-14 16:19:15 +0000
@@ -320,6 +320,15 @@
320 for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"320 for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"
321 provides="lp.translations.interfaces.translationimporter.ITranslationFormatImporter"321 provides="lp.translations.interfaces.translationimporter.ITranslationFormatImporter"
322 factory="lp.translations.utilities.mozilla_xpi_importer.MozillaXpiImporter"/>322 factory="lp.translations.utilities.mozilla_xpi_importer.MozillaXpiImporter"/>
323
324 <!-- PO File -->
325
326 <adapter
327 name="translations"
328 provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
329 for="lp.translations.interfaces.pofile.IPOFile"
330 factory="lp.translations.browser.translations.TranslationsLanguageBreadcrumb"
331 permission="zope.Public"/>
323 <facet332 <facet
324 facet="translations">333 facet="translations">
325 <class334 <class
326335
=== modified file 'lib/lp/translations/stories/navigation-links/pofile.txt'
--- lib/lp/translations/stories/navigation-links/pofile.txt 2009-07-01 20:45:39 +0000
+++ lib/lp/translations/stories/navigation-links/pofile.txt 2009-09-15 16:33:12 +0000
@@ -21,14 +21,6 @@
21 * Translations (selected) - http://translations.launchpad.dev/evolution/trunk21 * Translations (selected) - http://translations.launchpad.dev/evolution/trunk
22 * Answers - not linked22 * Answers - not linked
2323
24But the navigation links should point to IPOFile urls.
25
26 >>> print_navigation_links(admin_browser.contents)
27 Description
28 Translate: http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate
29 Upload a file: http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+upload
30 Download: http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+export
31
32Taking an IPOFile for ISourcePackage context:24Taking an IPOFile for ISourcePackage context:
3325
34 >>> admin_browser.open(26 >>> admin_browser.open(
@@ -47,10 +39,3 @@
47 * Translations (selected) - http://translations.launchpad.dev/ubuntu/hoary/+source/evolution39 * Translations (selected) - http://translations.launchpad.dev/ubuntu/hoary/+source/evolution
48 * Answers - http://answers.launchpad.dev/ubuntu/hoary/+source/evolution40 * Answers - http://answers.launchpad.dev/ubuntu/hoary/+source/evolution
4941
50But the navigation links should point to IPOFile urls.
51
52 >>> print_navigation_links(admin_browser.contents)
53 Description
54 Translate: http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate
55 Upload a file: http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+upload
56 Download: http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+export
5742
=== modified file 'lib/lp/translations/stories/standalone/xx-licensing.txt'
--- lib/lp/translations/stories/standalone/xx-licensing.txt 2009-09-12 07:25:21 +0000
+++ lib/lp/translations/stories/standalone/xx-licensing.txt 2009-09-15 18:53:26 +0000
@@ -94,8 +94,8 @@
94 ... '+pots/alsa-utils/es/+translate')94 ... '+pots/alsa-utils/es/+translate')
95 >>> browser.url95 >>> browser.url
96 'http://.../alsa-utils/trunk/+pots/alsa-utils/es/+translate'96 'http://.../alsa-utils/trunk/+pots/alsa-utils/es/+translate'
97 >>> browser.title97 >>> print browser.title
98 'Translating alsa-utils in alsa-utils trunk into Spanish'98 Translations : Series trunk : alsa-utils
9999
100100
101== Permissions ==101== Permissions ==
102102
=== renamed file 'lib/lp/translations/stories/standalone/xx-pofile-index.txt' => 'lib/lp/translations/stories/standalone/xx-pofile-details.txt'
--- lib/lp/translations/stories/standalone/xx-pofile-index.txt 2009-09-12 07:25:21 +0000
+++ lib/lp/translations/stories/standalone/xx-pofile-details.txt 2009-09-15 18:53:26 +0000
@@ -3,10 +3,10 @@
33
4 >>> anon_browser.open(4 >>> anon_browser.open(
5 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'5 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
6 ... 'evolution-2.2/es')6 ... 'evolution-2.2/es/+details')
7 >>> print extract_text(find_main_content(anon_browser.contents)).encode(7 >>> print extract_text(find_main_content(anon_browser.contents)).encode(
8 ... 'ascii', 'backslashreplace')8 ... 'ascii', 'backslashreplace')
9 Description / Translate / Download9 Translation details / Translate / Download translation
10 Template "evolution-2.2" in Evolution trunk10 Template "evolution-2.2" in Evolution trunk
11 Overview for Spanish translation11 Overview for Spanish translation
12 Contributors to this translation12 Contributors to this translation
@@ -27,7 +27,7 @@
27 ... print "%s:\n%s" % (extract_text(link), link['href'])27 ... print "%s:\n%s" % (extract_text(link), link['href'])
28 Translate:28 Translate:
29 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate29 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate
30 Download:30 Download translation:
31 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+export31 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+export
3232
33And has no actions menu:33And has no actions menu:
3434
=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt'
--- lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2009-07-01 20:45:39 +0000
+++ lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2009-09-15 18:53:26 +0000
@@ -78,9 +78,7 @@
7878
79 >>> print extract_text(find_main_content(79 >>> print extract_text(find_main_content(
80 ... browser.contents)).encode('ASCII', 'backslashreplace')80 ... browser.contents)).encode('ASCII', 'backslashreplace')
81 Description...81 Translating into Catalan...
82 Template "evolution-2.2" in Ubuntu Hoary package "evolution"
83 Translating into Catalan
84 ...82 ...
85 English: cards83 English: cards
86 ...84 ...
@@ -122,8 +120,6 @@
122120
123 >>> print extract_text(find_main_content(121 >>> print extract_text(find_main_content(
124 ... anon_browser.contents)).encode('ASCII', 'backslashreplace')122 ... anon_browser.contents)).encode('ASCII', 'backslashreplace')
125 Description...
126 Template "evolution-2.2" in Ubuntu Hoary package "evolution"
127 Browsing Catalan translation123 Browsing Catalan translation
128 ...124 ...
129 English: cards125 English: cards
@@ -252,7 +248,7 @@
252 ... '?field.alternative_language=zh')248 ... '?field.alternative_language=zh')
253 >>> content = find_main_content(browser.contents)249 >>> content = find_main_content(browser.contents)
254 >>> content.h1250 >>> content.h1
255 <h1>... Translating into Chuang; Zhuang...</h1>251 <h1>Translating into Chuang; Zhuang</h1>
256252
257 >>> browser.getControl(253 >>> browser.getControl(
258 ... name='field.alternative_language').displayValue254 ... name='field.alternative_language').displayValue
259255
=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt'
--- lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2009-07-02 17:16:50 +0000
+++ lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2009-09-15 18:53:26 +0000
@@ -43,8 +43,8 @@
43 >>> user_browser.open(43 >>> user_browser.open(
44 ... 'http://translations.launchpad.dev/ubuntu/hoary/'44 ... 'http://translations.launchpad.dev/ubuntu/hoary/'
45 ... '+source/evolution/+pots/evolution-2.2/es/+translate')45 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
46 >>> user_browser.title46 >>> print user_browser.title
47 'Translating evolution-2.2 in ... package "evolution" into Spanish'47 “evolution” package : Translations : 5.04 : Ubuntu
4848
49He can see that there are 22 messages.49He can see that there are 22 messages.
5050
@@ -118,8 +118,8 @@
118 ... '+source/evolution/+pots/evolution-2.2/en_AU/+translate')118 ... '+source/evolution/+pots/evolution-2.2/en_AU/+translate')
119 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']119 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
120 >>> user_browser.getControl('Change').click()120 >>> user_browser.getControl('Change').click()
121 >>> user_browser.title121 >>> print user_browser.title
122 'Translating evolution-2.2 in ... "evolution" into English (Australia)'122 “evolution” package : Translations : 5.04 : Ubuntu
123123
124 >>> contents = find_main_content(user_browser.contents)124 >>> contents = find_main_content(user_browser.contents)
125 >>> print_batch_header(contents)125 >>> print_batch_header(contents)
@@ -183,8 +183,8 @@
183 ... 'evolution/trunk/+pots/evolution-2.2/en_AU/+translate')183 ... 'evolution/trunk/+pots/evolution-2.2/en_AU/+translate')
184 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']184 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
185 >>> user_browser.getControl('Change').click()185 >>> user_browser.getControl('Change').click()
186 >>> user_browser.title186 >>> print user_browser.title
187 'Translating evolution-2.2 in Evolution trunk into English (Australia)'187 Translations : Series trunk : Evolution
188188
189 >>> contents = find_main_content(user_browser.contents)189 >>> contents = find_main_content(user_browser.contents)
190 >>> print_batch_header(contents)190 >>> print_batch_header(contents)
@@ -411,8 +411,7 @@
411411
412 >>> text = extract_text(find_main_content(user_browser.contents))412 >>> text = extract_text(find_main_content(user_browser.contents))
413 >>> print text.encode('UTF-8')413 >>> print text.encode('UTF-8')
414 Description...414 Translating...
415 Template ...
416 English: current addressbook folder415 English: current addressbook folder
417 Current Chinese (China): (no translation yet)416 Current Chinese (China): (no translation yet)
418 Suggestions:417 Suggestions:
419418
=== modified file 'lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt'
--- lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt 2009-09-12 07:25:21 +0000
+++ lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt 2009-09-15 16:33:12 +0000
@@ -44,7 +44,7 @@
4444
45 >>> user_browser.open(45 >>> user_browser.open(
46 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'46 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
47 ... 'evolution-2.2/cy')47 ... 'evolution-2.2/cy/+details')
48 >>> user_browser.getLink('Download').click()48 >>> user_browser.getLink('Download').click()
4949
50 >>> user_browser.getControl(name='format').value = ['PO']50 >>> user_browser.getControl(name='format').value = ['PO']
@@ -56,7 +56,6 @@
56 ... user_browser.contents, 'informational'):56 ... user_browser.contents, 'informational'):
57 ... print tag.renderContents()57 ... print tag.renderContents()
58 Your request has been received. Expect to receive an email shortly.58 Your request has been received. Expect to receive an email shortly.
59 ...
6059
61Since no-privileges person isn't a valid translator for Welsh (cy)60Since no-privileges person isn't a valid translator for Welsh (cy)
62language, the ownership of the newly created pofile is set to Rosetta61language, the ownership of the newly created pofile is set to Rosetta
@@ -64,7 +63,7 @@
6463
65 >>> anon_browser.open(64 >>> anon_browser.open(
66 ... 'http://translations.launchpad.dev/evolution'65 ... 'http://translations.launchpad.dev/evolution'
67 ... '/trunk/+pots/evolution-2.2/cy')66 ... '/trunk/+pots/evolution-2.2/cy/+details')
68 >>> translation_portlet = find_portlet(67 >>> translation_portlet = find_portlet(
69 ... anon_browser.contents, 'Translation file details')68 ... anon_browser.contents, 'Translation file details')
70 >>> t = extract_text(69 >>> t = extract_text(
@@ -80,7 +79,7 @@
80 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')79 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
81 >>> browser.open(80 >>> browser.open(
82 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'81 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
83 ... 'evolution-2.2/sv')82 ... 'evolution-2.2/sv/+details')
84 >>> browser.getLink('Download').click()83 >>> browser.getLink('Download').click()
8584
86 >>> browser.getControl(name='format').value = ['PO']85 >>> browser.getControl(name='format').value = ['PO']
@@ -91,8 +90,10 @@
91 >>> for tag in find_tags_by_class(browser.contents, 'informational'):90 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
92 ... tag.renderContents()91 ... tag.renderContents()
93 'Your request has been received. Expect to receive an email shortly.'92 'Your request has been received. Expect to receive an email shortly.'
94 ...
9593
94 >>> browser.open(
95 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
96 ... 'evolution-2.2/sv/+details')
96 >>> translation_portlet = find_portlet(97 >>> translation_portlet = find_portlet(
97 ... browser.contents, 'Translation file details')98 ... browser.contents, 'Translation file details')
98 >>> carlos = u'Carlos Perell\xf3 Mar\xedn'99 >>> carlos = u'Carlos Perell\xf3 Mar\xedn'
@@ -114,5 +115,4 @@
114 >>> for tag in find_tags_by_class(browser.contents, 'informational'):115 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
115 ... tag.renderContents()116 ... tag.renderContents()
116 'Your request has been received. Expect to receive an email shortly.'117 'Your request has been received. Expect to receive an email shortly.'
117 ...
118118
119119
=== modified file 'lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt'
--- lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt 2009-08-31 22:13:07 +0000
+++ lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt 2009-09-15 18:53:26 +0000
@@ -138,7 +138,7 @@
138 ... '+pots/evolution-2.2/cy/+translate')138 ... '+pots/evolution-2.2/cy/+translate')
139139
140 >>> print_menu_option(browser.contents, 'upload')140 >>> print_menu_option(browser.contents, 'upload')
141 <...Upload a file...141 Upload translation
142142
143No Privileges person is going to translate here. Message number 137 is143No Privileges person is going to translate here. Message number 137 is
144not yet translated.144not yet translated.
145145
=== modified file 'lib/lp/translations/templates/pofile-translate.pt'
--- lib/lp/translations/templates/pofile-translate.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/translations/templates/pofile-translate.pt 2009-09-14 16:19:15 +0000
@@ -3,10 +3,7 @@
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 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/searchless"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="view/macro:page/onecolumn"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
12 <body>9 <body>
@@ -75,34 +72,12 @@
75 tal:condition="view/translation_group"72 tal:condition="view/translation_group"
76 tal:content="string:var documentation_cookie =73 tal:content="string:var documentation_cookie =
77 '${view/translation_group/name}' + '_' +74 '${view/translation_group/name}' + '_' +
78 '${context/language/code}';" />75 '${context/language/code}';">
76 </script>
79 <script type="text/javascript"77 <script type="text/javascript"
80 tal:condition="not:view/translation_group"78 tal:condition="not:view/translation_group"
81 tal:content="string:var documentation_cookie = 'others';" />79 tal:content="string:var documentation_cookie = 'others';">
82 <div>80 </script>
83 <a tal:attributes="href context/potemplate/fmt:url"
84 tal:content="context/potemplate/title">
85 evolution 2.10 template
86 </a>
87 </div>
88
89 <tal:form-not-writeable condition="not:view/form_is_writeable">
90 <h1>
91 Browsing
92 <tal:language replace="context/language/englishname">
93 Spanish
94 </tal:language>
95 translation
96 </h1>
97 </tal:form-not-writeable>
98 <tal:form-writeable condition="view/form_is_writeable">
99 <h1>
100 Translating into
101 <tal:language replace="context/language/englishname">
102 Spanish
103 </tal:language>
104 </h1>
105 </tal:form-writeable>
10681
107 <!-- Documentation links -->82 <!-- Documentation links -->
108 <tal:documentation condition="view/translation_group">83 <tal:documentation condition="view/translation_group">
@@ -151,8 +126,8 @@
151 <tal:havepluralforms condition="view/has_plural_form_information">126 <tal:havepluralforms condition="view/has_plural_form_information">
152127
153 <!-- Search box -->128 <!-- Search box -->
154 <form id="search_form" method="get" style="float: right;"129 <div style="float: right;">
155 action="+translate">130 <form id="search_form" method="get" action="+translate">
156 <tal:comment condition="nothing">131 <tal:comment condition="nothing">
157 the hidden elements132 the hidden elements
158 </tal:comment>133 </tal:comment>
@@ -164,6 +139,24 @@
164 title="Enter text to search for"139 title="Enter text to search for"
165 tal:attributes="value view/search_text" />140 tal:attributes="value view/search_text" />
166 </form>141 </form>
142 </div>
143
144 <!-- Navigation -->
145 <ul class="horizontal" style="margin-top: 1em; margin-bottom: 1em;"
146 tal:define="navigation_menu context/menu:navigation">
147 <li
148 tal:define="link navigation_menu/download"
149 tal:condition="link/enabled"
150 tal:content="structure link/render"></li>
151 <li
152 tal:define="link navigation_menu/upload"
153 tal:condition="link/enabled"
154 tal:content="structure link/render"></li>
155 <li
156 tal:define="link navigation_menu/details"
157 tal:condition="link/enabled"
158 tal:content="structure link/render"></li>
159 </ul>
167160
168 <!-- View filter and suggestions from alternative language. -->161 <!-- View filter and suggestions from alternative language. -->
169 <form method="get" style="text-align: left;" action="+translate">162 <form method="get" style="text-align: left;" action="+translate">
@@ -186,7 +179,6 @@
186 'translated'.179 'translated'.
187 </tal:comment>180 </tal:comment>
188181
189 <p>
190 <label>182 <label>
191 Translating183 Translating
192 <tal:XXX tal:replace="nothing">184 <tal:XXX tal:replace="nothing">
@@ -237,8 +229,7 @@
237 </tal:comment>229 </tal:comment>
238 <tal:language-widget230 <tal:language-widget
239 content="structure view/alternative_language_widget" />231 content="structure view/alternative_language_widget" />
240 as a guide</label>232 as a guide.</label>
241 </p>
242 <input type="hidden" name="old_show" value=""233 <input type="hidden" name="old_show" value=""
243 tal:attributes="value view/show" />234 tal:attributes="value view/show" />
244 <input type="submit" value="Change" />235 <input type="submit" value="Change" />