Merge lp:~danilo/launchpad/complex-forms into lp:launchpad
- complex-forms
- Merge into devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | not available | ||||||||
Proposed branch: | lp:~danilo/launchpad/complex-forms | ||||||||
Merge into: | lp:launchpad | ||||||||
Diff against target: | None lines | ||||||||
To merge this branch: | bzr merge lp:~danilo/launchpad/complex-forms | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+11047@code.launchpad.net |
Commit message
Description of the change
Данило Шеган (danilo) wrote : | # |
Jeroen T. Vermeulen (jtv) wrote : | # |
Hi Danilo,
Sheer poetry. My main gripe—because I just _had_ to find one!—is that
you didn't turn the icons into sprites. Any chance of getting that in?
Also, in productseries-
links to branches the painful way, complete with icons. I was probably
guilty of that myself in the case of the export branch. Can't we use
fmt:link for these?
All this will break some pagetests, but I heard it will make our hair
glow with natural beauty and make our cars use less gasoline.
As for the whitespace cleanup: are you out to prove that emacs is good
for this? Not that I'd mind if you were. :-)
Jeroen
Данило Шеган (danilo) wrote : | # |
У сре, 02. 09 2009. у 13:08 +0000, Jeroen T. Vermeulen пише:
> Sheer poetry. My main gripe—because I just _had_ to find one!—is that
> you didn't turn the icons into sprites. Any chance of getting that
> in?
Sure, done that now.
> Also, in productseries-
> composes links to branches the painful way, complete with icons. I
> was probably guilty of that myself in the case of the export branch.
> Can't we use fmt:link for these?
Yeah, I did this, but that one of yours caused me the most trouble: you
set an ID on it, and then used that in a pagetest. When using fmt:link,
you can't do that, and there's no getLink() on anything other than the
browser. Doing browser.
helped so I resorted to using browser.
worked, but it was an exercise in its own right.
> All this will break some pagetests, but I heard it will make our hair
> glow with natural beauty and make our cars use less gasoline.
If our cars use less gasoline, what are we going to do with what we are
left on Earth? It's not like we can eat it so we should better spend it
all.
> As for the whitespace cleanup: are you out to prove that emacs is good
> for this? Not that I'd mind if you were. :-)
Nah, I wasn't actually expecting you to review this :)
Preview Diff
1 | === removed directory 'lib/canonical/launchpad/pagetests/distroseries' | |||
2 | === modified file 'lib/canonical/launchpad/pagetitles.py' | |||
3 | --- lib/canonical/launchpad/pagetitles.py 2009-09-01 11:09:53 +0000 | |||
4 | +++ lib/canonical/launchpad/pagetitles.py 2009-09-01 11:38:24 +0000 | |||
5 | @@ -943,9 +943,6 @@ | |||
6 | 943 | 943 | ||
7 | 944 | productseries_translations_settings = 'Settings for translations' | 944 | productseries_translations_settings = 'Settings for translations' |
8 | 945 | 945 | ||
9 | 946 | productseries_translations_bzr_import = ( | ||
10 | 947 | 'Request translations import from Bazaar branch') | ||
11 | 948 | |||
12 | 949 | project_add = 'Register a project group with Launchpad' | 946 | project_add = 'Register a project group with Launchpad' |
13 | 950 | 947 | ||
14 | 951 | project_index = ContextTitle('%s in Launchpad') | 948 | project_index = ContextTitle('%s in Launchpad') |
15 | 952 | 949 | ||
16 | === modified file 'lib/lp/translations/browser/productseries.py' | |||
17 | --- lib/lp/translations/browser/productseries.py 2009-08-31 14:29:30 +0000 | |||
18 | +++ lib/lp/translations/browser/productseries.py 2009-09-01 11:38:24 +0000 | |||
19 | @@ -435,6 +435,17 @@ | |||
20 | 435 | schema = IProductSeries | 435 | schema = IProductSeries |
21 | 436 | field_names = [] | 436 | field_names = [] |
22 | 437 | 437 | ||
23 | 438 | label = "Request one-time import of translations" | ||
24 | 439 | |||
25 | 440 | @property | ||
26 | 441 | def next_url(self): | ||
27 | 442 | return canonical_url(self.context) | ||
28 | 443 | |||
29 | 444 | @property | ||
30 | 445 | def page_title(self): | ||
31 | 446 | return "One-time import of %s %s translations from bazaar" % ( | ||
32 | 447 | self.context.product.displayname, self.context.displayname) | ||
33 | 448 | |||
34 | 438 | def __init__(self, context, request): | 449 | def __init__(self, context, request): |
35 | 439 | super(ProductSeriesTranslationsBzrImportView, self).__init__( | 450 | super(ProductSeriesTranslationsBzrImportView, self).__init__( |
36 | 440 | context, request) | 451 | context, request) |
37 | 441 | 452 | ||
38 | === modified file 'lib/lp/translations/browser/translationimportqueue.py' | |||
39 | --- lib/lp/translations/browser/translationimportqueue.py 2009-08-31 22:18:05 +0000 | |||
40 | +++ lib/lp/translations/browser/translationimportqueue.py 2009-09-01 19:36:28 +0000 | |||
41 | @@ -111,10 +111,36 @@ | |||
42 | 111 | return field_values | 111 | return field_values |
43 | 112 | 112 | ||
44 | 113 | @property | 113 | @property |
45 | 114 | def cancel_url(self): | ||
46 | 115 | """See `LaunchpadFormView`.""" | ||
47 | 116 | referrer = self.referrer_url | ||
48 | 117 | if referrer is None: | ||
49 | 118 | translationimportqueue_set = getUtility(ITranslationImportQueue) | ||
50 | 119 | return canonical_url(translationimportqueue_set) | ||
51 | 120 | else: | ||
52 | 121 | return referrer | ||
53 | 122 | |||
54 | 123 | @property | ||
55 | 124 | def referrer_url(self): | ||
56 | 125 | referrer = self.request.getHeader('referer') | ||
57 | 126 | if referrer != canonical_url(self.context): | ||
58 | 127 | return referrer | ||
59 | 128 | else: | ||
60 | 129 | return None | ||
61 | 130 | |||
62 | 131 | @property | ||
63 | 114 | def next_url(self): | 132 | def next_url(self): |
67 | 115 | """Return the URL of the main import queue at 'rosetta/imports'.""" | 133 | """See `LaunchpadFormView`.""" |
68 | 116 | translationimportqueue_set = getUtility(ITranslationImportQueue) | 134 | # The referer header we want is only available before the view's |
69 | 117 | return canonical_url(translationimportqueue_set) | 135 | # form submits to itself. This field is a hidden input in the form. |
70 | 136 | referrer = self.request.form.get('next_url') | ||
71 | 137 | |||
72 | 138 | if (referrer is not None | ||
73 | 139 | and referrer.startswith(self.request.getApplicationURL())): | ||
74 | 140 | return referrer | ||
75 | 141 | else: | ||
76 | 142 | translationimportqueue_set = getUtility(ITranslationImportQueue) | ||
77 | 143 | return canonical_url(translationimportqueue_set) | ||
78 | 118 | 144 | ||
79 | 119 | def initialize(self): | 145 | def initialize(self): |
80 | 120 | """Remove some fields based on the entry handled.""" | 146 | """Remove some fields based on the entry handled.""" |
81 | 121 | 147 | ||
82 | === renamed file 'lib/canonical/launchpad/pagetests/distroseries/xx-distroseries-language-packs.txt' => 'lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt' | |||
83 | --- lib/canonical/launchpad/pagetests/distroseries/xx-distroseries-language-packs.txt 2009-04-24 09:15:26 +0000 | |||
84 | +++ lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt 2009-09-01 21:12:37 +0000 | |||
85 | @@ -54,7 +54,7 @@ | |||
86 | 54 | >>> print extract_text(find_tag_by_id(browser.contents, "language_packs")) | 54 | >>> print extract_text(find_tag_by_id(browser.contents, "language_packs")) |
87 | 55 | Language packs for Ubuntu 5.04 | 55 | Language packs for Ubuntu 5.04 |
88 | 56 | ... | 56 | ... |
90 | 57 | Current language packs | 57 | Active language packs |
91 | 58 | Base pack: 2007-09-10 19:16:01 UTC | 58 | Base pack: 2007-09-10 19:16:01 UTC |
92 | 59 | A complete set of translations for the OS. | 59 | A complete set of translations for the OS. |
93 | 60 | Delta pack: | 60 | Delta pack: |
94 | @@ -63,9 +63,9 @@ | |||
95 | 63 | Language pack being tested | 63 | Language pack being tested |
96 | 64 | No pack is being tested right now. | 64 | No pack is being tested right now. |
97 | 65 | Currently unused language packs | 65 | Currently unused language packs |
101 | 66 | Delta language pack: 2007-09-10 19:15:19 UTC . | 66 | Delta language pack: 2007-09-10 19:15:19 UTC |
102 | 67 | Delta language pack: 2007-09-10 19:15:01 UTC . | 67 | Delta language pack: 2007-09-10 19:15:01 UTC |
103 | 68 | Full language pack: 2007-09-10 19:14:26 UTC . | 68 | Full language pack: 2007-09-10 19:14:26 UTC |
104 | 69 | 69 | ||
105 | 70 | There is also an option to set/unset whether next language pack generation is | 70 | There is also an option to set/unset whether next language pack generation is |
106 | 71 | a full export: | 71 | a full export: |
107 | 72 | 72 | ||
108 | === added directory 'lib/lp/translations/stories/importqueue' | |||
109 | === renamed file 'lib/lp/translations/stories/standalone/empty.tar.bz2' => 'lib/lp/translations/stories/importqueue/empty.tar.bz2' | |||
110 | === renamed file 'lib/lp/translations/stories/standalone/truncated.tar.bz2' => 'lib/lp/translations/stories/importqueue/truncated.tar.bz2' | |||
111 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue-edit-autofilling.tar.gz' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.tar.gz' | |||
112 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue-edit-autofilling.txt' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.txt' | |||
113 | --- lib/lp/translations/stories/standalone/xx-translation-import-queue-edit-autofilling.txt 2009-08-30 20:27:52 +0000 | |||
114 | +++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.txt 2009-09-01 21:03:51 +0000 | |||
115 | @@ -7,7 +7,7 @@ | |||
116 | 7 | >>> import os.path | 7 | >>> import os.path |
117 | 8 | >>> test_file_name = os.path.join( | 8 | >>> test_file_name = os.path.join( |
118 | 9 | ... os.path.dirname(lp.translations.__file__), | 9 | ... os.path.dirname(lp.translations.__file__), |
120 | 10 | ... 'stories/standalone/xx-translation-import-queue-edit-autofilling.tar.gz') | 10 | ... 'stories/importqueue/xx-translation-import-queue-edit-autofilling.tar.gz') |
121 | 11 | >>> tarball = open(test_file_name) | 11 | >>> tarball = open(test_file_name) |
122 | 12 | 12 | ||
123 | 13 | >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test') | 13 | >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test') |
124 | 14 | 14 | ||
125 | === added file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt' | |||
126 | --- lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt 1970-01-01 00:00:00 +0000 | |||
127 | +++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt 2009-09-01 20:06:37 +0000 | |||
128 | @@ -0,0 +1,43 @@ | |||
129 | 1 | TranslationImportQueueEntry page | ||
130 | 2 | ================================ | ||
131 | 3 | |||
132 | 4 | Submission and cancellation links | ||
133 | 5 | --------------------------------- | ||
134 | 6 | |||
135 | 7 | If we load an import queue entry directly from the global import queue and | ||
136 | 8 | approve it, we end up back on the global translations import queue. | ||
137 | 9 | |||
138 | 10 | XXX DaniloSegan 2009-09-01: due to Zope bug #98437 we can't test that | ||
139 | 11 | this works properly when no "referer" header is sent. | ||
140 | 12 | |||
141 | 13 | >>> admin_browser.open('http://translations.launchpad.dev/+imports') | ||
142 | 14 | >>> admin_browser.getLink(url='imports/1').click() | ||
143 | 15 | >>> print admin_browser.getLink('Cancel').url | ||
144 | 16 | http://translations.launchpad.dev/+imports | ||
145 | 17 | >>> admin_browser.getControl('Approve').click() | ||
146 | 18 | >>> print admin_browser.url | ||
147 | 19 | http://translations.launchpad.dev/+imports | ||
148 | 20 | |||
149 | 21 | Going to the same entry from the Evolution import queue, and then approving | ||
150 | 22 | it, brings us back to the Evolution import queue. | ||
151 | 23 | |||
152 | 24 | >>> admin_browser.open( | ||
153 | 25 | ... 'http://translations.launchpad.dev/evolution/+imports') | ||
154 | 26 | >>> admin_browser.getLink(url='imports/1').click() | ||
155 | 27 | >>> print admin_browser.getLink('Cancel').url | ||
156 | 28 | http://translations.launchpad.dev/evolution/+imports | ||
157 | 29 | >>> admin_browser.getControl('Approve').click() | ||
158 | 30 | >>> print admin_browser.url | ||
159 | 31 | http://translations.launchpad.dev/evolution/+imports | ||
160 | 32 | |||
161 | 33 | Similarly, if we go to an import queue entry through the user's import | ||
162 | 34 | queue, after approving the entry we are back looking at user's import queue. | ||
163 | 35 | |||
164 | 36 | >>> admin_browser.open( | ||
165 | 37 | ... 'http://translations.launchpad.dev/~name16/+imports') | ||
166 | 38 | >>> admin_browser.getLink(url='imports/1').click() | ||
167 | 39 | >>> print admin_browser.getLink('Cancel').url | ||
168 | 40 | http://translations.launchpad.dev/~name16/+imports | ||
169 | 41 | >>> admin_browser.getControl('Approve').click() | ||
170 | 42 | >>> print admin_browser.url | ||
171 | 43 | http://translations.launchpad.dev/~name16/+imports | ||
172 | 0 | 44 | ||
173 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue-filtering.tar.gz' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.tar.gz' | |||
174 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue-filtering.txt' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt' | |||
175 | --- lib/lp/translations/stories/standalone/xx-translation-import-queue-filtering.txt 2009-08-30 20:27:52 +0000 | |||
176 | +++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt 2009-09-01 21:03:51 +0000 | |||
177 | @@ -10,7 +10,7 @@ | |||
178 | 10 | >>> import os.path | 10 | >>> import os.path |
179 | 11 | >>> test_file_name = os.path.join( | 11 | >>> test_file_name = os.path.join( |
180 | 12 | ... os.path.dirname(lp.translations.__file__), | 12 | ... os.path.dirname(lp.translations.__file__), |
182 | 13 | ... 'stories/standalone/xx-translation-import-queue-filtering.tar.gz') | 13 | ... 'stories/importqueue/xx-translation-import-queue-filtering.tar.gz') |
183 | 14 | >>> tarball = open(test_file_name) | 14 | >>> tarball = open(test_file_name) |
184 | 15 | 15 | ||
185 | 16 | Our star for this session is Carlos, who has full access rights to the | 16 | Our star for this session is Carlos, who has full access rights to the |
186 | 17 | 17 | ||
187 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue-targets.txt' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt' | |||
188 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue.tar' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue.tar' | |||
189 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue.tar.bz2' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue.tar.bz2' | |||
190 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue.tar.gz' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue.tar.gz' | |||
191 | === renamed file 'lib/lp/translations/stories/standalone/xx-translation-import-queue.txt' => 'lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt' | |||
192 | --- lib/lp/translations/stories/standalone/xx-translation-import-queue.txt 2009-08-30 20:27:52 +0000 | |||
193 | +++ lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt 2009-09-01 21:03:51 +0000 | |||
194 | @@ -18,7 +18,7 @@ | |||
195 | 18 | >>> import os.path | 18 | >>> import os.path |
196 | 19 | >>> test_file_name = os.path.join( | 19 | >>> test_file_name = os.path.join( |
197 | 20 | ... os.path.dirname(lp.translations.__file__), | 20 | ... os.path.dirname(lp.translations.__file__), |
199 | 21 | ... 'stories/standalone/xx-translation-import-queue.tar.gz') | 21 | ... 'stories/importqueue/xx-translation-import-queue.tar.gz') |
200 | 22 | >>> tarball = open(test_file_name, "rb") | 22 | >>> tarball = open(test_file_name, "rb") |
201 | 23 | >>> upload = ff_owner_browser.getControl('File') | 23 | >>> upload = ff_owner_browser.getControl('File') |
202 | 24 | >>> upload | 24 | >>> upload |
203 | @@ -166,6 +166,12 @@ | |||
204 | 166 | 166 | ||
205 | 167 | Open the edit form for the fourth entry. | 167 | Open the edit form for the fourth entry. |
206 | 168 | 168 | ||
207 | 169 | XXX DaniloSegan 2009-09-01: it seems we are hitting Zope testbrowser | ||
208 | 170 | bug, so we need to reopen the page we are currently at to set 'referer' | ||
209 | 171 | header properly. This seems similar to #98437 but the fix proposed | ||
210 | 172 | there doesn't help. | ||
211 | 173 | |||
212 | 174 | >>> browser.open('http://translations.launchpad.dev/+imports') | ||
213 | 169 | >>> browser.getLink(url='imports/4').click() | 175 | >>> browser.getLink(url='imports/4').click() |
214 | 170 | 176 | ||
215 | 171 | And provide information for this IPOFile to be newly created. | 177 | And provide information for this IPOFile to be newly created. |
216 | @@ -193,7 +199,7 @@ | |||
217 | 193 | po/es.po in | 199 | po/es.po in |
218 | 194 | Mozilla Firefox 1.0 series | 200 | Mozilla Firefox 1.0 series |
219 | 195 | Approved | 201 | Approved |
221 | 196 | ... | 202 | ... |
222 | 197 | Spanish (es) translation of pkgconf-mozilla in Mozilla Firefox 1.0 | 203 | Spanish (es) translation of pkgconf-mozilla in Mozilla Firefox 1.0 |
223 | 198 | ... | 204 | ... |
224 | 199 | 205 | ||
225 | @@ -335,7 +341,7 @@ | |||
226 | 335 | 341 | ||
227 | 336 | >>> test_file_name = os.path.join( | 342 | >>> test_file_name = os.path.join( |
228 | 337 | ... os.path.dirname(lp.translations.__file__), | 343 | ... os.path.dirname(lp.translations.__file__), |
230 | 338 | ... 'stories/standalone/xx-translation-import-queue.tar.bz2') | 344 | ... 'stories/importqueue/xx-translation-import-queue.tar.bz2') |
231 | 339 | >>> tarball = open(test_file_name) | 345 | >>> tarball = open(test_file_name) |
232 | 340 | 346 | ||
233 | 341 | >>> evo_owner_browser.getControl('File').add_file( | 347 | >>> evo_owner_browser.getControl('File').add_file( |
234 | @@ -368,7 +374,7 @@ | |||
235 | 368 | 374 | ||
236 | 369 | >>> test_file_name = os.path.join( | 375 | >>> test_file_name = os.path.join( |
237 | 370 | ... os.path.dirname(lp.translations.__file__), | 376 | ... os.path.dirname(lp.translations.__file__), |
239 | 371 | ... 'stories/standalone/xx-translation-import-queue.tar') | 377 | ... 'stories/importqueue/xx-translation-import-queue.tar') |
240 | 372 | >>> tarball = open(test_file_name) | 378 | >>> tarball = open(test_file_name) |
241 | 373 | 379 | ||
242 | 374 | >>> evo_owner_browser.getControl('File').add_file( | 380 | >>> evo_owner_browser.getControl('File').add_file( |
243 | @@ -389,7 +395,7 @@ | |||
244 | 389 | 395 | ||
245 | 390 | >>> test_file_name = os.path.join( | 396 | >>> test_file_name = os.path.join( |
246 | 391 | ... os.path.dirname(lp.translations.__file__), | 397 | ... os.path.dirname(lp.translations.__file__), |
248 | 392 | ... 'stories/standalone/empty.tar.bz2') | 398 | ... 'stories/importqueue/empty.tar.bz2') |
249 | 393 | >>> tarball = open(test_file_name) | 399 | >>> tarball = open(test_file_name) |
250 | 394 | 400 | ||
251 | 395 | >>> evo_owner_browser.getControl('File').add_file( | 401 | >>> evo_owner_browser.getControl('File').add_file( |
252 | @@ -409,7 +415,7 @@ | |||
253 | 409 | 415 | ||
254 | 410 | >>> test_file_name = os.path.join( | 416 | >>> test_file_name = os.path.join( |
255 | 411 | ... os.path.dirname(lp.translations.__file__), | 417 | ... os.path.dirname(lp.translations.__file__), |
257 | 412 | ... 'stories/standalone/truncated.tar.bz2') | 418 | ... 'stories/importqueue/truncated.tar.bz2') |
258 | 413 | >>> tarball = open(test_file_name) | 419 | >>> tarball = open(test_file_name) |
259 | 414 | 420 | ||
260 | 415 | >>> evo_owner_browser.getControl('File').add_file( | 421 | >>> evo_owner_browser.getControl('File').add_file( |
261 | 416 | 422 | ||
262 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt' | |||
263 | --- lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt 2009-07-10 12:49:30 +0000 | |||
264 | +++ lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt 2009-09-01 19:36:28 +0000 | |||
265 | @@ -57,7 +57,7 @@ | |||
266 | 57 | <input type="submit"...value="Request one-time import"... | 57 | <input type="submit"...value="Request one-time import"... |
267 | 58 | >>> browser.getControl('Request one-time import').click() | 58 | >>> browser.getControl('Request one-time import').click() |
268 | 59 | >>> print browser.url | 59 | >>> print browser.url |
270 | 60 | http://translations.l...d.dev/evolution/trunk/+request-bzr-import | 60 | http://translations.launchpad.dev/evolution/trunk |
271 | 61 | >>> print "\n".join(get_feedback_messages(browser.contents)) | 61 | >>> print "\n".join(get_feedback_messages(browser.contents)) |
272 | 62 | The import has been requested. | 62 | The import has been requested. |
273 | 63 | 63 | ||
274 | 64 | 64 | ||
275 | === modified file 'lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt' | |||
276 | --- lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt 2009-08-30 20:27:52 +0000 | |||
277 | +++ lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt 2009-09-01 19:36:28 +0000 | |||
278 | @@ -49,6 +49,6 @@ | |||
279 | 49 | >>> browser.getControl('Translation domain').value = 'firefox' | 49 | >>> browser.getControl('Translation domain').value = 'firefox' |
280 | 50 | >>> browser.getControl('Approve').click() | 50 | >>> browser.getControl('Approve').click() |
281 | 51 | >>> print browser.url | 51 | >>> print browser.url |
283 | 52 | http://translations.launchpad.dev/+imports | 52 | http://translations.launchpad.dev/firefox/trunk/+imports |
284 | 53 | >>> browser.getControl(name='field.status_3').value | 53 | >>> browser.getControl(name='field.status_3').value |
285 | 54 | ['APPROVED'] | 54 | ['APPROVED'] |
286 | 55 | 55 | ||
287 | === modified file 'lib/lp/translations/templates/distroseries-language-packs.pt' | |||
288 | --- lib/lp/translations/templates/distroseries-language-packs.pt 2009-07-17 17:59:07 +0000 | |||
289 | +++ lib/lp/translations/templates/distroseries-language-packs.pt 2009-09-01 20:59:00 +0000 | |||
290 | @@ -3,10 +3,7 @@ | |||
291 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
292 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
293 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
298 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
295 | 7 | lang="en" | ||
296 | 8 | dir="ltr" | ||
297 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
299 | 10 | i18n:domain="launchpad" > | 7 | i18n:domain="launchpad" > |
300 | 11 | <body> | 8 | <body> |
301 | 12 | <div metal:fill-slot="head_epilogue"> | 9 | <div metal:fill-slot="head_epilogue"> |
302 | @@ -19,91 +16,116 @@ | |||
303 | 19 | 16 | ||
304 | 20 | <div metal:fill-slot="main"> | 17 | <div metal:fill-slot="main"> |
305 | 21 | <div id="language_packs"> | 18 | <div id="language_packs"> |
391 | 22 | <h1> | 19 | <h1> |
392 | 23 | Language packs for | 20 | Language packs for |
393 | 24 | <tal:title replace="view/displayname">Ubuntu 5.04</tal:title> | 21 | <tal:title replace="view/displayname">Ubuntu 5.04</tal:title> |
394 | 25 | </h1> | 22 | </h1> |
395 | 26 | 23 | ||
396 | 27 | <p id="description"> | 24 | <div class="top-portlet"> |
397 | 28 | A language pack is an export of all translation files used at run time | 25 | <p id="description"> |
398 | 29 | by the applications in | 26 | A language pack is an export of all translation files used at run time |
399 | 30 | <tal:distribution replace="view/displayname" />. | 27 | by the applications in |
400 | 31 | These language packs are the last ones generated or in use by | 28 | <tal:distribution replace="view/displayname" />. |
401 | 32 | <tal:distribution replace="view/displayname" /> | 29 | These language packs are the last ones generated or in use by |
402 | 33 | </p> | 30 | <tal:distribution replace="view/displayname" /> |
403 | 34 | 31 | </p> | |
404 | 35 | <h2>Current language packs</h2> | 32 | |
405 | 36 | <dl> | 33 | <p tal:condition="context/distribution/language_pack_admin"> |
406 | 37 | <dt> | 34 | Language packs are administered by |
407 | 38 | <img tal:condition="context/language_pack_base" | 35 | <tal:admin replace=" |
408 | 39 | alt="download icon" src="/@@/download" /> | 36 | structure context/distribution/language_pack_admin/fmt:link"> |
409 | 40 | Base pack: | 37 | Peter Langomat |
410 | 41 | <a tal:condition="context/language_pack_base" | 38 | </tal:admin><a |
411 | 42 | tal:attributes="href context/language_pack_base/file/http_url"> | 39 | tal:condition="context/distribution/required:launchpad.Edit" |
412 | 43 | <tal:export-date | 40 | tal:attributes="href string:${context/distribution/fmt:url}/+select-language-pack-admin" |
413 | 44 | replace="context/language_pack_base/date_exported/fmt:datetime" /> | 41 | title="Change language pack administrator"><img |
414 | 45 | </a> | 42 | class="edit sprite"/></a>. |
415 | 46 | <tal:not-export-date condition="not: context/language_pack_base"> | 43 | </p> |
416 | 47 | none yet | 44 | </div> |
417 | 48 | </tal:not-export-date> | 45 | <div class="yui-g"> |
418 | 49 | <br />A complete set of translations for the OS. | 46 | <div class="yui-u first portlet"> |
419 | 50 | </dt> | 47 | <h2>Active language packs</h2> |
420 | 51 | <dt> | 48 | <dl> |
421 | 52 | <img tal:condition="context/language_pack_delta" | 49 | <dt> |
422 | 53 | alt="download icon" src="/@@/download" /> | 50 | Base pack: |
423 | 54 | Delta pack: | 51 | <a tal:condition="context/language_pack_base" |
424 | 55 | <a tal:condition="context/language_pack_delta" | 52 | tal:attributes="href context/language_pack_base/file/http_url"> |
425 | 56 | tal:attributes="href context/language_pack_delta/file/http_url"> | 53 | <tal:export-date |
426 | 57 | <tal:export-date | 54 | replace="context/language_pack_base/date_exported/fmt:datetime" /> |
427 | 58 | replace="context/language_pack_delta/date_exported/fmt:datetime" /> | 55 | <img tal:condition="context/language_pack_base" |
428 | 59 | </a> | 56 | alt="download icon" src="/@@/download" /> |
429 | 60 | <tal:not-export-date condition="not: context/language_pack_delta"> | 57 | </a> |
430 | 61 | none yet | 58 | <tal:not-export-date condition="not: context/language_pack_base"> |
431 | 62 | </tal:not-export-date> | 59 | none yet |
432 | 63 | <br />Translation updates, applied on top of the base pack. | 60 | </tal:not-export-date> |
433 | 64 | </dt> | 61 | </dt> |
434 | 65 | </dl> | 62 | <dd>A complete set of translations for the OS.</dd> |
435 | 66 | 63 | <dt> | |
436 | 67 | <h2>Language pack being tested</h2> | 64 | Delta pack: |
437 | 68 | <dl tal:condition="context/language_pack_proposed"> | 65 | <a tal:condition="context/language_pack_delta" |
438 | 69 | <dt> | 66 | tal:attributes="href context/language_pack_delta/file/http_url"> |
439 | 70 | <img alt="download icon" src="/@@/download" /> | 67 | <tal:export-date |
440 | 71 | <tal:type content="context/language_pack_proposed/type/name" /> | 68 | replace="context/language_pack_delta/date_exported/fmt:datetime" /> |
441 | 72 | language pack: | 69 | <img tal:condition="context/language_pack_delta" |
442 | 73 | <a tal:attributes=" | 70 | alt="download icon" src="/@@/download" /> |
443 | 74 | href context/language_pack_proposed/file/http_url"> | 71 | </a> |
444 | 75 | <tal:export-date | 72 | <tal:not-export-date condition="not: context/language_pack_delta"> |
445 | 76 | condition="context/language_pack_proposed" | 73 | none yet |
446 | 77 | replace="context/language_pack_proposed/date_exported/fmt:datetime" | 74 | </tal:not-export-date> |
447 | 78 | /> | 75 | </dt> |
448 | 79 | </a> | 76 | <dd>Translation updates, applied on top of the base pack.</dd> |
449 | 80 | <br />This one is being tested to become the new | 77 | </dl> |
450 | 81 | <tal:type content="context/language_pack_proposed/type/name" /> | 78 | </div> |
451 | 82 | language pack. | 79 | <div class="yui-u"> |
452 | 83 | </dt> | 80 | <div class="portlet"> |
453 | 84 | </dl> | 81 | <h2>Language pack being tested</h2> |
454 | 85 | <p tal:condition="not:context/language_pack_proposed"> | 82 | <dl tal:condition="context/language_pack_proposed"> |
455 | 86 | No pack is being tested right now. | 83 | <dt> |
456 | 87 | </p> | 84 | <tal:type content="context/language_pack_proposed/type/name" /> |
457 | 88 | 85 | language pack: | |
458 | 89 | <tal:has-unused condition="view/unused_language_packs"> | 86 | <a tal:attributes=" |
459 | 90 | <h2>Currently unused language packs</h2> | 87 | href context/language_pack_proposed/file/http_url"> |
460 | 91 | <dl> | 88 | <tal:export-date |
461 | 92 | <dt tal:repeat="lang_pack view/unused_language_packs"> | 89 | condition="context/language_pack_proposed" |
462 | 93 | <img alt="download icon" src="/@@/download" /> | 90 | replace="context/language_pack_proposed/date_exported/fmt:datetime" |
463 | 94 | <tal:type content="lang_pack/type/title" /> language pack: | 91 | /> |
464 | 95 | <a tal:attributes="href lang_pack/file/http_url"> | 92 | <img alt="download icon" src="/@@/download" /> |
465 | 96 | <tal:date-exported | 93 | </a> |
466 | 97 | content="lang_pack/date_exported/fmt:datetime" /> | 94 | </dt> |
467 | 98 | </a>. | 95 | <dd>This one is being tested to become the new |
468 | 99 | </dt> | 96 | <tal:type content="context/language_pack_proposed/type/name" /> |
469 | 100 | </dl> | 97 | language pack. |
470 | 101 | </tal:has-unused> | 98 | </dd> |
471 | 102 | </div> | 99 | </dl> |
472 | 103 | <div tal:condition="view/is_admin"> | 100 | <p tal:condition="not:context/language_pack_proposed"> |
473 | 104 | <h2 class="adminlabel" | 101 | No pack is being tested right now. |
474 | 105 | tal:content="view/adminlabel">Language pack settings</h2> | 102 | </p> |
475 | 106 | <div metal:use-macro="context/@@launchpad_form/form"> </div> | 103 | </div> |
476 | 104 | </div> | ||
477 | 105 | </div> | ||
478 | 106 | |||
479 | 107 | <div class="yui-g"> | ||
480 | 108 | <div class="yui-u first portlet" tal:condition="view/is_admin"> | ||
481 | 109 | <h2 class="adminlabel" | ||
482 | 110 | tal:content="view/adminlabel">Language pack settings</h2> | ||
483 | 111 | <div metal:use-macro="context/@@launchpad_form/form"> </div> | ||
484 | 112 | </div> | ||
485 | 113 | <div class="yui-u" tal:condition="view/unused_language_packs"> | ||
486 | 114 | <div class="portlet"> | ||
487 | 115 | <h2>Currently unused language packs</h2> | ||
488 | 116 | <ul> | ||
489 | 117 | <li tal:repeat="lang_pack view/unused_language_packs"> | ||
490 | 118 | <tal:type content="lang_pack/type/title" /> language pack: | ||
491 | 119 | <a tal:attributes="href lang_pack/file/http_url"> | ||
492 | 120 | <tal:date-exported | ||
493 | 121 | content="lang_pack/date_exported/fmt:datetime" /> | ||
494 | 122 | <img alt="download icon" src="/@@/download" /> | ||
495 | 123 | </a> | ||
496 | 124 | </li> | ||
497 | 125 | </ul> | ||
498 | 126 | </div> | ||
499 | 127 | </div> | ||
500 | 128 | </div> | ||
501 | 107 | </div> | 129 | </div> |
502 | 108 | 130 | ||
503 | 109 | </div> | 131 | </div> |
504 | 110 | 132 | ||
505 | === modified file 'lib/lp/translations/templates/productseries-translations-bzr-import.pt' | |||
506 | --- lib/lp/translations/templates/productseries-translations-bzr-import.pt 2009-07-17 17:59:07 +0000 | |||
507 | +++ lib/lp/translations/templates/productseries-translations-bzr-import.pt 2009-09-01 19:36:28 +0000 | |||
508 | @@ -3,10 +3,7 @@ | |||
509 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
510 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
511 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
516 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
513 | 7 | lang="en" | ||
514 | 8 | dir="ltr" | ||
515 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
517 | 10 | i18n:domain="launchpad" | 7 | i18n:domain="launchpad" |
518 | 11 | > | 8 | > |
519 | 12 | <body> | 9 | <body> |
520 | @@ -21,57 +18,69 @@ | |||
521 | 21 | 18 | ||
522 | 22 | <div metal:fill-slot="main"> | 19 | <div metal:fill-slot="main"> |
523 | 23 | 20 | ||
573 | 24 | <h1>Request one-time import of translations</h1> | 21 | <tal:form tal:condition="context/branch"> |
574 | 25 | 22 | <div metal:use-macro="context/@@launchpad_form/form"> | |
575 | 26 | <p | 23 | <div metal:fill-slot="extra_info"> |
576 | 27 | class="not-translated-in-launchpad" | 24 | <p class="not-translated-in-launchpad" |
577 | 28 | tal:condition="not: context/product/official_rosetta"> | 25 | tal:condition="not: context/product/official_rosetta"> |
578 | 29 | <strong> | 26 | <strong> |
579 | 30 | This project is not configured to use Launchpad for translations. | 27 | This project is not configured to use Launchpad for |
580 | 31 | </strong> | 28 | translations. |
581 | 32 | <tal:admin_or_owner condition="context/product/required:launchpad.Edit"> | 29 | </strong> |
582 | 33 | You can change this in the | 30 | <tal:admin_or_owner condition=" |
583 | 34 | <a tal:attributes="href view/product_edit_url"> | 31 | context/product/required:launchpad.Edit"> |
584 | 35 | project settings</a>. (<a href="/+help/getting-started-for-your-project.html" target="help">Getting started with translating your project in Launchpad</a>) | 32 | You can change this in the |
585 | 36 | </tal:admin_or_owner> | 33 | <a tal:attributes="href view/product_edit_url"> |
586 | 37 | </p> | 34 | project settings</a>. |
587 | 38 | 35 | (<a href="/+help/getting-started-for-your-project.html" | |
588 | 39 | <tal:rosetta condition="context/product/official_rosetta"> | 36 | target="help">Getting started with translating your project |
589 | 40 | <p> | 37 | in Launchpad</a>) |
590 | 41 | You can ask Launchpad for a one-time import of all the translation files | 38 | </tal:admin_or_owner> |
591 | 42 | (templates and translations) that it finds in | 39 | </p> |
592 | 43 | <strong><tal:series replace="structure view/series_title"> | 40 | |
593 | 44 | Evolution Series:trunk</tal:series>'s</strong> official Bazaar branch. | 41 | <tal:rosetta condition="context/product/official_rosetta"> |
594 | 45 | (<a href="https://help.launchpad.net/Translations/ImportPolicy">Read the | 42 | <p> |
595 | 46 | translations import policy</a>) | 43 | You can ask Launchpad for a one-time import of all the |
596 | 47 | </p> | 44 | translation files (templates and translations) that it finds in |
597 | 48 | <p tal:condition="not:view/has_imports_enabled" id="settings-display"> | 45 | <strong><tal:series replace="structure view/series_title"> |
598 | 49 | <img src="/@@/info" class="inline-icon" /> | 46 | Evolution Series:trunk</tal:series>'s</strong> |
599 | 50 | To enable continuous imports please change the settings | 47 | official Bazaar branch. |
600 | 51 | <a tal:attributes="href view/translations_settings_url">here</a>. | 48 | (<a href="https://help.launchpad.net/Translations/ImportPolicy" |
601 | 52 | </p> | 49 | >Read the translations import policy</a>) |
602 | 53 | <p tal:condition="view/context/branch" | 50 | </p> |
603 | 54 | tal:define="branch view/context/branch" | 51 | <p tal:condition="not:view/has_imports_enabled" |
604 | 55 | id="branch-display"> | 52 | id="settings-display"> |
605 | 56 | The official Bazaar branch is: | 53 | <img src="/@@/info" class="inline-icon" /> |
606 | 57 | <img src="/@@/branch" class="inline-icon" /> | 54 | To enable continuous imports please change the settings |
607 | 58 | <a tal:attributes="href branch/fmt:url; title branch/bzr_identity" | 55 | <a tal:attributes="href view/translations_settings_url">here</a>. |
608 | 59 | tal:content="branch/displayname"> | 56 | </p> |
609 | 60 | branchname | 57 | </tal:rosetta> |
610 | 61 | </a> | 58 | <p tal:define="branch context/branch" |
611 | 62 | <a tal:attributes="href view/link_branch_url; | 59 | id="branch-display"> |
612 | 63 | title string:Change official branch" | 60 | The official Bazaar branch is: |
613 | 64 | ><img src="/@@/edit" class="inline-icon" /></a> | 61 | <img src="/@@/branch" class="inline-icon" /> |
614 | 65 | </p> | 62 | <a tal:attributes="href branch/fmt:url; title branch/bzr_identity" |
615 | 66 | <p tal:condition="not:view/context/branch" | 63 | tal:content="branch/displayname"> |
616 | 67 | id="no-branch-display"> | 64 | branchname |
617 | 68 | This series does not have an official Bazaar branch. | 65 | </a> |
618 | 69 | <a tal:attributes="href view/link_branch_url"> | 66 | <a tal:attributes="href view/link_branch_url; |
619 | 70 | Please set it first.</a></p> | 67 | title string:Change official branch" |
620 | 71 | <tal:form tal:condition="view/context/branch"> | 68 | ><img src="/@@/edit" class="inline-icon" /></a> |
621 | 72 | <div metal:use-macro="context/@@launchpad_form/form"></div> | 69 | </p> |
622 | 70 | </div> | ||
623 | 71 | </div> | ||
624 | 73 | </tal:form> | 72 | </tal:form> |
626 | 74 | </tal:rosetta> | 73 | <tal:no-branch condition="not:context/branch"> |
627 | 74 | <h1 tal:content="view/label" /> | ||
628 | 75 | <div class="main-portlet"> | ||
629 | 76 | <p tal:condition="not:view/context/branch" | ||
630 | 77 | id="no-branch-display"> | ||
631 | 78 | This series does not have an official Bazaar branch. | ||
632 | 79 | <a tal:attributes="href view/link_branch_url"> | ||
633 | 80 | Please set it first.</a> | ||
634 | 81 | </p> | ||
635 | 82 | </div> | ||
636 | 83 | </tal:no-branch> | ||
637 | 75 | </div> | 84 | </div> |
638 | 76 | 85 | ||
639 | 77 | </body> | 86 | </body> |
640 | 78 | 87 | ||
641 | === modified file 'lib/lp/translations/templates/productseries-translations-settings.pt' | |||
642 | --- lib/lp/translations/templates/productseries-translations-settings.pt 2009-07-19 04:41:14 +0000 | |||
643 | +++ lib/lp/translations/templates/productseries-translations-settings.pt 2009-09-01 12:00:37 +0000 | |||
644 | @@ -3,10 +3,7 @@ | |||
645 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
646 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
647 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
652 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
649 | 7 | lang="en" | ||
650 | 8 | dir="ltr" | ||
651 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
653 | 10 | i18n:domain="launchpad" | 7 | i18n:domain="launchpad" |
654 | 11 | > | 8 | > |
655 | 12 | <body> | 9 | <body> |
656 | @@ -21,99 +18,113 @@ | |||
657 | 21 | 18 | ||
658 | 22 | <div metal:fill-slot="main"> | 19 | <div metal:fill-slot="main"> |
659 | 23 | 20 | ||
753 | 24 | <h1>Translations settings</h1> | 21 | <div class="top-portlet"> |
754 | 25 | 22 | <h1>Translations settings</h1> | |
755 | 26 | <p | 23 | <p |
756 | 27 | class="not-translated-in-launchpad" | 24 | class="not-translated-in-launchpad" |
757 | 28 | tal:condition="not: context/product/official_rosetta"> | 25 | tal:condition="not: context/product/official_rosetta"> |
758 | 29 | <strong> | 26 | <strong> |
759 | 30 | This project is not configured to use Launchpad for translations. | 27 | This project is not configured to use Launchpad for translations. |
760 | 31 | </strong> | 28 | </strong> |
761 | 32 | <tal:admin_or_owner condition="context/product/required:launchpad.Edit"> | 29 | <tal:admin_or_owner condition="context/product/required:launchpad.Edit"> |
762 | 33 | You can change this in the | 30 | You can change this in the |
763 | 34 | <a tal:attributes="href view/product_edit_url"> | 31 | <a tal:attributes="href view/product_edit_url"> |
764 | 35 | project settings</a>. | 32 | project settings</a>. |
765 | 36 | </tal:admin_or_owner> | 33 | </tal:admin_or_owner> |
766 | 37 | </p> | 34 | </p> |
767 | 38 | 35 | </div> | |
768 | 39 | <tal:rosetta condition="context/product/official_rosetta"> | 36 | |
769 | 40 | <h2>Import translations from branch</h2> | 37 | <div class="yui-g"> |
770 | 41 | <p> | 38 | <div class="yui-u first portlet"> |
771 | 42 | You can ask Launchpad to continuously import any translation | 39 | <div metal:use-macro="context/@@launchpad_form/form" class="portlet"> |
772 | 43 | files (templates and translations) that it finds in | 40 | <div metal:fill-slot="extra_info"> |
773 | 44 | <strong><tal:series replace="structure view/series_title"> | 41 | |
774 | 45 | Evolution Series:trunk</tal:series>'s</strong> official Bazaar branch. | 42 | <tal:rosetta condition="context/product/official_rosetta"> |
775 | 46 | After the initial import, Launchpad will continue to scan your Bazaar | 43 | <h2>Import translations from branch</h2> |
776 | 47 | branch for updates to template and translation files. | 44 | <p> |
777 | 48 | </p> | 45 | You can ask Launchpad to continuously import any translation |
778 | 49 | <p id="bzr-request-display"> | 46 | files (templates and translations) that it finds in |
779 | 50 | <img src="/@@/info" class="inline-icon" /> | 47 | <strong><tal:series replace="structure view/series_title"> |
780 | 51 | If you only need a one-time import, please request it | 48 | Evolution Series:trunk</tal:series>'s</strong> official Bazaar branch. |
781 | 52 | <a tal:attributes="href view/request_bzr_import_url">here</a>. | 49 | After the initial import, Launchpad will continue to scan your Bazaar |
782 | 53 | </p> | 50 | branch for updates to template and translation files. |
783 | 54 | <p tal:condition="view/context/branch" | 51 | </p> |
784 | 55 | tal:define="branch view/context/branch" | 52 | <p id="bzr-request-display"> |
785 | 56 | id="branch-display"> | 53 | <img src="/@@/info" class="inline-icon" /> |
786 | 57 | The official Bazaar branch is: | 54 | If you only need a one-time import, please request it |
787 | 58 | <img src="/@@/branch" class="inline-icon" /> | 55 | <a tal:attributes="href view/request_bzr_import_url">here</a>. |
788 | 59 | <a tal:attributes="href branch/fmt:url; title branch/bzr_identity" | 56 | </p> |
789 | 60 | tal:content="branch/displayname"> | 57 | <p tal:condition="view/context/branch" |
790 | 61 | branchname | 58 | tal:define="branch view/context/branch" |
791 | 62 | </a> | 59 | id="branch-display"> |
792 | 63 | <a tal:attributes="href view/link_branch_url; | 60 | The official Bazaar branch is: |
793 | 64 | title string:Change official branch" | 61 | <img src="/@@/branch" class="inline-icon" /> |
794 | 65 | ><img src="/@@/edit" class="inline-icon" /></a> | 62 | <a tal:attributes="href branch/fmt:url; title branch/bzr_identity" |
795 | 66 | </p> | 63 | tal:content="branch/displayname"> |
796 | 67 | <p tal:condition="not:view/context/branch" | 64 | branchname |
797 | 68 | id="no-branch-display"> | 65 | </a> |
798 | 69 | This series does not have an official Bazaar branch. | 66 | <a tal:attributes="href view/link_branch_url; |
799 | 70 | <a tal:attributes="href view/link_branch_url">Set it now!</a> | 67 | title string:Change official branch" |
800 | 71 | </p> | 68 | ><img src="/@@/edit" class="inline-icon" /></a> |
801 | 72 | <div metal:use-macro="context/@@launchpad_form/form"></div> | 69 | </p> |
802 | 73 | 70 | <p tal:condition="not:view/context/branch" | |
803 | 74 | <h2>Export translations to branch</h2> | 71 | id="no-branch-display"> |
804 | 75 | <p> | 72 | This series does not have an official Bazaar branch. |
805 | 76 | Launchpad can commit daily snapshots of the translations for this | 73 | <a tal:attributes="href view/link_branch_url">Set it now!</a> |
806 | 77 | release series to a code branch. | 74 | </p> |
807 | 78 | </p> | 75 | </tal:rosetta> |
808 | 79 | <p> | 76 | </div> |
809 | 80 | Use this to make it easy to download the latest translations using | 77 | </div> |
810 | 81 | Bazaar, or to make sure the latest Launchpad translations are always | 78 | </div> |
811 | 82 | included with the files you distribute. | 79 | <div class="yui-u"> |
812 | 83 | </p> | 80 | <div class="portlet"> |
813 | 84 | <p> | 81 | |
814 | 85 | <strong>Warning:</strong> This may replace translation files that are | 82 | <h2>Export translations to branch</h2> |
815 | 86 | already in the branch you choose. You should consider creating a | 83 | <p> |
816 | 87 | separate branch where Launchpad can commit translations. | 84 | Launchpad can commit daily snapshots of the translations for this |
817 | 88 | </p> | 85 | release series to a code branch. |
818 | 89 | 86 | </p> | |
819 | 90 | <p id="translations-branch"> | 87 | <p> |
820 | 91 | <tal:no-translations-branch condition="not: context/translations_branch"> | 88 | Use this to make it easy to download the latest translations using |
821 | 92 | Currently not exporting translations to a branch. | 89 | Bazaar, or to make sure the latest Launchpad translations are always |
822 | 93 | <a href="+link-translations-branch"> | 90 | included with the files you distribute. |
823 | 94 | Choose a target branch. | 91 | </p> |
824 | 95 | <img src="/@@/edit" class="inline-icon" alt="edit" /> | 92 | <p> |
825 | 96 | </a> | 93 | <strong>Warning:</strong> This may replace translation files that are |
826 | 97 | </tal:no-translations-branch> | 94 | already in the branch you choose. You should consider creating a |
827 | 98 | <tal:translations-branch condition="context/translations_branch"> | 95 | separate branch where Launchpad can commit translations. |
828 | 99 | Exporting translations to branch: | 96 | </p> |
829 | 100 | <img src="/@@/branch" class="inline-icon" /> | 97 | |
830 | 101 | <a | 98 | <p id="translations-branch"> |
831 | 102 | id="translations-branch-link" | 99 | <tal:no-translations-branch condition="not: context/translations_branch"> |
832 | 103 | tal:attributes="href context/translations_branch/fmt:url; | 100 | Currently not exporting translations to a branch. |
833 | 104 | title string:Change translations export branch" | 101 | <a href="+link-translations-branch"> |
834 | 105 | tal:content="context/translations_branch/displayname" | 102 | Choose a target branch. |
835 | 106 | >branch name</a> | 103 | <img src="/@@/edit" class="inline-icon" alt="edit" /> |
836 | 107 | <a | 104 | </a> |
837 | 108 | id="translations-branch-edit-link" | 105 | </tal:no-translations-branch> |
838 | 109 | tal:attributes="href string:+link-translations-branch; | 106 | <tal:translations-branch condition="context/translations_branch"> |
839 | 110 | title string:Set translations export branch" | 107 | Exporting translations to branch: |
840 | 111 | ><img src="/@@/edit" class="inline-icon" alt="edit" /></a> | 108 | <img src="/@@/branch" class="inline-icon" /> |
841 | 112 | 109 | <a | |
842 | 113 | </tal:translations-branch> | 110 | id="translations-branch-link" |
843 | 114 | </p> | 111 | tal:attributes="href context/translations_branch/fmt:url; |
844 | 115 | 112 | title string:Change translations export branch" | |
845 | 116 | </tal:rosetta> | 113 | tal:content="context/translations_branch/displayname" |
846 | 114 | >branch name</a> | ||
847 | 115 | <a | ||
848 | 116 | id="translations-branch-edit-link" | ||
849 | 117 | tal:attributes="href string:+link-translations-branch; | ||
850 | 118 | title string:Set translations export branch" | ||
851 | 119 | ><img src="/@@/edit" class="inline-icon" alt="edit" /></a> | ||
852 | 120 | |||
853 | 121 | </tal:translations-branch> | ||
854 | 122 | </p> | ||
855 | 123 | |||
856 | 124 | </div> | ||
857 | 125 | </div> | ||
858 | 126 | </div> | ||
859 | 127 | |||
860 | 117 | </div> | 128 | </div> |
861 | 118 | 129 | ||
862 | 119 | </body> | 130 | </body> |
863 | 120 | 131 | ||
864 | === modified file 'lib/lp/translations/templates/translationimportqueueentry-index.pt' | |||
865 | --- lib/lp/translations/templates/translationimportqueueentry-index.pt 2009-08-31 22:18:05 +0000 | |||
866 | +++ lib/lp/translations/templates/translationimportqueueentry-index.pt 2009-09-01 12:09:27 +0000 | |||
867 | @@ -3,10 +3,7 @@ | |||
868 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
869 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
870 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
875 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
872 | 7 | lang="en" | ||
873 | 8 | dir="ltr" | ||
874 | 9 | metal:use-macro="context/@@main_template/master" | ||
876 | 10 | i18n:domain="launchpad" | 7 | i18n:domain="launchpad" |
877 | 11 | > | 8 | > |
878 | 12 | <body> | 9 | <body> |
879 | @@ -24,7 +21,7 @@ | |||
880 | 24 | 'PO': | 21 | 'PO': |
881 | 25 | ['field.potemplate', 'field.potemplate_name', | 22 | ['field.potemplate', 'field.potemplate_name', |
882 | 26 | 'field.language', 'field.variant'], | 23 | 'field.language', 'field.variant'], |
884 | 27 | 'UNSPEC': [] | 24 | 'UNSPEC': [] |
885 | 28 | }; | 25 | }; |
886 | 29 | var nodes = {}; | 26 | var nodes = {}; |
887 | 30 | var last_file_type = 'UNSPEC'; | 27 | var last_file_type = 'UNSPEC'; |
888 | @@ -58,11 +55,11 @@ | |||
889 | 58 | } | 55 | } |
890 | 59 | 56 | ||
891 | 60 | function updateCurrentFileType(file_type) { | 57 | function updateCurrentFileType(file_type) { |
897 | 61 | for (ftype in nodes) { | 58 | for (ftype in nodes) { |
898 | 62 | // Logic has been inverted in the next line to avoid | 59 | // Logic has been inverted in the next line to avoid |
899 | 63 | // breaking XHTML compliance of the template due to | 60 | // breaking XHTML compliance of the template due to |
900 | 64 | // ampersand usage. | 61 | // ampersand usage. |
901 | 65 | if (!(ftype != file_type || nodes[ftype] != null)) { | 62 | if (!(ftype == file_type || nodes[ftype] == null)) { |
902 | 66 | nodes[ftype].addClass('dont_show_fields'); | 63 | nodes[ftype].addClass('dont_show_fields'); |
903 | 67 | } | 64 | } |
904 | 68 | } | 65 | } |
905 | @@ -103,7 +100,12 @@ | |||
906 | 103 | </metal:script> | 100 | </metal:script> |
907 | 104 | 101 | ||
908 | 105 | <div metal:fill-slot="main"> | 102 | <div metal:fill-slot="main"> |
910 | 106 | <div metal:use-macro="context/@@launchpad_form/form" /> | 103 | <div metal:use-macro="context/@@launchpad_form/form"> |
911 | 104 | <div metal:fill-slot="extra_info"> | ||
912 | 105 | <input type="hidden" name="next_url" | ||
913 | 106 | tal:attributes="value view/referrer_url" /> | ||
914 | 107 | </div> | ||
915 | 108 | </div> | ||
916 | 107 | </div> | 109 | </div> |
917 | 108 | 110 | ||
918 | 109 | </body> | 111 | </body> |
919 | 110 | 112 |
= Bug #423103, #423104 =
Migrate a few "complex" forms: those which do use LaunchpadForm, but
embedded in a bigger page. Changes are mostly mechanical to make them
3.0-compatible.
== Implementation details ==
Lots of whitespace fixes (replacing tabs with spaces and similar) and
reindentation increase the size of the diff.
For translationimpo rtqueueentry- index.pt, I also improve next_url ortQueueEntry edit form, and after
handling so we get back to the import queue which we started from
(basically, +imports page is registered on all of IProduct,
IProductSeries, IDistribution, IDistroSeries, IPerson, but they all go
to the same ITranslationImp
submission should go back). A separate test is added for that, though
it does exhibit some Zope testbrowser bugs in referrer handling.
Everything else is just bits and pieces moved around.
I've also moved translation import queue tests into a separate "story"
so they are easier to run when needed.
== Tests ==
bin/test -vvt stories.importqueue -t translations- xpi-import. txt -t productseries- translations- bzr-request -t distroseries- language- pack
== Demo and Q/A ==
translationsimp ortqueueentry- index.pt:
https:/ /translations. launchpad. dev/+imports/ 1 +imports, /~name16/+imports)
(and get there through /+imports, /evolution/
distroseries- language- packs.pt:
https:/ /translations. launchpad. dev/ubuntu/ hoary/+ language- packs
productseries- translations- bzr-import. pt:
https:/ /translations. launchpad. dev/evolution/ trunk/+ request- bzr-import
productseries- translations- settings. pt:
https:/ /translations. launchpad. dev/evolution/ trunk/+ translations- settings
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: translations/ stories/ standalone/ xx-translations -xpi-import. txt translations/ stories/ productseries/ xx-productserie s-translations- bzr-request. txt translations/ stories/ importqueue/ xx-translation- import- queue-entry. txt /launchpad/ pagetitles. py translations/ templates/ distroseries- language- packs.pt translations/ browser/ translationimpo rtqueue. py translations/ stories/ importqueue/ xx-translation- import- queue-filtering .txt translations/ templates/ productseries- translations- settings. pt translations/ templates/ productseries- translations- bzr-import. pt translations/ stories/ importqueue/ xx-translation- import- queue.txt translations/ browser/ productseries. py translations/ templates/ translationimpo rtqueueentry- index.pt translations/ stories/ importqueue/ xx-translation- import- queue-edit- autofilling. txt translations/ stories/ distroseries/ xx-distroseries -language- packs.txt
lib/lp/
lib/lp/
lib/lp/
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/