Merge lp:~danilo/launchpad/bug-429414 into lp:launchpad
- bug-429414
- Merge into devel
Proposed by
Данило Шеган
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~danilo/launchpad/bug-429414 |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~danilo/launchpad/bug-429414 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+11729@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) 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-09-14 15:35:34 +0000 | |||
3 | +++ lib/lp/translations/browser/configure.zcml 2009-09-14 15:41:21 +0000 | |||
4 | @@ -601,17 +601,9 @@ | |||
5 | 601 | name="+potlist" | 601 | name="+potlist" |
6 | 602 | template="../templates/object-pots.pt"/> | 602 | template="../templates/object-pots.pt"/> |
7 | 603 | <browser:page | 603 | <browser:page |
8 | 604 | name="+translate" | ||
9 | 605 | template="../templates/sourcepackage-translate.pt"/> | ||
10 | 606 | <browser:page | ||
11 | 607 | name="+translations" | 604 | name="+translations" |
13 | 608 | template="../templates/object-translations.pt"/> | 605 | template="../templates/sourcepackage-translations.pt"/> |
14 | 609 | </browser:pages> | 606 | </browser:pages> |
15 | 610 | <browser:page | ||
16 | 611 | name="+translate" | ||
17 | 612 | for="lp.registry.interfaces.sourcepackage.ISourcePackage" | ||
18 | 613 | class="lp.translations.browser.translations.TranslateRedirectView" | ||
19 | 614 | permission="zope.Public"/> | ||
20 | 615 | 607 | ||
21 | 616 | <!-- ProductSeries translation pages --> | 608 | <!-- ProductSeries translation pages --> |
22 | 617 | 609 | ||
23 | 618 | 610 | ||
24 | === modified file 'lib/lp/translations/browser/productseries.py' | |||
25 | --- lib/lp/translations/browser/productseries.py 2009-09-01 11:38:24 +0000 | |||
26 | +++ lib/lp/translations/browser/productseries.py 2009-09-14 19:00:45 +0000 | |||
27 | @@ -123,7 +123,7 @@ | |||
28 | 123 | return "Download translations for %s" % self.download_description | 123 | return "Download translations for %s" % self.download_description |
29 | 124 | 124 | ||
30 | 125 | 125 | ||
32 | 126 | class ProductSeriesTranslationsMixin(object): | 126 | class ProductSeriesTranslationsMixin(TranslationsMixin): |
33 | 127 | """Common properties for all ProductSeriesTranslations*View classes.""" | 127 | """Common properties for all ProductSeriesTranslations*View classes.""" |
34 | 128 | 128 | ||
35 | 129 | @property | 129 | @property |
36 | @@ -327,7 +327,7 @@ | |||
37 | 327 | " recognised as a file that can be imported.") | 327 | " recognised as a file that can be imported.") |
38 | 328 | 328 | ||
39 | 329 | 329 | ||
41 | 330 | class ProductSeriesView(LaunchpadView, TranslationsMixin): | 330 | class ProductSeriesView(LaunchpadView, ProductSeriesTranslationsMixin): |
42 | 331 | """A view to show a series with translations.""" | 331 | """A view to show a series with translations.""" |
43 | 332 | def initialize(self): | 332 | def initialize(self): |
44 | 333 | """See `LaunchpadFormView`.""" | 333 | """See `LaunchpadFormView`.""" |
45 | @@ -335,6 +335,13 @@ | |||
46 | 335 | self.has_multiple_templates = ( | 335 | self.has_multiple_templates = ( |
47 | 336 | self.context.getCurrentTranslationTemplates().count() > 1) | 336 | self.context.getCurrentTranslationTemplates().count() > 1) |
48 | 337 | 337 | ||
49 | 338 | self.has_exports_enabled = ( | ||
50 | 339 | self.context.translations_branch is not None) | ||
51 | 340 | |||
52 | 341 | self.uses_bzr_sync = ( | ||
53 | 342 | (self.context.branch is not None and self.has_imports_enabled) or | ||
54 | 343 | self.has_exports_enabled) | ||
55 | 344 | |||
56 | 338 | @property | 345 | @property |
57 | 339 | def productserieslanguages(self): | 346 | def productserieslanguages(self): |
58 | 340 | """Get ProductSeriesLanguage objects to display. | 347 | """Get ProductSeriesLanguage objects to display. |
59 | 341 | 348 | ||
60 | === modified file 'lib/lp/translations/stories/distribution/xx-distribution-translations.txt' | |||
61 | --- lib/lp/translations/stories/distribution/xx-distribution-translations.txt 2009-09-14 13:47:28 +0000 | |||
62 | +++ lib/lp/translations/stories/distribution/xx-distribution-translations.txt 2009-09-14 19:00:45 +0000 | |||
63 | @@ -9,7 +9,7 @@ | |||
64 | 9 | >>> browser.open('http://launchpad.dev/ubuntu') | 9 | >>> browser.open('http://launchpad.dev/ubuntu') |
65 | 10 | >>> browser.getLink('Translations').click() | 10 | >>> browser.getLink('Translations').click() |
66 | 11 | >>> print browser.title | 11 | >>> print browser.title |
68 | 12 | Translating Ubuntu | 12 | Translations : Ubuntu |
69 | 13 | 13 | ||
70 | 14 | Check that there aren't disabled languages shown here: | 14 | Check that there aren't disabled languages shown here: |
71 | 15 | 15 | ||
72 | @@ -52,7 +52,7 @@ | |||
73 | 52 | And the other Ubuntu distributions should be there too. | 52 | And the other Ubuntu distributions should be there too. |
74 | 53 | 53 | ||
75 | 54 | >>> content = find_main_content(browser.contents) | 54 | >>> content = find_main_content(browser.contents) |
77 | 55 | >>> print extract_text(content.findAll('h2')[2]) | 55 | >>> print extract_text(content.findAll('h2')[1]) |
78 | 56 | Other versions of Ubuntu | 56 | Other versions of Ubuntu |
79 | 57 | 57 | ||
80 | 58 | >>> print extract_text(content.find(id='distroseries-list')) | 58 | >>> print extract_text(content.find(id='distroseries-list')) |
81 | @@ -94,7 +94,7 @@ | |||
82 | 94 | And the other Ubuntu distributions should be there too. | 94 | And the other Ubuntu distributions should be there too. |
83 | 95 | 95 | ||
84 | 96 | >>> content = find_main_content(browser.contents) | 96 | >>> content = find_main_content(browser.contents) |
86 | 97 | >>> print extract_text(content.findAll('h2')[2]) | 97 | >>> print extract_text(content.findAll('h2')[1]) |
87 | 98 | Other versions of Debian | 98 | Other versions of Debian |
88 | 99 | 99 | ||
89 | 100 | >>> print extract_text(content.find(id='distroseries-list')) | 100 | >>> print extract_text(content.find(id='distroseries-list')) |
90 | 101 | 101 | ||
91 | === modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt' | |||
92 | --- lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt 2009-09-14 13:54:29 +0000 | |||
93 | +++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt 2009-09-14 19:00:45 +0000 | |||
94 | @@ -84,7 +84,7 @@ | |||
95 | 84 | The import queue is linked from the translations page for product series. | 84 | The import queue is linked from the translations page for product series. |
96 | 85 | 85 | ||
97 | 86 | >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk') | 86 | >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk') |
99 | 87 | >>> user_browser.getLink('Import queue').click() | 87 | >>> user_browser.getLink('import queue').click() |
100 | 88 | 88 | ||
101 | 89 | This time, we do have content for this product: | 89 | This time, we do have content for this product: |
102 | 90 | 90 | ||
103 | 91 | 91 | ||
104 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-templates.txt' | |||
105 | --- lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-07-16 14:40:28 +0000 | |||
106 | +++ lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-09-14 19:00:45 +0000 | |||
107 | @@ -11,7 +11,7 @@ | |||
108 | 11 | 11 | ||
109 | 12 | >>> user_browser.open( | 12 | >>> user_browser.open( |
110 | 13 | ... 'http://translations.launchpad.dev/evolution/trunk') | 13 | ... 'http://translations.launchpad.dev/evolution/trunk') |
112 | 14 | >>> user_browser.getLink('Templates') | 14 | >>> user_browser.getLink('full list of templates') |
113 | 15 | Traceback (most recent call last): | 15 | Traceback (most recent call last): |
114 | 16 | ... | 16 | ... |
115 | 17 | LinkNotFoundError | 17 | LinkNotFoundError |
116 | @@ -19,7 +19,7 @@ | |||
117 | 19 | >>> browser = setupBrowser('Basic test@canonical.com:test') | 19 | >>> browser = setupBrowser('Basic test@canonical.com:test') |
118 | 20 | >>> browser.open( | 20 | >>> browser.open( |
119 | 21 | ... 'http://translations.launchpad.dev/evolution/trunk') | 21 | ... 'http://translations.launchpad.dev/evolution/trunk') |
121 | 22 | >>> browser.getLink('Templates').click() | 22 | >>> browser.getLink('full list of templates').click() |
122 | 23 | >>> print browser.url | 23 | >>> print browser.url |
123 | 24 | http://translations.launchpad.dev/evolution/trunk/+templates | 24 | http://translations.launchpad.dev/evolution/trunk/+templates |
124 | 25 | 25 | ||
125 | 26 | 26 | ||
126 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt' | |||
127 | --- lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt 2009-09-12 07:25:21 +0000 | |||
128 | +++ lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt 2009-09-14 19:00:45 +0000 | |||
129 | @@ -12,7 +12,7 @@ | |||
130 | 12 | productseries' translations page. | 12 | productseries' translations page. |
131 | 13 | 13 | ||
132 | 14 | >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk/') | 14 | >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk/') |
134 | 15 | >>> user_browser.getLink('Download').click() | 15 | >>> user_browser.getLink('download').click() |
135 | 16 | >>> print user_browser.url | 16 | >>> print user_browser.url |
136 | 17 | http://translations.launchpad.dev/evolution/trunk/+export | 17 | http://translations.launchpad.dev/evolution/trunk/+export |
137 | 18 | 18 | ||
138 | @@ -33,10 +33,10 @@ | |||
139 | 33 | not available to anonymous visitors. | 33 | not available to anonymous visitors. |
140 | 34 | 34 | ||
141 | 35 | >>> anon_browser.open('http://translations.launchpad.dev/evolution/trunk/') | 35 | >>> anon_browser.open('http://translations.launchpad.dev/evolution/trunk/') |
143 | 36 | >>> anon_browser.getLink('Download').click() | 36 | >>> anon_browser.getLink('download') |
144 | 37 | Traceback (most recent call last): | 37 | Traceback (most recent call last): |
145 | 38 | ... | 38 | ... |
147 | 39 | Unauthorized:... | 39 | LinkNotFoundError |
148 | 40 | 40 | ||
149 | 41 | 41 | ||
150 | 42 | == Making the request == | 42 | == Making the request == |
151 | @@ -73,7 +73,7 @@ | |||
152 | 73 | 73 | ||
153 | 74 | An alternative is MO. | 74 | An alternative is MO. |
154 | 75 | 75 | ||
156 | 76 | >>> user_browser.getLink('Download').click() | 76 | >>> user_browser.getLink('download').click() |
157 | 77 | >>> user_browser.getControl('Format:').value = ['PO'] | 77 | >>> user_browser.getControl('Format:').value = ['PO'] |
158 | 78 | >>> user_browser.getControl('Request Download').click() | 78 | >>> user_browser.getControl('Request Download').click() |
159 | 79 | >>> print user_browser.url | 79 | >>> print user_browser.url |
160 | @@ -98,7 +98,7 @@ | |||
161 | 98 | link for "Download translations" is hidden. | 98 | link for "Download translations" is hidden. |
162 | 99 | 99 | ||
163 | 100 | >>> user_browser.open('http://translations.launchpad.dev/bzr/') | 100 | >>> user_browser.open('http://translations.launchpad.dev/bzr/') |
165 | 101 | >>> user_browser.getLink('Download') | 101 | >>> user_browser.getLink('download') |
166 | 102 | Traceback (most recent call last): | 102 | Traceback (most recent call last): |
167 | 103 | ... | 103 | ... |
168 | 104 | LinkNotFoundError | 104 | LinkNotFoundError |
169 | 105 | 105 | ||
170 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt' | |||
171 | --- lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt 2009-09-01 19:36:28 +0000 | |||
172 | +++ lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt 2009-09-14 19:00:45 +0000 | |||
173 | @@ -12,7 +12,7 @@ | |||
174 | 12 | ... 'Basic test@canonical.com:test') | 12 | ... 'Basic test@canonical.com:test') |
175 | 13 | >>> browser.open( | 13 | >>> browser.open( |
176 | 14 | ... 'http://translations.launchpad.dev/evolution/trunk/') | 14 | ... 'http://translations.launchpad.dev/evolution/trunk/') |
178 | 15 | >>> browser.getLink('Request Bazaar import').click() | 15 | >>> browser.getLink('Request an import from bazaar').click() |
179 | 16 | >>> print browser.url | 16 | >>> print browser.url |
180 | 17 | http://translations.l...d.dev/evolution/trunk/+request-bzr-import | 17 | http://translations.l...d.dev/evolution/trunk/+request-bzr-import |
181 | 18 | 18 | ||
182 | @@ -55,7 +55,7 @@ | |||
183 | 55 | ... browser.contents, 'field.actions.request_import') | 55 | ... browser.contents, 'field.actions.request_import') |
184 | 56 | >>> print request_button | 56 | >>> print request_button |
185 | 57 | <input type="submit"...value="Request one-time import"... | 57 | <input type="submit"...value="Request one-time import"... |
187 | 58 | >>> browser.getControl('Request one-time import').click() | 58 | >>> browser.getControl("Request one-time import").click() |
188 | 59 | >>> print browser.url | 59 | >>> print browser.url |
189 | 60 | http://translations.launchpad.dev/evolution/trunk | 60 | http://translations.launchpad.dev/evolution/trunk |
190 | 61 | >>> print "\n".join(get_feedback_messages(browser.contents)) | 61 | >>> print "\n".join(get_feedback_messages(browser.contents)) |
191 | 62 | 62 | ||
192 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt' | |||
193 | --- lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt 2009-07-10 12:49:30 +0000 | |||
194 | +++ lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt 2009-09-14 19:00:45 +0000 | |||
195 | @@ -12,7 +12,7 @@ | |||
196 | 12 | ... 'Basic test@canonical.com:test') | 12 | ... 'Basic test@canonical.com:test') |
197 | 13 | >>> browser.open( | 13 | >>> browser.open( |
198 | 14 | ... 'http://translations.launchpad.dev/evolution/trunk/') | 14 | ... 'http://translations.launchpad.dev/evolution/trunk/') |
200 | 15 | >>> browser.getLink('Settings').click() | 15 | >>> browser.getLink('Set up branch synchronization').click() |
201 | 16 | >>> print browser.url | 16 | >>> print browser.url |
202 | 17 | http://translations.l...d.dev/evolution/trunk/+translations-settings | 17 | http://translations.l...d.dev/evolution/trunk/+translations-settings |
203 | 18 | 18 | ||
204 | 19 | 19 | ||
205 | === modified file 'lib/lp/translations/stories/standalone/xx-product-export.txt' | |||
206 | --- lib/lp/translations/stories/standalone/xx-product-export.txt 2009-09-12 07:25:21 +0000 | |||
207 | +++ lib/lp/translations/stories/standalone/xx-product-export.txt 2009-09-14 19:00:45 +0000 | |||
208 | @@ -17,7 +17,7 @@ | |||
209 | 17 | first and requesting a download there. | 17 | first and requesting a download there. |
210 | 18 | 18 | ||
211 | 19 | >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk') | 19 | >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk') |
213 | 20 | >>> user_browser.getLink('Download').click() | 20 | >>> user_browser.getLink('download').click() |
214 | 21 | >>> user_browser.url | 21 | >>> user_browser.url |
215 | 22 | 'http://translations.launchpad.dev/evolution/trunk/+export' | 22 | 'http://translations.launchpad.dev/evolution/trunk/+export' |
216 | 23 | 23 | ||
217 | 24 | 24 | ||
218 | === modified file 'lib/lp/translations/stories/standalone/xx-productseries-translations.txt' | |||
219 | --- lib/lp/translations/stories/standalone/xx-productseries-translations.txt 2009-07-03 14:17:21 +0000 | |||
220 | +++ lib/lp/translations/stories/standalone/xx-productseries-translations.txt 2009-09-14 19:00:45 +0000 | |||
221 | @@ -37,11 +37,11 @@ | |||
222 | 37 | 37 | ||
223 | 38 | >>> anon_browser.open(frobnicator_trunk_url) | 38 | >>> anon_browser.open(frobnicator_trunk_url) |
224 | 39 | >>> print anon_browser.title | 39 | >>> print anon_browser.title |
226 | 40 | Translations overview for Frobnicator trunk series | 40 | Translations : Series trunk : Frobnicator |
227 | 41 | 41 | ||
228 | 42 | >>> main_content = find_main_content(anon_browser.contents) | 42 | >>> main_content = find_main_content(anon_browser.contents) |
229 | 43 | >>> print extract_text(main_content.findAll('h1')[0]) | 43 | >>> print extract_text(main_content.findAll('h1')[0]) |
231 | 44 | Translations for Frobnicator trunk series | 44 | Translation status by language |
232 | 45 | 45 | ||
233 | 46 | >>> print_language_stats(anon_browser) | 46 | >>> print_language_stats(anon_browser) |
234 | 47 | No translations. | 47 | No translations. |
235 | 48 | 48 | ||
236 | === modified file 'lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt' | |||
237 | --- lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt 2009-07-01 20:45:39 +0000 | |||
238 | +++ lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt 2009-09-14 15:41:21 +0000 | |||
239 | @@ -7,13 +7,13 @@ | |||
240 | 7 | >>> anon_browser.open( | 7 | >>> anon_browser.open( |
241 | 8 | ... 'http://translations.launchpad.dev/ubuntu/hoary/' | 8 | ... 'http://translations.launchpad.dev/ubuntu/hoary/' |
242 | 9 | ... '+source/evolution') | 9 | ... '+source/evolution') |
245 | 10 | >>> print anon_browser.title.encode('ascii','backslashreplace') | 10 | >>> anon_browser.title |
246 | 11 | Translation templates for evolution in Ubuntu Hoary | 11 | '...evolution...package : Translations : 5.04 : Ubuntu' |
247 | 12 | 12 | ||
248 | 13 | >>> content = find_main_content(anon_browser.contents) | 13 | >>> content = find_main_content(anon_browser.contents) |
249 | 14 | >>> print extract_text(content.findAll('h1')[0]).encode( | 14 | >>> print extract_text(content.findAll('h1')[0]).encode( |
250 | 15 | ... 'ascii','backslashreplace') | 15 | ... 'ascii','backslashreplace') |
252 | 16 | Translation templates for evolution in Ubuntu Hoary | 16 | Translation templates |
253 | 17 | 17 | ||
254 | 18 | There are two templates for evolution in Ubuntu Hoary | 18 | There are two templates for evolution in Ubuntu Hoary |
255 | 19 | 19 | ||
256 | 20 | 20 | ||
257 | === modified file 'lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt' | |||
258 | --- lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt 2009-09-12 07:25:21 +0000 | |||
259 | +++ lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt 2009-09-14 15:41:21 +0000 | |||
260 | @@ -15,7 +15,7 @@ | |||
261 | 15 | >>> browser = setupBrowser(auth='Basic mark@example.com:test') | 15 | >>> browser = setupBrowser(auth='Basic mark@example.com:test') |
262 | 16 | >>> browser.open( | 16 | >>> browser.open( |
263 | 17 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/mozilla/') | 17 | ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/mozilla/') |
265 | 18 | >>> download = browser.getLink('Download') | 18 | >>> download = browser.getLink('download full tarball') |
266 | 19 | >>> download_url = download.url | 19 | >>> download_url = download.url |
267 | 20 | >>> download.click() | 20 | >>> download.click() |
268 | 21 | >>> print browser.url | 21 | >>> print browser.url |
269 | @@ -42,7 +42,7 @@ | |||
270 | 42 | ... 'http://translations.launchpad.dev/' | 42 | ... 'http://translations.launchpad.dev/' |
271 | 43 | ... 'ubuntu/hoary/+source/mozilla/') | 43 | ... 'ubuntu/hoary/+source/mozilla/') |
272 | 44 | ... try: | 44 | ... try: |
274 | 45 | ... browser.getLink('Download').click() | 45 | ... browser.getLink('download full tarball').click() |
275 | 46 | ... except LinkNotFoundError: | 46 | ... except LinkNotFoundError: |
276 | 47 | ... see_link = False | 47 | ... see_link = False |
277 | 48 | ... else: | 48 | ... else: |
278 | 49 | 49 | ||
279 | === modified file 'lib/lp/translations/stories/standalone/xx-template-description-escaping.txt' | |||
280 | --- lib/lp/translations/stories/standalone/xx-template-description-escaping.txt 2009-07-27 08:05:02 +0000 | |||
281 | +++ lib/lp/translations/stories/standalone/xx-template-description-escaping.txt 2009-09-14 15:41:21 +0000 | |||
282 | @@ -30,7 +30,7 @@ | |||
283 | 30 | The same description also shows up on the +translate page for the | 30 | The same description also shows up on the +translate page for the |
284 | 31 | package. Again,the URL is clickable. | 31 | package. Again,the URL is clickable. |
285 | 32 | 32 | ||
287 | 33 | >>> description = find_description(package_url + '/+translate') | 33 | >>> description = find_description(package_url + '/+translations') |
288 | 34 | >>> len(description) | 34 | >>> len(description) |
289 | 35 | 1 | 35 | 1 |
290 | 36 | >>> print description[0] | 36 | >>> print description[0] |
291 | 37 | 37 | ||
292 | === modified file 'lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt' | |||
293 | --- lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt 2009-09-01 19:36:28 +0000 | |||
294 | +++ lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt 2009-09-14 19:00:45 +0000 | |||
295 | @@ -11,7 +11,7 @@ | |||
296 | 11 | Since we still don't have any POTemplates assigned, we must use the general | 11 | Since we still don't have any POTemplates assigned, we must use the general |
297 | 12 | translations upload link. | 12 | translations upload link. |
298 | 13 | 13 | ||
300 | 14 | >>> browser.getLink('Upload').click() | 14 | >>> browser.getLink('upload').click() |
301 | 15 | >>> print browser.url | 15 | >>> print browser.url |
302 | 16 | http://translations.launchpad.dev/firefox/trunk/+translations-upload | 16 | http://translations.launchpad.dev/firefox/trunk/+translations-upload |
303 | 17 | 17 | ||
304 | 18 | 18 | ||
305 | === modified file 'lib/lp/translations/stories/translationgroups/10-distro-translation-group.txt' | |||
306 | --- lib/lp/translations/stories/translationgroups/10-distro-translation-group.txt 2009-09-14 15:35:34 +0000 | |||
307 | +++ lib/lp/translations/stories/translationgroups/10-distro-translation-group.txt 2009-09-14 19:00:45 +0000 | |||
308 | @@ -13,7 +13,7 @@ | |||
309 | 13 | 13 | ||
310 | 14 | >>> anon_browser.getLink('Translations').click() | 14 | >>> anon_browser.getLink('Translations').click() |
311 | 15 | >>> print anon_browser.title | 15 | >>> print anon_browser.title |
313 | 16 | Translating Ubuntu | 16 | Translations : Ubuntu |
314 | 17 | 17 | ||
315 | 18 | >>> print extract_text( | 18 | >>> print extract_text( |
316 | 19 | ... find_tag_by_id(anon_browser.contents, 'translation-permissions')) | 19 | ... find_tag_by_id(anon_browser.contents, 'translation-permissions')) |
317 | @@ -58,7 +58,7 @@ | |||
318 | 58 | ... 'The PolyGlot Translation Group'] | 58 | ... 'The PolyGlot Translation Group'] |
319 | 59 | >>> ubuntu_owner_browser.getControl('Change').click() | 59 | >>> ubuntu_owner_browser.getControl('Change').click() |
320 | 60 | >>> print ubuntu_owner_browser.title | 60 | >>> print ubuntu_owner_browser.title |
322 | 61 | Translating Ubuntu | 61 | Translations : Ubuntu |
323 | 62 | 62 | ||
324 | 63 | >>> print extract_text( | 63 | >>> print extract_text( |
325 | 64 | ... find_tag_by_id(ubuntu_owner_browser.contents, | 64 | ... find_tag_by_id(ubuntu_owner_browser.contents, |
326 | @@ -70,7 +70,7 @@ | |||
327 | 70 | 70 | ||
328 | 71 | >>> anon_browser.reload() | 71 | >>> anon_browser.reload() |
329 | 72 | >>> print anon_browser.title | 72 | >>> print anon_browser.title |
331 | 73 | Translating Ubuntu | 73 | Translations : Ubuntu |
332 | 74 | 74 | ||
333 | 75 | >>> print extract_text( | 75 | >>> print extract_text( |
334 | 76 | ... find_tag_by_id(anon_browser.contents, 'translation-permissions')) | 76 | ... find_tag_by_id(anon_browser.contents, 'translation-permissions')) |
335 | 77 | 77 | ||
336 | === modified file 'lib/lp/translations/templates/productseries-translations.pt' | |||
337 | --- lib/lp/translations/templates/productseries-translations.pt 2009-09-10 19:07:11 +0000 | |||
338 | +++ lib/lp/translations/templates/productseries-translations.pt 2009-09-14 19:00:45 +0000 | |||
339 | @@ -2,22 +2,10 @@ | |||
340 | 2 | xmlns="http://www.w3.org/1999/xhtml" | 2 | xmlns="http://www.w3.org/1999/xhtml" |
341 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
342 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
349 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | metal:use-macro="view/macro:page/main_only" |
344 | 6 | xml:lang="en" | ||
345 | 7 | lang="en" | ||
346 | 8 | dir="ltr" | ||
347 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
348 | 10 | i18n:domain="launchpad" | ||
350 | 11 | > | 6 | > |
351 | 12 | <body> | 7 | <body> |
352 | 13 | <div metal:fill-slot="main"> | 8 | <div metal:fill-slot="main"> |
353 | 14 | <h1> | ||
354 | 15 | Translations for | ||
355 | 16 | <tal:title replace="context/title"> | ||
356 | 17 | evolution trunk | ||
357 | 18 | </tal:title> | ||
358 | 19 | </h1> | ||
359 | 20 | |||
360 | 21 | <ul class="helplinks"> | 9 | <ul class="helplinks"> |
361 | 22 | <li> | 10 | <li> |
362 | 23 | <a href="https://help.launchpad.net/Translations" | 11 | <a href="https://help.launchpad.net/Translations" |
363 | @@ -27,7 +15,10 @@ | |||
364 | 27 | </li> | 15 | </li> |
365 | 28 | </ul> | 16 | </ul> |
366 | 29 | 17 | ||
367 | 18 | <h1>Translation status by language</h1> | ||
368 | 19 | |||
369 | 30 | <tal:no-languages condition="not:view/productserieslanguages"> | 20 | <tal:no-languages condition="not:view/productserieslanguages"> |
370 | 21 | <div class="yui-b top-portlet"> | ||
371 | 31 | <p>There are no translations for this release series.</p> | 22 | <p>There are no translations for this release series.</p> |
372 | 32 | 23 | ||
373 | 33 | <p tal:condition="context/product/required:launchpad.Edit">To | 24 | <p tal:condition="context/product/required:launchpad.Edit">To |
374 | @@ -48,39 +39,130 @@ | |||
375 | 48 | >import from branches</a> | 39 | >import from branches</a> |
376 | 49 | (<a href="https://help.launchpad.net/Translations/ImportingFromBazaarBranches">read more</a>). | 40 | (<a href="https://help.launchpad.net/Translations/ImportingFromBazaarBranches">read more</a>). |
377 | 50 | </p> | 41 | </p> |
384 | 51 | 42 | </div> | |
379 | 52 | <tal:user condition="view/user"> | ||
380 | 53 | <p tal:condition="not:view/user/languages">Please <a | ||
381 | 54 | tal:attributes="href string:${view/user/fmt:url}/+editlanguages"> | ||
382 | 55 | set your languages</a> to start translating.</p> | ||
383 | 56 | </tal:user> | ||
385 | 57 | </tal:no-languages> | 43 | </tal:no-languages> |
386 | 58 | 44 | ||
387 | 45 | <div class="yui-g"> | ||
388 | 46 | <div class="yui-u first"> | ||
389 | 47 | <div class="portlet"> | ||
390 | 48 | <h3>Permissions</h3> | ||
391 | 49 | <p> | ||
392 | 50 | <tal:permissions replace=" | ||
393 | 51 | structure | ||
394 | 52 | context/product/@@+portlet-translation-groups-and-permission"/> | ||
395 | 53 | </p> | ||
396 | 54 | <p tal:condition="view/has_translation_documentation"> | ||
397 | 55 | Before translating, please look at | ||
398 | 56 | <a tal:attributes=" | ||
399 | 57 | href | ||
400 | 58 | context/product/translationgroup/translation_guide_url | ||
401 | 59 | ">translation instructions</a> first. | ||
402 | 60 | </p> | ||
403 | 61 | </div> | ||
404 | 62 | </div> | ||
405 | 63 | |||
406 | 64 | <div class="yui-u"> | ||
407 | 65 | <div class="portlet"> | ||
408 | 66 | <h3>Administration</h3> | ||
409 | 67 | <p>Translation files that are waiting to be imported are shown in | ||
410 | 68 | the | ||
411 | 69 | <a tal:attributes="href context/menu:navigation/imports/url"> | ||
412 | 70 | import queue</a>. | ||
413 | 71 | </p> | ||
414 | 72 | <p tal:condition="context/required:launchpad.Edit"> | ||
415 | 73 | To manage all the translation templates in | ||
416 | 74 | <tal:series replace="context/displayname">trunk</tal:series>, | ||
417 | 75 | see the | ||
418 | 76 | <a tal:attributes="href context/menu:navigation/templates/url"> | ||
419 | 77 | full list of templates</a>. | ||
420 | 78 | </p> | ||
421 | 79 | </div> | ||
422 | 80 | </div> | ||
423 | 81 | </div> | ||
424 | 82 | <div class="yui-g"> | ||
425 | 83 | <div class="yui-u first"> | ||
426 | 84 | <div class="portlet"> | ||
427 | 85 | <h3>Automatic synchronization</h3> | ||
428 | 86 | <tal:uses-bzr-sync condition="view/uses_bzr_sync"> | ||
429 | 87 | <tal:imports condition="view/has_imports_enabled"> | ||
430 | 88 | <tal:exports condition="view/has_exports_enabled"> | ||
431 | 89 | Translations are imported with every update from branch | ||
432 | 90 | <a tal:replace="structure context/branch/fmt:link"> | ||
433 | 91 | branch | ||
434 | 92 | </a>, and exported daily to branch | ||
435 | 93 | <a tal:replace=" | ||
436 | 94 | structure context/translations_branch/fmt:link" | ||
437 | 95 | >branch name</a>. | ||
438 | 96 | </tal:exports> | ||
439 | 97 | </tal:imports> | ||
440 | 98 | <tal:imports-only condition="view/has_imports_enabled"> | ||
441 | 99 | <tal:no-exports condition="not:view/has_exports_enabled"> | ||
442 | 100 | Translations are imported with every update from branch | ||
443 | 101 | <a tal:replace="structure context/branch/fmt:link"> | ||
444 | 102 | branch name | ||
445 | 103 | </a>. | ||
446 | 104 | </tal:no-exports> | ||
447 | 105 | </tal:imports-only> | ||
448 | 106 | <tal:exports-only condition="view/has_exports_enabled"> | ||
449 | 107 | <tal:no-imports condition="not:view/has_imports_enabled"> | ||
450 | 108 | Translations are exported daily to branch | ||
451 | 109 | <a tal:replace=" | ||
452 | 110 | structure context/translations_branch/fmt:link"> | ||
453 | 111 | branch name | ||
454 | 112 | </a>. | ||
455 | 113 | </tal:no-imports> | ||
456 | 114 | </tal:exports-only> | ||
457 | 115 | <div tal:condition="context/required:launchpad.Edit"> | ||
458 | 116 | <a tal:attributes="href context/menu:navigation/settings/url" | ||
459 | 117 | class="edit sprite"> | ||
460 | 118 | Change synchronization settings | ||
461 | 119 | </a> | ||
462 | 120 | </div> | ||
463 | 121 | </tal:uses-bzr-sync> | ||
464 | 122 | <tal:no-bzr-sync condition="not:view/uses_bzr_sync"> | ||
465 | 123 | <p>This project is currently not using any synchronization | ||
466 | 124 | with bazaar branches.</p> | ||
467 | 125 | <tal:branch condition="context/branch"> | ||
468 | 126 | <p> | ||
469 | 127 | <a tal:attributes=" | ||
470 | 128 | href context/menu:navigation/requestbzrimport/url" | ||
471 | 129 | tal:condition="context/required:launchpad.Edit" | ||
472 | 130 | class="add sprite"> | ||
473 | 131 | Request an import from bazaar | ||
474 | 132 | </a> to do a one time import of all the templates and | ||
475 | 133 | translations. | ||
476 | 134 | </p> | ||
477 | 135 | </tal:branch> | ||
478 | 136 | <div tal:condition="context/required:launchpad.Edit"> | ||
479 | 137 | <a tal:attributes="href context/menu:navigation/settings/url" | ||
480 | 138 | class="edit sprite"> | ||
481 | 139 | Set up branch synchronization | ||
482 | 140 | </a> | ||
483 | 141 | </div> | ||
484 | 142 | </tal:no-bzr-sync> | ||
485 | 143 | </div> | ||
486 | 144 | </div> | ||
487 | 145 | <div class="yui-u" | ||
488 | 146 | tal:condition="context/required:launchpad.AnyPerson"> | ||
489 | 147 | <div class="portlet"> | ||
490 | 148 | <h3>Manual synchronization</h3> | ||
491 | 149 | <p>If you don't want to use bazaar synchronization, you can still | ||
492 | 150 | manually | ||
493 | 151 | <a tal:attributes="href context/menu:navigation/translationupload/url" | ||
494 | 152 | tal:condition="context/required:launchpad.Edit" | ||
495 | 153 | class="add sprite">upload</a> | ||
496 | 154 | or | ||
497 | 155 | <a tal:attributes="href context/menu:navigation/translationdownload/url" | ||
498 | 156 | tal:condition="context/required:launchpad.AnyPerson" | ||
499 | 157 | class="download sprite">download</a> | ||
500 | 158 | translation tarballs. | ||
501 | 159 | </p> | ||
502 | 160 | </div> | ||
503 | 161 | </div> | ||
504 | 162 | </div> | ||
505 | 163 | |||
506 | 59 | <tal:languages condition="view/productserieslanguages"> | 164 | <tal:languages condition="view/productserieslanguages"> |
531 | 60 | <p id="translation-permissions"> | 165 | <h2>Translation status</h2> |
508 | 61 | <tal:product replace="structure context/product/fmt:link">This | ||
509 | 62 | project</tal:product> is translated | ||
510 | 63 | <tal:hasgroup condition="context/product/translationgroup">by | ||
511 | 64 | <a tal:attributes="href context/product/translationgroup/fmt:url" | ||
512 | 65 | tal:content="context/product/translationgroup/title">translators</a> | ||
513 | 66 | </tal:hasgroup> | ||
514 | 67 | with <a target="help" href="/+help/permissions-policies.html" | ||
515 | 68 | tal:content="context/product/translationpermission/title">certain</a> | ||
516 | 69 | permissions. | ||
517 | 70 | <tal:permissions condition="context/product/required:launchpad.Edit"> | ||
518 | 71 | You can modify permissions on the | ||
519 | 72 | <a | ||
520 | 73 | tal:define="link context/product/menu:navigation/settings" | ||
521 | 74 | tal:attributes="href link/url" | ||
522 | 75 | >project settings</a> page. | ||
523 | 76 | </tal:permissions> | ||
524 | 77 | </p> | ||
525 | 78 | <p tal:condition="view/has_translation_documentation"> | ||
526 | 79 | Before translating, please look at | ||
527 | 80 | <a tal:attributes=" | ||
528 | 81 | href | ||
529 | 82 | context/product/translationgroup/translation_guide_url | ||
530 | 83 | ">translation instructions</a> first.</p> | ||
532 | 84 | 166 | ||
533 | 85 | <div tal:replace="structure context/@@+languages" /> | 167 | <div tal:replace="structure context/@@+languages" /> |
534 | 86 | 168 | ||
535 | 87 | 169 | ||
536 | === removed file 'lib/lp/translations/templates/sourcepackage-translate.pt' | |||
537 | --- lib/lp/translations/templates/sourcepackage-translate.pt 2009-07-17 17:59:07 +0000 | |||
538 | +++ lib/lp/translations/templates/sourcepackage-translate.pt 1970-01-01 00:00:00 +0000 | |||
539 | @@ -1,41 +0,0 @@ | |||
540 | 1 | <html | ||
541 | 2 | xmlns="http://www.w3.org/1999/xhtml" | ||
542 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
543 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
544 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
545 | 6 | xml:lang="en" | ||
546 | 7 | lang="en" | ||
547 | 8 | dir="ltr" | ||
548 | 9 | metal:use-macro="context/@@main_template/master" | ||
549 | 10 | i18n:domain="launchpad" | ||
550 | 11 | > | ||
551 | 12 | |||
552 | 13 | <body> | ||
553 | 14 | |||
554 | 15 | <div metal:fill-slot="main"> | ||
555 | 16 | |||
556 | 17 | <h1>Help translate | ||
557 | 18 | <span tal:replace="context/distribution/displayname">foo</span>!</h1> | ||
558 | 19 | |||
559 | 20 | <p> | ||
560 | 21 | Are you fluent in a language other than English? | ||
561 | 22 | If so, you can contribute to <span tal:replace="context/title" /> | ||
562 | 23 | by translating it with Launchpad’s | ||
563 | 24 | <a href="/translations/">Translations</a> software. | ||
564 | 25 | You can translate as much as you like, whenever you like — | ||
565 | 26 | all you need is a Web browser. | ||
566 | 27 | </p> | ||
567 | 28 | |||
568 | 29 | <p> | ||
569 | 30 | To start, <a href="+translate/+login">get a Launchpad account</a> | ||
570 | 31 | if you don’t already have one. | ||
571 | 32 | Then choose a language below, and start translating. | ||
572 | 33 | It’s that easy. | ||
573 | 34 | </p> | ||
574 | 35 | |||
575 | 36 | <div tal:replace="structure context/@@+potlist" /> | ||
576 | 37 | |||
577 | 38 | </div> | ||
578 | 39 | </body> | ||
579 | 40 | </html> | ||
580 | 41 | |||
581 | 42 | 0 | ||
582 | === renamed file 'lib/lp/translations/templates/object-translations.pt' => 'lib/lp/translations/templates/sourcepackage-translations.pt' | |||
583 | --- lib/lp/translations/templates/object-translations.pt 2009-07-17 17:59:07 +0000 | |||
584 | +++ lib/lp/translations/templates/sourcepackage-translations.pt 2009-09-14 15:41:21 +0000 | |||
585 | @@ -2,25 +2,10 @@ | |||
586 | 2 | xmlns="http://www.w3.org/1999/xhtml" | 2 | xmlns="http://www.w3.org/1999/xhtml" |
587 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
588 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
599 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | metal:use-macro="view/macro:page/main_only" |
600 | 6 | xml:lang="en" | 6 | > |
591 | 7 | lang="en" | ||
592 | 8 | dir="ltr" | ||
593 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
594 | 10 | i18n:domain="launchpad" | ||
595 | 11 | ><!-- context/@@main_template/master | ||
596 | 12 | view/macro:page/onecolumn | ||
597 | 13 | --> | ||
598 | 14 | |||
601 | 15 | <body> | 7 | <body> |
602 | 16 | <div metal:fill-slot="main"> | 8 | <div metal:fill-slot="main"> |
603 | 17 | <h1> | ||
604 | 18 | Translation templates for | ||
605 | 19 | <tal:title replace="context/title"> | ||
606 | 20 | evolution in Ubuntu Feisty | ||
607 | 21 | </tal:title> | ||
608 | 22 | </h1> | ||
609 | 23 | |||
610 | 24 | <ul class="helplinks"> | 9 | <ul class="helplinks"> |
611 | 25 | <li> | 10 | <li> |
612 | 26 | <a href="https://help.launchpad.net/Translations" | 11 | <a href="https://help.launchpad.net/Translations" |
613 | @@ -30,7 +15,41 @@ | |||
614 | 30 | </li> | 15 | </li> |
615 | 31 | </ul> | 16 | </ul> |
616 | 32 | 17 | ||
618 | 33 | <div tal:replace="structure context/@@+potlist" /> | 18 | <h1>Translation templates</h1> |
619 | 19 | |||
620 | 20 | <div class="yui-g"> | ||
621 | 21 | <div class="yui-u first"> | ||
622 | 22 | <div class="portlet"> | ||
623 | 23 | <h3>Permissions</h3> | ||
624 | 24 | <p> | ||
625 | 25 | <tal:permissions replace=" | ||
626 | 26 | structure | ||
627 | 27 | context/distroseries/distribution/@@+portlet-translation-groups-and-permission"/> | ||
628 | 28 | </p> | ||
629 | 29 | </div> | ||
630 | 30 | </div> | ||
631 | 31 | <div class="yui-u"> | ||
632 | 32 | <div class="portlet"> | ||
633 | 33 | <h3>Administration</h3> | ||
634 | 34 | <p>Translation files that are waiting to be imported are shown in | ||
635 | 35 | the | ||
636 | 36 | <a tal:attributes="href context/menu:navigation/imports/url"> | ||
637 | 37 | import queue</a>. | ||
638 | 38 | </p> | ||
639 | 39 | <p tal:condition="context/required:launchpad.ExpensiveRequest"> | ||
640 | 40 | If you want to manually integrate translations for this package, | ||
641 | 41 | you can | ||
642 | 42 | <a tal:attributes="href context/menu:navigation/download/url"> | ||
643 | 43 | download full tarball</a> with translations. | ||
644 | 44 | </p> | ||
645 | 45 | </div> | ||
646 | 46 | </div> | ||
647 | 47 | </div> | ||
648 | 48 | |||
649 | 49 | <div class="yui-b"> | ||
650 | 50 | <div tal:replace="structure context/@@+potlist" /> | ||
651 | 51 | </div> | ||
652 | 52 | |||
653 | 34 | </div> | 53 | </div> |
654 | 35 | </body> | 54 | </body> |
655 | 36 | </html> | 55 | </html> |
656 | 37 | 56 |
= Bug 429414 =
This branch converts productseries- translations. pt and translate. pt/object- translations. pt to 3.0 layout.
sourcepackage-
Along the way, sourcepackage- translate. pt is removed and translations. pt is renamed to sourcepackage- translations. pt (to translations, translations, product- translations, ...).
object-
match other templates like distroseries-
distribution-
It seems like a big branch, but with most links inline, pagetest updates
take 340 lines.
= Tests =
bin/test -vvt translations. *sourcepackage -t translations. *productseries
= Demo & QA =
ProductSeries page:
https:/ /translations. launchpad. dev/evolution/ trunk /translations. launchpad. dev/firefox/ trunk
https:/
SourcePackage page:
https:/ /translations. launchpad. dev/ubuntu/ hoary/+ source/ evolution/
= 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/ browser/ productseries. py
lib/lp/
lib/lp/
lib/lp/ translations/ stories/ distribution/ xx-distribution -translations. txt
lib/lp/ translations/ stories/ importqueue/ xx-translation- import- queue-targets. txt
lib/lp/ translations/ stories/ productseries/ xx-productserie s-templates. txt
lib/lp/ translations/ stories/ productseries/ xx-productserie s-translation- export. txt
lib/lp/ translations/ stories/ productseries/ xx-productserie s-translations- bzr-request. txt
lib/lp/ translations/ stories/ productseries/ xx-productserie s-translations- settings. txt translations/ stories/ standalone/ xx-product- export. txt
lib/lp/
lib/lp/ translations/ stories/ standalone/ xx-productserie s-translations. txt
lib/lp/ translations/ stories/ standalone/ xx-rosetta- sourcepackage- list.txt translations/ stories/ standalone/ xx-sourcepackag e-export. txt
lib/lp/
lib/lp/ translations/ stories/ standalone/ xx-template- description- escaping. txt translations/ stories/ standalone/ xx-translations -xpi-import. txt
lib/lp/
lib/lp/ translations/ stories/ translationgrou ps/10-distro- translation- group.txt translations/ templates/ productseries- translations. pt translations/ templates/ sourcepackage- translations. pt
lib/lp/
lib/lp/