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
1=== modified file 'lib/canonical/launchpad/pagetitles.py'
2--- lib/canonical/launchpad/pagetitles.py 2009-09-15 05:45:10 +0000
3+++ lib/canonical/launchpad/pagetitles.py 2009-09-15 16:52:45 +0000
4@@ -719,11 +719,6 @@
5
6 pofile_index = ContextTitle(smartquote('Translation overview for "%s"'))
7
8-def pofile_translate(context, view):
9- """Return the page to translate a template into a language."""
10- return 'Translating %s into %s' % (
11- context.potemplate.displayname, context.language.englishname)
12-
13 # portlet_* are portlets
14
15 poll_edit = ContextTitle(smartquote('Edit poll "%s"'))
16
17=== modified file 'lib/lp/translations/browser/configure.zcml'
18--- lib/lp/translations/browser/configure.zcml 2009-09-14 15:41:21 +0000
19+++ lib/lp/translations/browser/configure.zcml 2009-09-15 16:52:45 +0000
20@@ -201,7 +201,7 @@
21 POFileNavigationMenu"/>
22 <browser:defaultView
23 for="lp.translations.interfaces.pofile.IPOFile"
24- name="+index"
25+ name="+translate"
26 layer="canonical.launchpad.layers.TranslationsLayer"/>
27 <browser:pages
28 for="lp.translations.interfaces.pofile.IPOFile"
29@@ -209,11 +209,9 @@
30 class="lp.translations.browser.pofile.POFileView"
31 layer="canonical.launchpad.layers.TranslationsLayer">
32 <browser:page
33- name="+index"
34+ name="+details"
35 template="../templates/pofile-index.pt"/>
36-
37 <!-- POFile Portlets -->
38-
39 <browser:page
40 name="+contributors"
41 template="../templates/pofile-translate-contributors.pt"/>
42
43=== modified file 'lib/lp/translations/browser/pofile.py'
44--- lib/lp/translations/browser/pofile.py 2009-09-10 09:57:58 +0000
45+++ lib/lp/translations/browser/pofile.py 2009-09-15 18:53:26 +0000
46@@ -111,9 +111,9 @@
47 class POFileMenuMixin:
48 """Mixin class to share code between navigation and action menus."""
49
50- def description(self):
51- text = 'Description'
52- return Link('', text)
53+ def details(self):
54+ text = 'Translation details'
55+ return Link('+details', text, icon='info')
56
57 def translate(self):
58 text = 'Translate'
59@@ -121,11 +121,11 @@
60
61 @enabled_with_permission('launchpad.Edit')
62 def upload(self):
63- text = 'Upload a file'
64- return Link('+upload', text, icon='edit')
65+ text = 'Upload translation'
66+ return Link('+upload', text, icon='add')
67
68 def download(self):
69- text = 'Download'
70+ text = 'Download translation'
71 return Link('+export', text, icon='download')
72
73
74@@ -133,7 +133,7 @@
75 """Navigation menus for `IPOFile` objects."""
76 usedfor = IPOFile
77 facet = 'translations'
78- links = ('description', 'translate', 'upload', 'download')
79+ links = ('details', 'translate', 'upload', 'download')
80
81
82 class POFileBaseView(LaunchpadView):
83@@ -659,6 +659,15 @@
84 DEFAULT_SHOW = 'all'
85 DEFAULT_SIZE = 10
86
87+ @property
88+ def label(self):
89+ """Return the page to translate a template into a language."""
90+ if self.form_is_writeable:
91+ form_label = 'Translating into %s'
92+ else:
93+ form_label = 'Browsing %s translation'
94+ return form_label % self.context.language.englishname
95+
96 def initialize(self):
97 self.pofile = self.context
98 translations_person = ITranslationsPerson(self.user, None)
99
100=== renamed file 'lib/canonical/launchpad/doc/menu-pages.txt' => 'lib/lp/translations/browser/tests/menu-pages.txt'
101--- lib/canonical/launchpad/doc/menu-pages.txt 2009-09-11 18:02:33 +0000
102+++ lib/lp/translations/browser/tests/menu-pages.txt 2009-09-15 18:53:26 +0000
103@@ -87,10 +87,10 @@
104 'http://translations.../evolution/trunk/+pots/evolution-2.2/es'
105
106 >>> print_menu_view_links(nav_menu_view)
107- http://translations.../evolution/trunk/+pots/evolution-2.2/es
108- name: description
109+ http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
110+ name: details
111 enabled: True
112- linked: False
113+ linked: True
114 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
115 name: translate
116 enabled: True
117@@ -117,8 +117,8 @@
118
119 >>> nav_menu_view.initialize()
120 >>> print_menu_view_links(nav_menu_view)
121- http://translations.../evolution/trunk/+pots/evolution-2.2/es
122- name: description
123+ http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
124+ name: details
125 enabled: True
126 linked: True
127 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
128@@ -142,14 +142,14 @@
129 >>> from lp.translations.browser.pofile import POFileNavigationMenu
130
131 >>> original_enable_only = POFileNavigationMenu.enable_only
132- >>> POFileNavigationMenu.enable_only = ['description', 'translate']
133+ >>> POFileNavigationMenu.enable_only = ['details', 'translate']
134 >>> config.devmode
135 True
136
137 >>> nav_menu_view.initialize()
138 >>> print_menu_view_links(nav_menu_view)
139- http://translations.../evolution/trunk/+pots/evolution-2.2/es
140- name: description
141+ http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
142+ name: details
143 enabled: True
144 linked: True
145 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
146@@ -172,8 +172,8 @@
147
148 >>> nav_menu_view.initialize()
149 >>> print_menu_view_links(nav_menu_view)
150- http://translations.../evolution/trunk/+pots/evolution-2.2/es
151- name: description
152+ http://translations.../evolution/trunk/+pots/evolution-2.2/es/+details
153+ name: details
154 enabled: True
155 linked: True
156 http://translations.../evolution/trunk/+pots/evolution-2.2/es/+translate
157
158=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
159--- lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-11 10:38:49 +0000
160+++ lib/lp/translations/browser/tests/test_breadcrumbs.py 2009-09-14 16:19:15 +0000
161@@ -158,5 +158,27 @@
162 ["Crumb Tester", "Series test", "Translations", "Serbian (sr)"])
163
164
165+class TestPOFileBreadcrumbs(BaseTranslationsBreadcrumbTestCase):
166+
167+ def setUp(self):
168+ super(TestPOFileBreadcrumbs, self).setUp()
169+ self.language = getUtility(ILanguageSet)['eo']
170+ self.product = self.factory.makeProduct(
171+ name='crumb-tester', displayname="Crumb Tester")
172+ self.series = self.factory.makeProductSeries(
173+ name="test", product=self.product)
174+ self.potemplate = self.factory.makePOTemplate(self.series,
175+ name="test-template")
176+ self.pofile = self.factory.makePOFile('eo', self.potemplate)
177+
178+ def test_pofiletranslate(self):
179+ self._testContextBreadcrumbs(
180+ [self.product, self.series, self.potemplate, self.pofile],
181+ ["http://launchpad.dev/crumb-tester",
182+ "http://launchpad.dev/crumb-tester/test",
183+ "http://translations.launchpad.dev/crumb-tester/test"],
184+ ["Crumb Tester", "Series test", "Translations"])
185+
186+
187 def test_suite():
188 return unittest.TestLoader().loadTestsFromName(__name__)
189
190=== modified file 'lib/lp/translations/configure.zcml'
191--- lib/lp/translations/configure.zcml 2009-09-10 10:50:55 +0000
192+++ lib/lp/translations/configure.zcml 2009-09-14 16:19:15 +0000
193@@ -320,6 +320,15 @@
194 for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"
195 provides="lp.translations.interfaces.translationimporter.ITranslationFormatImporter"
196 factory="lp.translations.utilities.mozilla_xpi_importer.MozillaXpiImporter"/>
197+
198+ <!-- PO File -->
199+
200+ <adapter
201+ name="translations"
202+ provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
203+ for="lp.translations.interfaces.pofile.IPOFile"
204+ factory="lp.translations.browser.translations.TranslationsLanguageBreadcrumb"
205+ permission="zope.Public"/>
206 <facet
207 facet="translations">
208 <class
209
210=== modified file 'lib/lp/translations/stories/navigation-links/pofile.txt'
211--- lib/lp/translations/stories/navigation-links/pofile.txt 2009-07-01 20:45:39 +0000
212+++ lib/lp/translations/stories/navigation-links/pofile.txt 2009-09-15 16:33:12 +0000
213@@ -21,14 +21,6 @@
214 * Translations (selected) - http://translations.launchpad.dev/evolution/trunk
215 * Answers - not linked
216
217-But the navigation links should point to IPOFile urls.
218-
219- >>> print_navigation_links(admin_browser.contents)
220- Description
221- Translate: http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate
222- Upload a file: http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+upload
223- Download: http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+export
224-
225 Taking an IPOFile for ISourcePackage context:
226
227 >>> admin_browser.open(
228@@ -47,10 +39,3 @@
229 * Translations (selected) - http://translations.launchpad.dev/ubuntu/hoary/+source/evolution
230 * Answers - http://answers.launchpad.dev/ubuntu/hoary/+source/evolution
231
232-But the navigation links should point to IPOFile urls.
233-
234- >>> print_navigation_links(admin_browser.contents)
235- Description
236- Translate: http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate
237- Upload a file: http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+upload
238- Download: http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+export
239
240=== modified file 'lib/lp/translations/stories/standalone/xx-licensing.txt'
241--- lib/lp/translations/stories/standalone/xx-licensing.txt 2009-09-12 07:25:21 +0000
242+++ lib/lp/translations/stories/standalone/xx-licensing.txt 2009-09-15 18:53:26 +0000
243@@ -94,8 +94,8 @@
244 ... '+pots/alsa-utils/es/+translate')
245 >>> browser.url
246 'http://.../alsa-utils/trunk/+pots/alsa-utils/es/+translate'
247- >>> browser.title
248- 'Translating alsa-utils in alsa-utils trunk into Spanish'
249+ >>> print browser.title
250+ Translations : Series trunk : alsa-utils
251
252
253 == Permissions ==
254
255=== renamed file 'lib/lp/translations/stories/standalone/xx-pofile-index.txt' => 'lib/lp/translations/stories/standalone/xx-pofile-details.txt'
256--- lib/lp/translations/stories/standalone/xx-pofile-index.txt 2009-09-12 07:25:21 +0000
257+++ lib/lp/translations/stories/standalone/xx-pofile-details.txt 2009-09-15 18:53:26 +0000
258@@ -3,10 +3,10 @@
259
260 >>> anon_browser.open(
261 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
262- ... 'evolution-2.2/es')
263+ ... 'evolution-2.2/es/+details')
264 >>> print extract_text(find_main_content(anon_browser.contents)).encode(
265 ... 'ascii', 'backslashreplace')
266- Description / Translate / Download
267+ Translation details / Translate / Download translation
268 Template "evolution-2.2" in Evolution trunk
269 Overview for Spanish translation
270 Contributors to this translation
271@@ -27,7 +27,7 @@
272 ... print "%s:\n%s" % (extract_text(link), link['href'])
273 Translate:
274 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate
275- Download:
276+ Download translation:
277 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+export
278
279 And has no actions menu:
280
281=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt'
282--- lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2009-07-01 20:45:39 +0000
283+++ lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2009-09-15 18:53:26 +0000
284@@ -78,9 +78,7 @@
285
286 >>> print extract_text(find_main_content(
287 ... browser.contents)).encode('ASCII', 'backslashreplace')
288- Description...
289- Template "evolution-2.2" in Ubuntu Hoary package "evolution"
290- Translating into Catalan
291+ Translating into Catalan...
292 ...
293 English: cards
294 ...
295@@ -122,8 +120,6 @@
296
297 >>> print extract_text(find_main_content(
298 ... anon_browser.contents)).encode('ASCII', 'backslashreplace')
299- Description...
300- Template "evolution-2.2" in Ubuntu Hoary package "evolution"
301 Browsing Catalan translation
302 ...
303 English: cards
304@@ -252,7 +248,7 @@
305 ... '?field.alternative_language=zh')
306 >>> content = find_main_content(browser.contents)
307 >>> content.h1
308- <h1>... Translating into Chuang; Zhuang...</h1>
309+ <h1>Translating into Chuang; Zhuang</h1>
310
311 >>> browser.getControl(
312 ... name='field.alternative_language').displayValue
313
314=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt'
315--- lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2009-07-02 17:16:50 +0000
316+++ lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2009-09-15 18:53:26 +0000
317@@ -43,8 +43,8 @@
318 >>> user_browser.open(
319 ... 'http://translations.launchpad.dev/ubuntu/hoary/'
320 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
321- >>> user_browser.title
322- 'Translating evolution-2.2 in ... package "evolution" into Spanish'
323+ >>> print user_browser.title
324+ “evolution” package : Translations : 5.04 : Ubuntu
325
326 He can see that there are 22 messages.
327
328@@ -118,8 +118,8 @@
329 ... '+source/evolution/+pots/evolution-2.2/en_AU/+translate')
330 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
331 >>> user_browser.getControl('Change').click()
332- >>> user_browser.title
333- 'Translating evolution-2.2 in ... "evolution" into English (Australia)'
334+ >>> print user_browser.title
335+ “evolution” package : Translations : 5.04 : Ubuntu
336
337 >>> contents = find_main_content(user_browser.contents)
338 >>> print_batch_header(contents)
339@@ -183,8 +183,8 @@
340 ... 'evolution/trunk/+pots/evolution-2.2/en_AU/+translate')
341 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
342 >>> user_browser.getControl('Change').click()
343- >>> user_browser.title
344- 'Translating evolution-2.2 in Evolution trunk into English (Australia)'
345+ >>> print user_browser.title
346+ Translations : Series trunk : Evolution
347
348 >>> contents = find_main_content(user_browser.contents)
349 >>> print_batch_header(contents)
350@@ -411,8 +411,7 @@
351
352 >>> text = extract_text(find_main_content(user_browser.contents))
353 >>> print text.encode('UTF-8')
354- Description...
355- Template ...
356+ Translating...
357 English: current addressbook folder
358 Current Chinese (China): (no translation yet)
359 Suggestions:
360
361=== modified file 'lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt'
362--- lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt 2009-09-12 07:25:21 +0000
363+++ lib/lp/translations/stories/standalone/xx-rosetta-pofile-export.txt 2009-09-15 16:33:12 +0000
364@@ -44,7 +44,7 @@
365
366 >>> user_browser.open(
367 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
368- ... 'evolution-2.2/cy')
369+ ... 'evolution-2.2/cy/+details')
370 >>> user_browser.getLink('Download').click()
371
372 >>> user_browser.getControl(name='format').value = ['PO']
373@@ -56,7 +56,6 @@
374 ... user_browser.contents, 'informational'):
375 ... print tag.renderContents()
376 Your request has been received. Expect to receive an email shortly.
377- ...
378
379 Since no-privileges person isn't a valid translator for Welsh (cy)
380 language, the ownership of the newly created pofile is set to Rosetta
381@@ -64,7 +63,7 @@
382
383 >>> anon_browser.open(
384 ... 'http://translations.launchpad.dev/evolution'
385- ... '/trunk/+pots/evolution-2.2/cy')
386+ ... '/trunk/+pots/evolution-2.2/cy/+details')
387 >>> translation_portlet = find_portlet(
388 ... anon_browser.contents, 'Translation file details')
389 >>> t = extract_text(
390@@ -80,7 +79,7 @@
391 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
392 >>> browser.open(
393 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
394- ... 'evolution-2.2/sv')
395+ ... 'evolution-2.2/sv/+details')
396 >>> browser.getLink('Download').click()
397
398 >>> browser.getControl(name='format').value = ['PO']
399@@ -91,8 +90,10 @@
400 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
401 ... tag.renderContents()
402 'Your request has been received. Expect to receive an email shortly.'
403- ...
404
405+ >>> browser.open(
406+ ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
407+ ... 'evolution-2.2/sv/+details')
408 >>> translation_portlet = find_portlet(
409 ... browser.contents, 'Translation file details')
410 >>> carlos = u'Carlos Perell\xf3 Mar\xedn'
411@@ -114,5 +115,4 @@
412 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
413 ... tag.renderContents()
414 'Your request has been received. Expect to receive an email shortly.'
415- ...
416
417
418=== modified file 'lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt'
419--- lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt 2009-08-31 22:13:07 +0000
420+++ lib/lp/translations/stories/translationgroups/45-test-distro-restricted-permissions.txt 2009-09-15 18:53:26 +0000
421@@ -138,7 +138,7 @@
422 ... '+pots/evolution-2.2/cy/+translate')
423
424 >>> print_menu_option(browser.contents, 'upload')
425- <...Upload a file...
426+ Upload translation
427
428 No Privileges person is going to translate here. Message number 137 is
429 not yet translated.
430
431=== modified file 'lib/lp/translations/templates/pofile-translate.pt'
432--- lib/lp/translations/templates/pofile-translate.pt 2009-07-17 17:59:07 +0000
433+++ lib/lp/translations/templates/pofile-translate.pt 2009-09-14 16:19:15 +0000
434@@ -3,10 +3,7 @@
435 xmlns:tal="http://xml.zope.org/namespaces/tal"
436 xmlns:metal="http://xml.zope.org/namespaces/metal"
437 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
438- xml:lang="en"
439- lang="en"
440- dir="ltr"
441- metal:use-macro="view/macro:page/onecolumn"
442+ metal:use-macro="view/macro:page/searchless"
443 i18n:domain="launchpad"
444 >
445 <body>
446@@ -75,34 +72,12 @@
447 tal:condition="view/translation_group"
448 tal:content="string:var documentation_cookie =
449 '${view/translation_group/name}' + '_' +
450- '${context/language/code}';" />
451+ '${context/language/code}';">
452+ </script>
453 <script type="text/javascript"
454 tal:condition="not:view/translation_group"
455- tal:content="string:var documentation_cookie = 'others';" />
456- <div>
457- <a tal:attributes="href context/potemplate/fmt:url"
458- tal:content="context/potemplate/title">
459- evolution 2.10 template
460- </a>
461- </div>
462-
463- <tal:form-not-writeable condition="not:view/form_is_writeable">
464- <h1>
465- Browsing
466- <tal:language replace="context/language/englishname">
467- Spanish
468- </tal:language>
469- translation
470- </h1>
471- </tal:form-not-writeable>
472- <tal:form-writeable condition="view/form_is_writeable">
473- <h1>
474- Translating into
475- <tal:language replace="context/language/englishname">
476- Spanish
477- </tal:language>
478- </h1>
479- </tal:form-writeable>
480+ tal:content="string:var documentation_cookie = 'others';">
481+ </script>
482
483 <!-- Documentation links -->
484 <tal:documentation condition="view/translation_group">
485@@ -151,8 +126,8 @@
486 <tal:havepluralforms condition="view/has_plural_form_information">
487
488 <!-- Search box -->
489- <form id="search_form" method="get" style="float: right;"
490- action="+translate">
491+ <div style="float: right;">
492+ <form id="search_form" method="get" action="+translate">
493 <tal:comment condition="nothing">
494 the hidden elements
495 </tal:comment>
496@@ -164,6 +139,24 @@
497 title="Enter text to search for"
498 tal:attributes="value view/search_text" />
499 </form>
500+ </div>
501+
502+ <!-- Navigation -->
503+ <ul class="horizontal" style="margin-top: 1em; margin-bottom: 1em;"
504+ tal:define="navigation_menu context/menu:navigation">
505+ <li
506+ tal:define="link navigation_menu/download"
507+ tal:condition="link/enabled"
508+ tal:content="structure link/render"></li>
509+ <li
510+ tal:define="link navigation_menu/upload"
511+ tal:condition="link/enabled"
512+ tal:content="structure link/render"></li>
513+ <li
514+ tal:define="link navigation_menu/details"
515+ tal:condition="link/enabled"
516+ tal:content="structure link/render"></li>
517+ </ul>
518
519 <!-- View filter and suggestions from alternative language. -->
520 <form method="get" style="text-align: left;" action="+translate">
521@@ -186,7 +179,6 @@
522 'translated'.
523 </tal:comment>
524
525- <p>
526 <label>
527 Translating
528 <tal:XXX tal:replace="nothing">
529@@ -237,8 +229,7 @@
530 </tal:comment>
531 <tal:language-widget
532 content="structure view/alternative_language_widget" />
533- as a guide</label>
534- </p>
535+ as a guide.</label>
536 <input type="hidden" name="old_show" value=""
537 tal:attributes="value view/show" />
538 <input type="submit" value="Change" />