Merge lp:~adiroiban/launchpad/bug-431249 into lp:launchpad
- bug-431249
- Merge into devel
Proposed by
Adi Roiban
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~adiroiban/launchpad/bug-431249 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
365 lines (+142/-50) 8 files modified
lib/lp/translations/browser/configure.zcml (+3/-2) lib/lp/translations/stories/standalone/xx-pofile-translate.txt (+54/-6) lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt (+53/-7) lib/lp/translations/templates/currenttranslationmessage-translate-one.pt (+2/-2) lib/lp/translations/templates/pofile-translate.pt (+2/-15) lib/lp/translations/templates/translationmessage-suggestions.pt (+1/-1) lib/lp/translations/templates/translationmessage-translate.pt (+2/-15) lib/lp/translations/templates/translations-macros.pt (+25/-2) |
||||
To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-431249 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+15767@code.launchpad.net |
Commit message
Create a macro for navigation links from pofile-translate.pt and translationmess
Description of the change
To post a comment you must log in.
Revision history for this message
Adi Roiban (adiroiban) wrote : | # |
Revision history for this message
Aaron Bentley (abentley) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/translations/browser/configure.zcml' | |||
2 | --- lib/lp/translations/browser/configure.zcml 2009-11-13 22:33:06 +0000 | |||
3 | +++ lib/lp/translations/browser/configure.zcml 2009-12-07 19:05:37 +0000 | |||
4 | @@ -69,10 +69,11 @@ | |||
5 | 69 | layer="canonical.launchpad.layers.TranslationsLayer"/> | 69 | layer="canonical.launchpad.layers.TranslationsLayer"/> |
6 | 70 | <browser:page | 70 | <browser:page |
7 | 71 | for="*" | 71 | for="*" |
9 | 72 | name="+translationmessage-macros" | 72 | name="+translations-macros" |
10 | 73 | facet="translations" | 73 | facet="translations" |
11 | 74 | permission="zope.Public" | 74 | permission="zope.Public" |
13 | 75 | template="../templates/translationmessage-macros.pt"/> | 75 | template="../templates/translations-macros.pt" |
14 | 76 | layer="canonical.launchpad.layers.TranslationsLayer"/> | ||
15 | 76 | <browser:page | 77 | <browser:page |
16 | 77 | for="lp.translations.interfaces.translationgroup.IHasTranslationGroup" | 78 | for="lp.translations.interfaces.translationgroup.IHasTranslationGroup" |
17 | 78 | facet="translations" | 79 | facet="translations" |
18 | 79 | 80 | ||
19 | === modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate.txt' | |||
20 | --- lib/lp/translations/stories/standalone/xx-pofile-translate.txt 2009-07-01 20:45:39 +0000 | |||
21 | +++ lib/lp/translations/stories/standalone/xx-pofile-translate.txt 2009-12-07 19:05:37 +0000 | |||
22 | @@ -1,4 +1,7 @@ | |||
24 | 1 | = Translation Submissions = | 1 | |
25 | 2 | |||
26 | 3 | Translation Submissions | ||
27 | 4 | ======================= | ||
28 | 2 | 5 | ||
29 | 3 | This pagetest is used to check general behaviour of IPOFile translation | 6 | This pagetest is used to check general behaviour of IPOFile translation |
30 | 4 | submissions. | 7 | submissions. |
31 | @@ -15,10 +18,11 @@ | |||
32 | 15 | xx-pofile-translate-performance.txt | 18 | xx-pofile-translate-performance.txt |
33 | 16 | 19 | ||
34 | 17 | 20 | ||
36 | 18 | == Anonymous access == | 21 | Anonymous access |
37 | 22 | ---------------- | ||
38 | 19 | 23 | ||
41 | 20 | Anonymous users are able to browse translations, but not to change them through | 24 | Anonymous users are able to browse translations, but not to change them |
42 | 21 | the translation form. | 25 | through the translation form. |
43 | 22 | 26 | ||
44 | 23 | >>> browser.open( | 27 | >>> browser.open( |
45 | 24 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/' | 28 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/' |
46 | @@ -35,6 +39,22 @@ | |||
47 | 35 | >>> for input in main_content.findAll('input'): | 39 | >>> for input in main_content.findAll('input'): |
48 | 36 | ... print 'Found input:\n%s' % input | 40 | ... print 'Found input:\n%s' % input |
49 | 37 | 41 | ||
50 | 42 | As an anynoymous user you will have access to the download and details | ||
51 | 43 | pages for the pofile this message belongs to. The link to upload page | ||
52 | 44 | should not be in that list. | ||
53 | 45 | |||
54 | 46 | >>> nav = find_tag_by_id(browser.contents, 'nav-pofile-subpages') | ||
55 | 47 | >>> print extract_text(nav) | ||
56 | 48 | Download translation Translation details | ||
57 | 49 | |||
58 | 50 | Download translations and Translation details should linked to the proper | ||
59 | 51 | pages | ||
60 | 52 | |||
61 | 53 | >> print nav.getLink("Download translation").url | ||
62 | 54 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+export | ||
63 | 55 | >> print nav.getLink("Translation details").url | ||
64 | 56 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+details | ||
65 | 57 | |||
66 | 38 | Rendering the form in read-only mode does not actually stop an anonymous | 58 | Rendering the form in read-only mode does not actually stop an anonymous |
67 | 39 | visitor (e.g. a spam bot, or a user whose login has expired) from submitting | 59 | visitor (e.g. a spam bot, or a user whose login has expired) from submitting |
68 | 40 | data. That part is more convenience than security. The server does not | 60 | data. That part is more convenience than security. The server does not |
69 | @@ -53,7 +73,34 @@ | |||
70 | 53 | our licensing terms cannot do POST submissions... | 73 | our licensing terms cannot do POST submissions... |
71 | 54 | 74 | ||
72 | 55 | 75 | ||
74 | 56 | == Requesting English and its variant languages == | 76 | Translation Admin Access |
75 | 77 | ------------------------ | ||
76 | 78 | |||
77 | 79 | Let's log in. | ||
78 | 80 | |||
79 | 81 | >>> admin_browser.open( | ||
80 | 82 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/' | ||
81 | 83 | ... 'evolution/+pots/evolution-2.2/es/+translate') | ||
82 | 84 | |||
83 | 85 | As a translation admin you will have access to the download, upload | ||
84 | 86 | and details pages for the pofile this message belongs to. | ||
85 | 87 | |||
86 | 88 | >>> nav = find_tag_by_id(admin_browser.contents, 'nav-pofile-subpages') | ||
87 | 89 | >>> print extract_text(nav) | ||
88 | 90 | Download translation Upload translation Translation details | ||
89 | 91 | |||
90 | 92 | All those links should linked the proper pages | ||
91 | 93 | |||
92 | 94 | >> print nav.getLink("Download translation").url | ||
93 | 95 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+export | ||
94 | 96 | >> print nav.getLink("Upload translation").url | ||
95 | 97 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+upload | ||
96 | 98 | >> print nav.getLink("Translation details").url | ||
97 | 99 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+details | ||
98 | 100 | |||
99 | 101 | |||
100 | 102 | Requesting English and its variant languages | ||
101 | 103 | -------------------------------------------- | ||
102 | 57 | 104 | ||
103 | 58 | English is not translatable since we store the untranslated messages | 105 | English is not translatable since we store the untranslated messages |
104 | 59 | as English. The translate view uses often uses two languages during | 106 | as English. The translate view uses often uses two languages during |
105 | @@ -77,7 +124,8 @@ | |||
106 | 77 | the 'make suggestions from' feature. | 124 | the 'make suggestions from' feature. |
107 | 78 | 125 | ||
108 | 79 | 126 | ||
110 | 80 | == Form elements == | 127 | Form elements |
111 | 128 | ------------- | ||
112 | 81 | 129 | ||
113 | 82 | Because the server does not remember what forms it served to whom, it is | 130 | Because the server does not remember what forms it served to whom, it is |
114 | 83 | essential that every form element identifier provide all the context the | 131 | essential that every form element identifier provide all the context the |
115 | 84 | 132 | ||
116 | === modified file 'lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt' | |||
117 | --- lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt 2009-07-17 16:38:54 +0000 | |||
118 | +++ lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt 2009-12-07 19:05:37 +0000 | |||
119 | @@ -1,12 +1,20 @@ | |||
120 | 1 | |||
121 | 2 | Here is the story for translating a single message | ||
122 | 3 | ================================================== | ||
123 | 4 | |||
124 | 1 | Here we are going to check the basic behaviour of the translation form when we | 5 | Here we are going to check the basic behaviour of the translation form when we |
125 | 2 | render just one message with all available information for it. | 6 | render just one message with all available information for it. |
126 | 3 | 7 | ||
127 | 8 | |||
128 | 9 | Getting there | ||
129 | 10 | ------------- | ||
130 | 11 | |||
131 | 4 | First, we need to be sure that anonymous users are able to browse translations | 12 | First, we need to be sure that anonymous users are able to browse translations |
132 | 5 | but are unable to actually change them. | 13 | but are unable to actually change them. |
133 | 6 | 14 | ||
137 | 7 | >>> browser.open( | 15 | >>> browser.open( |
138 | 8 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/' | 16 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/' |
139 | 9 | ... '+pots/evolution-2.2/es/5') | 17 | ... 'evolution/+pots/evolution-2.2/es/5') |
140 | 10 | 18 | ||
141 | 11 | We are in read only mode, so there shouldn't be any textareas: | 19 | We are in read only mode, so there shouldn't be any textareas: |
142 | 12 | 20 | ||
143 | @@ -19,6 +27,22 @@ | |||
144 | 19 | >>> for input in main_content.findAll('input'): | 27 | >>> for input in main_content.findAll('input'): |
145 | 20 | ... raise AssertionError, 'Found input:\n%s' % input | 28 | ... raise AssertionError, 'Found input:\n%s' % input |
146 | 21 | 29 | ||
147 | 30 | As an anynoymous user you will have access to the download and details | ||
148 | 31 | pages for the pofile this message belongs to. The link to upload page | ||
149 | 32 | should not be in that list. | ||
150 | 33 | |||
151 | 34 | >>> nav = find_tag_by_id(browser.contents, 'nav-pofile-subpages') | ||
152 | 35 | >>> print extract_text(nav) | ||
153 | 36 | Download translation Translation details | ||
154 | 37 | |||
155 | 38 | Download translations and Translation details should linked to the proper | ||
156 | 39 | pages | ||
157 | 40 | |||
158 | 41 | >> print nav.getLink("Download translation").url | ||
159 | 42 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+export | ||
160 | 43 | >> print nav.getLink("Translation details").url | ||
161 | 44 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+details | ||
162 | 45 | |||
163 | 22 | Also, any anonymous POST submission should fail: | 46 | Also, any anonymous POST submission should fail: |
164 | 23 | 47 | ||
165 | 24 | >>> print http(r""" | 48 | >>> print http(r""" |
166 | @@ -125,6 +149,22 @@ | |||
167 | 125 | >>> print browser.getLink('Last').url | 149 | >>> print browser.getLink('Last').url |
168 | 126 | http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/22/+translate | 150 | http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/22/+translate |
169 | 127 | 151 | ||
170 | 152 | As a translation admin you will have access to the download, upload | ||
171 | 153 | and details pages for the pofile this message belongs to. | ||
172 | 154 | |||
173 | 155 | >>> nav = find_tag_by_id(browser.contents, 'nav-pofile-subpages') | ||
174 | 156 | >>> print extract_text(nav) | ||
175 | 157 | Download translation Upload translation Translation details | ||
176 | 158 | |||
177 | 159 | All those links should linked the proper pages | ||
178 | 160 | |||
179 | 161 | >> print nav.getLink("Download translation").url | ||
180 | 162 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+export | ||
181 | 163 | >> print nav.getLink("Upload translation").url | ||
182 | 164 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+upload | ||
183 | 165 | >> print nav.getLink("Translation details").url | ||
184 | 166 | https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+details | ||
185 | 167 | |||
186 | 128 | Now, we are going to check a message submission. | 168 | Now, we are going to check a message submission. |
187 | 129 | 169 | ||
188 | 130 | >>> browser.open( | 170 | >>> browser.open( |
189 | @@ -384,7 +424,8 @@ | |||
190 | 384 | ... 'msgset_143_es_suggestion_703_0').renderContents() | 424 | ... 'msgset_143_es_suggestion_703_0').renderContents() |
191 | 385 | 'foo!!' | 425 | 'foo!!' |
192 | 386 | 426 | ||
194 | 387 | == Unreviewed translations == | 427 | Unreviewed translations |
195 | 428 | ----------------------- | ||
196 | 388 | 429 | ||
197 | 389 | If there is a message which has a translation, but no reviewer (eg. uploaded | 430 | If there is a message which has a translation, but no reviewer (eg. uploaded |
198 | 390 | from a package), it only shows the translator, and not reviewer. | 431 | from a package), it only shows the translator, and not reviewer. |
199 | @@ -399,7 +440,8 @@ | |||
200 | 399 | >>> print find_tag_by_id(browser.contents, "translated_and_reviewed_by") | 440 | >>> print find_tag_by_id(browser.contents, "translated_and_reviewed_by") |
201 | 400 | None | 441 | None |
202 | 401 | 442 | ||
204 | 402 | == Translating context == | 443 | Translating context |
205 | 444 | ------------------- | ||
206 | 403 | 445 | ||
207 | 404 | Going to a translation page for a message with the context displays the | 446 | Going to a translation page for a message with the context displays the |
208 | 405 | context. | 447 | context. |
209 | @@ -431,7 +473,9 @@ | |||
210 | 431 | ... find_tag_by_id(browser.contents, "msgset_198_sr_translation_0")) | 473 | ... find_tag_by_id(browser.contents, "msgset_198_sr_translation_0")) |
211 | 432 | blah | 474 | blah |
212 | 433 | 475 | ||
214 | 434 | == Empty imported messages == | 476 | |
215 | 477 | Empty imported messages | ||
216 | 478 | ----------------------- | ||
217 | 435 | 479 | ||
218 | 436 | Empty messages coming from import are not shown as 'packaged' suggestions, | 480 | Empty messages coming from import are not shown as 'packaged' suggestions, |
219 | 437 | even if we keep them to know when were they deactivated. | 481 | even if we keep them to know when were they deactivated. |
220 | @@ -491,7 +535,9 @@ | |||
221 | 491 | >>> print packaged | 535 | >>> print packaged |
222 | 492 | None | 536 | None |
223 | 493 | 537 | ||
225 | 494 | == Shared and diverged translations == | 538 | |
226 | 539 | Shared and diverged translations | ||
227 | 540 | -------------------------------- | ||
228 | 495 | 541 | ||
229 | 496 | We create a POFile with one shared translation, which we want to diverge | 542 | We create a POFile with one shared translation, which we want to diverge |
230 | 497 | from. | 543 | from. |
231 | 498 | 544 | ||
232 | === modified file 'lib/lp/translations/templates/currenttranslationmessage-translate-one.pt' | |||
233 | --- lib/lp/translations/templates/currenttranslationmessage-translate-one.pt 2009-07-17 18:46:25 +0000 | |||
234 | +++ lib/lp/translations/templates/currenttranslationmessage-translate-one.pt 2009-12-07 19:05:37 +0000 | |||
235 | @@ -393,7 +393,7 @@ | |||
236 | 393 | user_is_official_translator view/user_is_official_translator; | 393 | user_is_official_translator view/user_is_official_translator; |
237 | 394 | "> | 394 | "> |
238 | 395 | <metal:suggestion | 395 | <metal:suggestion |
240 | 396 | use-macro="context/@@+translationmessage-macros/render-suggestion" /> | 396 | use-macro="context/@@+translations-macros/render-suggestion" /> |
241 | 397 | </tal:imported_translation> | 397 | </tal:imported_translation> |
242 | 398 | <tal:shared_translation | 398 | <tal:shared_translation |
243 | 399 | condition="translation_dictionary/shared_translation_message" | 399 | condition="translation_dictionary/shared_translation_message" |
244 | @@ -405,7 +405,7 @@ | |||
245 | 405 | user_is_official_translator view/user_is_official_translator; | 405 | user_is_official_translator view/user_is_official_translator; |
246 | 406 | "> | 406 | "> |
247 | 407 | <metal:suggestion | 407 | <metal:suggestion |
249 | 408 | use-macro="context/@@+translationmessage-macros/render-suggestion" /> | 408 | use-macro="context/@@+translations-macros/render-suggestion" /> |
250 | 409 | </tal:shared_translation> | 409 | </tal:shared_translation> |
251 | 410 | <tal:locked condition="not:context/potmsgset/is_translation_credit"> | 410 | <tal:locked condition="not:context/potmsgset/is_translation_credit"> |
252 | 411 | <tal:suggestions-title | 411 | <tal:suggestions-title |
253 | 412 | 412 | ||
254 | === modified file 'lib/lp/translations/templates/pofile-translate.pt' | |||
255 | --- lib/lp/translations/templates/pofile-translate.pt 2009-12-03 18:33:22 +0000 | |||
256 | +++ lib/lp/translations/templates/pofile-translate.pt 2009-12-07 19:05:37 +0000 | |||
257 | @@ -142,21 +142,8 @@ | |||
258 | 142 | </div> | 142 | </div> |
259 | 143 | 143 | ||
260 | 144 | <!-- Navigation --> | 144 | <!-- Navigation --> |
276 | 145 | <ul class="horizontal" style="margin-top: 1em; margin-bottom: 1em;" | 145 | <metal:nav-pofile-subpages |
277 | 146 | tal:define="navigation_menu context/menu:navigation"> | 146 | use-macro="context/@@+translations-macros/nav-pofile-subpages" /> |
263 | 147 | <li | ||
264 | 148 | tal:define="link navigation_menu/download" | ||
265 | 149 | tal:condition="link/enabled" | ||
266 | 150 | tal:content="structure link/render"></li> | ||
267 | 151 | <li | ||
268 | 152 | tal:define="link navigation_menu/upload" | ||
269 | 153 | tal:condition="link/enabled" | ||
270 | 154 | tal:content="structure link/render"></li> | ||
271 | 155 | <li | ||
272 | 156 | tal:define="link navigation_menu/details" | ||
273 | 157 | tal:condition="link/enabled" | ||
274 | 158 | tal:content="structure link/render"></li> | ||
275 | 159 | </ul> | ||
278 | 160 | 147 | ||
279 | 161 | <!-- View filter and suggestions from alternative language. --> | 148 | <!-- View filter and suggestions from alternative language. --> |
280 | 162 | <form method="get" style="text-align: left;" action="+translate"> | 149 | <form method="get" style="text-align: left;" action="+translate"> |
281 | 163 | 150 | ||
282 | === modified file 'lib/lp/translations/templates/translationmessage-suggestions.pt' | |||
283 | --- lib/lp/translations/templates/translationmessage-suggestions.pt 2009-07-17 17:59:07 +0000 | |||
284 | +++ lib/lp/translations/templates/translationmessage-suggestions.pt 2009-12-07 19:05:37 +0000 | |||
285 | @@ -13,7 +13,7 @@ | |||
286 | 13 | user_is_official_translator context/user_is_official_translator; | 13 | user_is_official_translator context/user_is_official_translator; |
287 | 14 | "> | 14 | "> |
288 | 15 | <metal:suggestion | 15 | <metal:suggestion |
290 | 16 | use-macro="context/@@+translationmessage-macros/render-suggestion" /> | 16 | use-macro="context/@@+translations-macros/render-suggestion" /> |
291 | 17 | </tal:variables> | 17 | </tal:variables> |
292 | 18 | </tal:submission> | 18 | </tal:submission> |
293 | 19 | </tal:block> | 19 | </tal:block> |
294 | 20 | 20 | ||
295 | === modified file 'lib/lp/translations/templates/translationmessage-translate.pt' | |||
296 | --- lib/lp/translations/templates/translationmessage-translate.pt 2009-12-03 18:33:22 +0000 | |||
297 | +++ lib/lp/translations/templates/translationmessage-translate.pt 2009-12-07 19:05:37 +0000 | |||
298 | @@ -29,21 +29,8 @@ | |||
299 | 29 | <tal:havepluralforms condition="view/has_plural_form_information"> | 29 | <tal:havepluralforms condition="view/has_plural_form_information"> |
300 | 30 | 30 | ||
301 | 31 | <!-- Navigation --> | 31 | <!-- Navigation --> |
317 | 32 | <ul class="horizontal" style="margin-top: 1em; margin-bottom: 1em;" | 32 | <metal:nav-pofile-subpages |
318 | 33 | tal:define="navigation_menu context/menu:navigation"> | 33 | use-macro="context/@@+translations-macros/nav-pofile-subpages" /> |
304 | 34 | <li | ||
305 | 35 | tal:define="link navigation_menu/download" | ||
306 | 36 | tal:condition="link/enabled" | ||
307 | 37 | tal:content="structure link/render"></li> | ||
308 | 38 | <li | ||
309 | 39 | tal:define="link navigation_menu/upload" | ||
310 | 40 | tal:condition="link/enabled" | ||
311 | 41 | tal:content="structure link/render"></li> | ||
312 | 42 | <li | ||
313 | 43 | tal:define="link navigation_menu/details" | ||
314 | 44 | tal:condition="link/enabled" | ||
315 | 45 | tal:content="structure link/render"></li> | ||
316 | 46 | </ul> | ||
319 | 47 | 34 | ||
320 | 48 | <!-- Alternative suggestions. --> | 35 | <!-- Alternative suggestions. --> |
321 | 49 | <div metal:define-macro="editform"> | 36 | <div metal:define-macro="editform"> |
322 | 50 | 37 | ||
323 | === renamed file 'lib/lp/translations/templates/translationmessage-macros.pt' => 'lib/lp/translations/templates/translations-macros.pt' | |||
324 | --- lib/lp/translations/templates/translationmessage-macros.pt 2009-07-17 17:59:07 +0000 | |||
325 | +++ lib/lp/translations/templates/translations-macros.pt 2009-12-07 19:05:37 +0000 | |||
326 | @@ -3,7 +3,7 @@ | |||
327 | 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
328 | 4 | omit-tag=""> | 4 | omit-tag=""> |
329 | 5 | 5 | ||
331 | 6 | <metal:macro define-macro="render-suggestion"> | 6 | <metal:render-suggestion define-macro="render-suggestion"> |
332 | 7 | <tal:submission condition="submission"> | 7 | <tal:submission condition="submission"> |
333 | 8 | <tal:not-empty condition="not:submission/is_empty"> | 8 | <tal:not-empty condition="not:submission/is_empty"> |
334 | 9 | <tr tal:attributes="class string:secondary ${dismissable}; | 9 | <tr tal:attributes="class string:secondary ${dismissable}; |
335 | @@ -105,7 +105,30 @@ | |||
336 | 105 | </tal:not-empty> | 105 | </tal:not-empty> |
337 | 106 | </tal:submission> | 106 | </tal:submission> |
338 | 107 | 107 | ||
340 | 108 | </metal:macro> | 108 | </metal:render-suggestion> |
341 | 109 | |||
342 | 110 | |||
343 | 111 | <metal:nav-pofile-subpages define-macro="nav-pofile-subpages"> | ||
344 | 112 | <ul | ||
345 | 113 | class="horizontal" | ||
346 | 114 | id="nav-pofile-subpages" | ||
347 | 115 | style="margin-top: 1em; margin-bottom: 1em;" | ||
348 | 116 | tal:define="navigation_menu context/menu:navigation"> | ||
349 | 117 | <li | ||
350 | 118 | tal:define="link navigation_menu/download" | ||
351 | 119 | tal:condition="link/enabled" | ||
352 | 120 | tal:content="structure link/render"></li> | ||
353 | 121 | <li | ||
354 | 122 | tal:define="link navigation_menu/upload" | ||
355 | 123 | tal:condition="link/enabled" | ||
356 | 124 | tal:content="structure link/render"></li> | ||
357 | 125 | <li | ||
358 | 126 | tal:define="link navigation_menu/details" | ||
359 | 127 | tal:condition="link/enabled" | ||
360 | 128 | tal:content="structure link/render"></li> | ||
361 | 129 | </ul> | ||
362 | 130 | </metal:nav-pofile-subpages> | ||
363 | 131 | |||
364 | 109 | 132 | ||
365 | 110 | </tal:root> | 133 | </tal:root> |
366 | 111 | 134 |
= Bug 431249 =
The templates pofile-translate.pt and translationmess age-translate. pt share the same set of navigation links so they should be factored out into their own macro file to be used by both.
== Proposed fix ==
A general +translations- macros view was creating for hosting translations macros. age-translate. pt was renamed to a generic name.
The macro page hosting a single macro for translationmess
The required pages were updated to the new macro path.
The macro required to fix this bug is hosted by translations- macros. pt
== Tests ==
I have added the required test in the required stories.
./bin/test -ct "translationmes sage-translate" -t "pofile-translate"
Note: these tests are using the old formating style, but I left those change to have a clean diff.
If everthing is OK, after the review I can update the formating
== Demo and Q/A ==
For PO file go to this link: translations. launchpad. dev/ubuntu/ hoary/+ source/ evolution/ +pots/evolution -2.2/es/ +translate
http://
For translation message go to this link: translations. launchpad. dev/ubuntu/ hoary/+ source/ evolution/ +pots/evolution -2.2/es/ 5
http://
As an anonymous user or a user with no right for changing the translations you should only see the links to Download translation and Translation details
Translation admin / reviewer also have access to the upload page and they will see all links: Download translation, Upload translation and Translation details
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: translations/ browser/ configure. zcml translations/ stories/ standalone/ xx-pofile- translate. txt translations/ stories/ standalone/ xx-translationm essage- translate. txt translations/ templates/ currenttranslat ionmessage- translate- one.pt translations/ templates/ pofile- translate. pt translations/ templates/ translationmess age-suggestions .pt translations/ templates/ translationmess age-translate. pt translations/ templates/ translations- macros. pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/