Merge lp:~ursinha/launchpad/bug-545124-changed-in-lp-refactoring into lp:~launchpad/launchpad/recife
- bug-545124-changed-in-lp-refactoring
- Merge into recife
Proposed by
Ursula Junque
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~ursinha/launchpad/bug-545124-changed-in-lp-refactoring | ||||
Merge into: | lp:~launchpad/launchpad/recife | ||||
Diff against target: |
665 lines (+87/-85) 17 files modified
lib/lp/translations/browser/pofile.py (+6/-6) lib/lp/translations/browser/tests/test_pofile_view.py (+3/-3) lib/lp/translations/doc/pofile-verify-stats.txt (+2/-2) lib/lp/translations/doc/pofile.txt (+13/-12) lib/lp/translations/interfaces/pofile.py (+4/-3) lib/lp/translations/model/pofile.py (+8/-8) lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt (+1/-1) lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt (+5/-5) lib/lp/translations/stories/translations/43-distrorelease-translations.txt (+5/-5) lib/lp/translations/stories/translations/55-rosetta-potemplates.txt (+5/-5) lib/lp/translations/templates/pofile-translate.pt (+3/-3) lib/lp/translations/templates/potemplate-chart.pt (+1/-1) lib/lp/translations/templates/rosetta-status-legend.pt (+1/-1) lib/lp/translations/templates/serieslanguage-index.pt (+1/-1) lib/lp/translations/tests/test_pofile.py (+22/-22) lib/lp/translations/tests/test_potmsgset.py (+5/-5) lib/lp/translations/utilities/tests/import-flags.txt (+2/-2) |
||||
To merge this branch: | bzr merge lp:~ursinha/launchpad/bug-545124-changed-in-lp-refactoring | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+21949@code.launchpad.net |
Commit message
Description of the change
This branch changes all 'changed in LP' to 'changed in Ubuntu' idea, this is bug 545124, not really much to say here :)
To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) : | # |
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/translations/browser/pofile.py' |
2 | --- lib/lp/translations/browser/pofile.py 2010-02-25 00:47:17 +0000 |
3 | +++ lib/lp/translations/browser/pofile.py 2010-03-23 19:06:29 +0000 |
4 | @@ -297,7 +297,7 @@ |
5 | 'translated': self.context.translatedCount, |
6 | 'untranslated': self.context.untranslatedCount, |
7 | 'new_suggestions': self.context.unreviewedCount, |
8 | - 'changed_in_launchpad': self.context.updatesCount, |
9 | + 'changed_in_ubuntu': self.context.updatesCount, |
10 | } |
11 | |
12 | if self.show not in count_functions: |
13 | @@ -346,8 +346,8 @@ |
14 | 'translated': self.context.getPOTMsgSetTranslated, |
15 | 'untranslated': self.context.getPOTMsgSetUntranslated, |
16 | 'new_suggestions': self.context.getPOTMsgSetWithNewSuggestions, |
17 | - 'changed_in_launchpad': |
18 | - self.context.getPOTMsgSetChangedInLaunchpad, |
19 | + 'changed_in_ubuntu': |
20 | + self.context.getPOTMsgSetChangedInUbuntu, |
21 | } |
22 | |
23 | if self.show not in get_functions: |
24 | @@ -877,7 +877,7 @@ |
25 | 'translated': self.context.translatedCount, |
26 | 'untranslated': self.context.untranslatedCount, |
27 | 'new_suggestions': self.context.unreviewedCount, |
28 | - 'changed_in_launchpad': self.context.updatesCount, |
29 | + 'changed_in_ubuntu': self.context.updatesCount, |
30 | } |
31 | |
32 | if self.show not in count_functions: |
33 | @@ -910,8 +910,8 @@ |
34 | 'translated': self.context.getPOTMsgSetTranslated, |
35 | 'untranslated': self.context.getPOTMsgSetUntranslated, |
36 | 'new_suggestions': self.context.getPOTMsgSetWithNewSuggestions, |
37 | - 'changed_in_launchpad': |
38 | - self.context.getPOTMsgSetChangedInLaunchpad, |
39 | + 'changed_in_ubuntu': |
40 | + self.context.getPOTMsgSetChangedInUbuntu, |
41 | } |
42 | |
43 | if self.show not in get_functions: |
44 | |
45 | === modified file 'lib/lp/translations/browser/tests/test_pofile_view.py' |
46 | --- lib/lp/translations/browser/tests/test_pofile_view.py 2009-09-09 18:03:44 +0000 |
47 | +++ lib/lp/translations/browser/tests/test_pofile_view.py 2010-03-23 19:06:29 +0000 |
48 | @@ -59,7 +59,7 @@ |
49 | self.factory.makeTranslationMessage( |
50 | self.pofile, self.new_suggestion, suggestion=True, |
51 | date_updated=self.now()) |
52 | - # An imported that was changed in Launchpad. |
53 | + # An upstream that was changed in Ubuntu. |
54 | self.changed = self.factory.makePOTMsgSet( |
55 | self.potemplate, sequence=4) |
56 | self.factory.makeTranslationMessage( |
57 | @@ -110,8 +110,8 @@ |
58 | self.assertEqual(1, view.shown_count) |
59 | self._assertEqualPOTMsgSets([self.new_suggestion], view.messages) |
60 | |
61 | - def test_show_changed_in_launchpad(self): |
62 | - form = {'show': 'changed_in_launchpad'} |
63 | + def test_show_changed_in_ubuntu(self): |
64 | + form = {'show': 'changed_in_ubuntu'} |
65 | view = POFileBaseView(self.pofile, LaunchpadTestRequest(form=form)) |
66 | view.initialize() |
67 | self.assertEqual(1, view.shown_count) |
68 | |
69 | === modified file 'lib/lp/translations/doc/pofile-verify-stats.txt' |
70 | --- lib/lp/translations/doc/pofile-verify-stats.txt 2009-08-10 16:52:41 +0000 |
71 | +++ lib/lp/translations/doc/pofile-verify-stats.txt 2010-03-23 19:06:29 +0000 |
72 | @@ -1,7 +1,7 @@ |
73 | = POFile statistics = |
74 | |
75 | We frequently display statistics about POFiles: how many of its messages |
76 | -remain untranslated, how many have been changed in Launchpad, how many have |
77 | +remain untranslated, how many have been changed in Ubuntu, how many have |
78 | had suggested translations submitted that need to be reviewed? |
79 | |
80 | It takes too long to gather these statistics on demand, so we cache them in |
81 | @@ -64,7 +64,7 @@ |
82 | (0, 0, 3, 0) |
83 | |
84 | We have a POFile with zero current, updated, and unreviewed translations, and |
85 | -3 translations changed in Launchpad (compared to upstream). |
86 | +3 translations changed in Ubuntu (compared to upstream). |
87 | |
88 | A software bug incorrectly sets the number of changed translations to 999. |
89 | |
90 | |
91 | === modified file 'lib/lp/translations/doc/pofile.txt' |
92 | --- lib/lp/translations/doc/pofile.txt 2010-02-01 15:06:20 +0000 |
93 | +++ lib/lp/translations/doc/pofile.txt 2010-03-23 19:06:29 +0000 |
94 | @@ -40,7 +40,7 @@ |
95 | |
96 | >>> dummy_pofile.getPOTMsgSetTranslated().count() |
97 | 0 |
98 | - >>> dummy_pofile.getPOTMsgSetChangedInLaunchpad().count() |
99 | + >>> dummy_pofile.getPOTMsgSetChangedInUbuntu().count() |
100 | 0 |
101 | >>> dummy_pofile.getPOTMsgSetWithNewSuggestions().count() |
102 | 0 |
103 | @@ -789,10 +789,11 @@ |
104 | [None, None, None] |
105 | |
106 | |
107 | -== getPOTMsgSetChangedInLaunchpad == |
108 | +== getPOTMsgSetChangedInUbuntu == |
109 | |
110 | This method returns only those POTMsgSet's which contain translation |
111 | -submissions through Launchpad which change existing published translations. |
112 | +submissions through Launchpad for Ubuntu which change existing published |
113 | +translations. |
114 | |
115 | Lets get Evolution Spanish translation in distribution Hoary. |
116 | |
117 | @@ -808,9 +809,9 @@ |
118 | >>> pofile_changed = potemplate.getPOFileByLang('es') |
119 | |
120 | This translation file already contains one message which has been changed in |
121 | -Launchpad. |
122 | +Ubuntu. |
123 | |
124 | - >>> potmsgsets = list(pofile_changed.getPOTMsgSetChangedInLaunchpad()) |
125 | + >>> potmsgsets = list(pofile_changed.getPOTMsgSetChangedInUbuntu()) |
126 | >>> len(potmsgsets) |
127 | 1 |
128 | >>> stats = pofile_changed.updateStatistics() |
129 | @@ -819,8 +820,8 @@ |
130 | |
131 | This message is also counted as translated message (number of translated |
132 | messages is the number of imported/currentCount plus number of newly |
133 | -translated in Launchpad/rosettaCount plus number of changed in |
134 | -Launchpad/updatesCount): |
135 | +translated in Ubuntu/rosettaCount plus number of changed in |
136 | +Ubuntu/updatesCount): |
137 | |
138 | >>> print pofile_changed.currentCount() |
139 | 6 |
140 | @@ -832,7 +833,7 @@ |
141 | 0 |
142 | |
143 | We make sure that submissions on untranslated strings are not considered |
144 | -'changed in Launchpad', since this method is mainly designed to help |
145 | +'changed in Ubuntu', since this method is mainly designed to help |
146 | translators revert translations to published translations. |
147 | |
148 | Lets get a single untranslated POTMsgSet. |
149 | @@ -855,9 +856,9 @@ |
150 | ... pofile_changed.owner, {0: u'sample translation'}, |
151 | ... is_imported=False, lock_timestamp=datetime.datetime.now(UTC)) |
152 | |
153 | -And make sure that the count of changed in Launchpad hasn't changed. |
154 | +And make sure that the count of changed in Ubuntu hasn't changed. |
155 | |
156 | - >>> potmsgsets = list(pofile_changed.getPOTMsgSetChangedInLaunchpad()) |
157 | + >>> potmsgsets = list(pofile_changed.getPOTMsgSetChangedInUbuntu()) |
158 | >>> len(potmsgsets) |
159 | 1 |
160 | >>> stats = pofile_changed.updateStatistics() |
161 | @@ -885,9 +886,9 @@ |
162 | >>> from canonical.database.sqlbase import flush_database_caches |
163 | >>> flush_database_caches() |
164 | |
165 | -And make sure that the count of messages changed in Launchpad _has_ changed: |
166 | +And make sure that the count of messages changed in Ubuntu _has_ changed: |
167 | |
168 | - >>> potmsgsets = list(pofile_changed.getPOTMsgSetChangedInLaunchpad()) |
169 | + >>> potmsgsets = list(pofile_changed.getPOTMsgSetChangedInUbuntu()) |
170 | >>> len(potmsgsets) |
171 | 2 |
172 | |
173 | |
174 | === modified file 'lib/lp/translations/interfaces/pofile.py' |
175 | --- lib/lp/translations/interfaces/pofile.py 2010-01-08 12:39:51 +0000 |
176 | +++ lib/lp/translations/interfaces/pofile.py 2010-03-23 19:06:29 +0000 |
177 | @@ -172,11 +172,12 @@ |
178 | """Get pot message sets with suggestions submitted after last review. |
179 | """ |
180 | |
181 | - def getPOTMsgSetChangedInLaunchpad(): |
182 | + def getPOTMsgSetChangedInUbuntu(): |
183 | """Get pot message sets changed through Launchpad in this PO file. |
184 | |
185 | - 'Changed in Launchpad' are only those which were translated when |
186 | - initially imported, but then got overridden in Launchpad. |
187 | + 'Changed in Ubuntu' are only those which were translated when |
188 | + initially imported, but then got overridden in Ubuntu translations |
189 | + through Launchpad. |
190 | """ |
191 | |
192 | def getPOTMsgSetWithErrors(): |
193 | |
194 | === modified file 'lib/lp/translations/model/pofile.py' |
195 | --- lib/lp/translations/model/pofile.py 2010-01-14 16:39:18 +0000 |
196 | +++ lib/lp/translations/model/pofile.py 2010-03-23 19:06:29 +0000 |
197 | @@ -804,13 +804,13 @@ |
198 | return self._getOrderedPOTMsgSets( |
199 | [POTMsgSet, TranslationTemplateItem], query) |
200 | |
201 | - def getPOTMsgSetChangedInLaunchpad(self): |
202 | + def getPOTMsgSetChangedInUbuntu(self): |
203 | """See `IPOFile`.""" |
204 | - # POT set has been changed in Launchpad if it contains active |
205 | + # POT set has been changed in Ubuntu if it contains active |
206 | # translation which didn't come from a published package |
207 | # (iow, it's different from a published translation: this only |
208 | - # lists translations which have actually changed in LP, not |
209 | - # translations which are 'new' and only exist in LP). |
210 | + # lists translations which have actually changed in Ubuntu, not |
211 | + # translations which are 'new' and only exist in Ubuntu). |
212 | |
213 | # TranslationMessage is changed if: |
214 | # is_current IS TRUE, is_imported IS FALSE, |
215 | @@ -957,7 +957,7 @@ |
216 | |
217 | # Get the number of translations that we have updated from what we got |
218 | # from imports. |
219 | - updates = self.getPOTMsgSetChangedInLaunchpad().count() |
220 | + updates = self.getPOTMsgSetChangedInUbuntu().count() |
221 | |
222 | # Get total number of messages in a POTemplate. |
223 | if self.potemplate.messageCount() > 0: |
224 | @@ -966,12 +966,12 @@ |
225 | total = self.potemplate.getPOTMsgSets().count() |
226 | self.potemplate.messagecount = total |
227 | |
228 | - # Get number of translations done only in Launchpad. |
229 | + # Get number of translations done only in Ubuntu. |
230 | untranslated = self.getPOTMsgSetUntranslated().count() |
231 | translated = total - untranslated |
232 | rosetta = translated - current |
233 | |
234 | - # Get number of unreviewed translations in Launchpad. |
235 | + # Get number of unreviewed translations in Ubuntu. |
236 | unreviewed = self.getPOTMsgSetWithNewSuggestions().count() |
237 | |
238 | self.currentcount = current |
239 | @@ -1396,7 +1396,7 @@ |
240 | """See `IPOFile`.""" |
241 | return self.emptySelectResults() |
242 | |
243 | - def getPOTMsgSetChangedInLaunchpad(self): |
244 | + def getPOTMsgSetChangedInUbuntu(self): |
245 | """See `IPOFile`.""" |
246 | return self.emptySelectResults() |
247 | |
248 | |
249 | === modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt' |
250 | --- lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2009-09-15 18:53:26 +0000 |
251 | +++ lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2010-03-23 19:06:29 +0000 |
252 | @@ -139,7 +139,7 @@ |
253 | |
254 | >>> browser.getControl(name='show', index=1).displayOptions |
255 | ['all items', 'untranslated items', 'translated items', |
256 | - 'items with new suggestions', 'items changed in Launchpad'] |
257 | + 'items with new suggestions', 'items changed in Ubuntu'] |
258 | |
259 | Carlos sets the filter to display only the untranslated strings. |
260 | |
261 | |
262 | === modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt' |
263 | --- lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2009-11-09 17:08:21 +0000 |
264 | +++ lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2010-03-23 19:06:29 +0000 |
265 | @@ -216,21 +216,21 @@ |
266 | <div lang="en-AU"...id="msgset_1_en_AU_suggestion_702_0"...>fnord</div> |
267 | |
268 | |
269 | -=== Messages changed in Launchpad === |
270 | +=== Messages changed in Ubuntu === |
271 | |
272 | -No Privileges Person can see entries which have changed in Launchpad. |
273 | +No Privileges Person can see entries which have changed in Ubuntu. |
274 | There is only one message in the batch. |
275 | |
276 | >>> user_browser.open( |
277 | ... 'http://translations.launchpad.dev/ubuntu/hoary/' |
278 | ... '+source/evolution/+pots/evolution-2.2/es/+translate') |
279 | >>> user_browser.getControl(name='show', index=1).displayValue = [ |
280 | - ... 'changed in Launchpad'] |
281 | + ... 'changed in Ubuntu'] |
282 | >>> user_browser.getControl('Change').click() |
283 | >>> print extract_url_parameter(user_browser.url, 'batch') |
284 | batch=10 |
285 | >>> print extract_url_parameter(user_browser.url, 'show') |
286 | - show=changed_in_launchpad |
287 | + show=changed_in_ubuntu |
288 | |
289 | >>> contents = find_main_content(user_browser.contents) |
290 | >>> print_batch_header(contents) |
291 | @@ -247,7 +247,7 @@ |
292 | >>> print extract_url_parameter(user_browser.url, 'batch') |
293 | batch=10 |
294 | >>> print extract_url_parameter(user_browser.url, 'show') |
295 | - show=changed_in_launchpad |
296 | + show=changed_in_ubuntu |
297 | |
298 | >>> print_shown_messages(user_browser) |
299 | 134: '<samp> </samp>caratas' |
300 | |
301 | === modified file 'lib/lp/translations/stories/translations/43-distrorelease-translations.txt' |
302 | --- lib/lp/translations/stories/translations/43-distrorelease-translations.txt 2009-09-09 12:41:48 +0000 |
303 | +++ lib/lp/translations/stories/translations/43-distrorelease-translations.txt 2010-03-23 19:06:29 +0000 |
304 | @@ -140,10 +140,10 @@ |
305 | The DistroRelease per-language overview page shows different statistics: |
306 | a count of untranslated messages, messages with new, unreviewed suggestions, |
307 | and a count of messages which had their imported translations changed in |
308 | -Launchpad. |
309 | +Ubuntu. |
310 | |
311 | Looking at the Spanish language overview page, we can see that there are |
312 | -15 untranslated, 1 unreviewed and 1 changed in LP Evolution translations |
313 | +15 untranslated, 1 unreviewed and 1 changed in Ubuntu Evolution translations |
314 | (all numbers repeated as hidden 'sortkey' values). |
315 | |
316 | >>> browser.open('http://translations.launchpad.dev/ubuntu/hoary/+lang/es') |
317 | @@ -195,7 +195,7 @@ |
318 | ['new_suggestions'] |
319 | |
320 | The number of updated entries points to the translation page with the |
321 | -'changed in Launchpad' filter selected. |
322 | +'changed in Ubuntu' filter selected. |
323 | |
324 | >>> updated = all_links[3] |
325 | >>> print extract_text(updated) |
326 | @@ -203,6 +203,6 @@ |
327 | >>> updated_link = extract_link_from_tag(updated, base_href) |
328 | >>> browser.open(updated_link.encode('UTF-8')) |
329 | >>> browser.url |
330 | - 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_launchpad' |
331 | + 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_ubuntu' |
332 | >>> print browser.getControl(name='show', index=1).value |
333 | - ['changed_in_launchpad'] |
334 | + ['changed_in_ubuntu'] |
335 | |
336 | === modified file 'lib/lp/translations/stories/translations/55-rosetta-potemplates.txt' |
337 | --- lib/lp/translations/stories/translations/55-rosetta-potemplates.txt 2009-12-21 17:27:17 +0000 |
338 | +++ lib/lp/translations/stories/translations/55-rosetta-potemplates.txt 2010-03-23 19:06:29 +0000 |
339 | @@ -101,10 +101,10 @@ |
340 | The POTemplate overview page shows different statistics: a count of |
341 | untranslated messages, messages with new, unreviewed suggestions, and |
342 | a count of messages which had their imported translations changed in |
343 | -Launchpad. |
344 | +Ubuntu. |
345 | |
346 | Looking at the POTemplate overview page, we can see that there are |
347 | -15 untranslated, 1 unreviewed and 1 changed in LP Spanish translations |
348 | +15 untranslated, 1 unreviewed and 1 changed in Ubuntu Spanish translations |
349 | (all numbers repeated as hidden 'sortkey' values). |
350 | |
351 | >>> browser.open('http://translations.launchpad.dev/ubuntu/hoary/+source/'+ |
352 | @@ -156,7 +156,7 @@ |
353 | new_suggestions |
354 | |
355 | The number of updated entries points to the translation page with the |
356 | -'changed in Launchpad' filter selected. |
357 | +'changed in Ubuntu' filter selected. |
358 | |
359 | >>> updated = all_links[3] |
360 | >>> print extract_text(updated) |
361 | @@ -164,6 +164,6 @@ |
362 | >>> updated_link = extract_link_from_tag(updated, base_href) |
363 | >>> browser.open(updated_link.encode('UTF-8')) |
364 | >>> browser.url |
365 | - 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_launchpad' |
366 | + 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?show=changed_in_ubuntu' |
367 | >>> print browser.getControl(name='show', index=2).value |
368 | - changed_in_launchpad |
369 | + changed_in_ubuntu |
370 | |
371 | === modified file 'lib/lp/translations/templates/pofile-translate.pt' |
372 | --- lib/lp/translations/templates/pofile-translate.pt 2010-02-25 00:47:17 +0000 |
373 | +++ lib/lp/translations/templates/pofile-translate.pt 2010-03-23 19:06:29 +0000 |
374 | @@ -162,11 +162,11 @@ |
375 | > |
376 | items with new suggestions |
377 | </option> |
378 | - <option value="changed_in_launchpad" |
379 | + <option value="changed_in_ubuntu" |
380 | tal:attributes="selected |
381 | - request/htmlform:show/selected/changed_in_launchpad" |
382 | + request/htmlform:show/selected/changed_in_ubuntu" |
383 | > |
384 | - items changed in Launchpad |
385 | + items changed in Ubuntu |
386 | </option> |
387 | </select> |
388 | </label> |
389 | |
390 | === modified file 'lib/lp/translations/templates/potemplate-chart.pt' |
391 | --- lib/lp/translations/templates/potemplate-chart.pt 2009-07-17 17:59:07 +0000 |
392 | +++ lib/lp/translations/templates/potemplate-chart.pt 2010-03-23 19:06:29 +0000 |
393 | @@ -52,7 +52,7 @@ |
394 | </td> |
395 | <td> |
396 | <span class="sortkey" tal:content="pf/updatesCount">0</span> |
397 | - <a tal:attributes="href string:${pf/fmt:url}/+translate?show=changed_in_launchpad" |
398 | + <a tal:attributes="href string:${pf/fmt:url}/+translate?show=changed_in_ubuntu" |
399 | tal:condition="pf/updatesCount" |
400 | tal:content="pf/updatesCount" |
401 | >0</a> |
402 | |
403 | === modified file 'lib/lp/translations/templates/rosetta-status-legend.pt' |
404 | --- lib/lp/translations/templates/rosetta-status-legend.pt 2009-07-17 17:59:07 +0000 |
405 | +++ lib/lp/translations/templates/rosetta-status-legend.pt 2010-03-23 19:06:29 +0000 |
406 | @@ -19,7 +19,7 @@ |
407 | src="/@@/blue-bar" |
408 | style="height: 1em; width: 2em;" |
409 | /> |
410 | - Changed in Launchpad |
411 | + Changed in Ubuntu |
412 | </div> |
413 | <div> |
414 | <img |
415 | |
416 | === modified file 'lib/lp/translations/templates/serieslanguage-index.pt' |
417 | --- lib/lp/translations/templates/serieslanguage-index.pt 2009-12-11 20:11:06 +0000 |
418 | +++ lib/lp/translations/templates/serieslanguage-index.pt 2010-03-23 19:06:29 +0000 |
419 | @@ -128,7 +128,7 @@ |
420 | tal:content="entry/updatesCount"> |
421 | 0 |
422 | </span> |
423 | - <a tal:attributes="href string:${entry/fmt:url}/+translate?show=changed_in_launchpad" |
424 | + <a tal:attributes="href string:${entry/fmt:url}/+translate?show=changed_in_ubuntu" |
425 | tal:condition="entry/updatesCount" |
426 | tal:content="entry/updatesCount" |
427 | > |
428 | |
429 | === modified file 'lib/lp/translations/tests/test_pofile.py' |
430 | --- lib/lp/translations/tests/test_pofile.py 2010-01-12 21:29:03 +0000 |
431 | +++ lib/lp/translations/tests/test_pofile.py 2010-03-23 19:06:29 +0000 |
432 | @@ -594,12 +594,12 @@ |
433 | self.devel_sr_pofile.getPOTMsgSetWithNewSuggestions()) |
434 | self.assertEquals([], found_translations) |
435 | |
436 | - def test_getPOTMsgSetChangedInLaunchpad(self): |
437 | + def test_getPOTMsgSetChangedInUbuntu(self): |
438 | # Test listing of POTMsgSets which contain changes from imports. |
439 | |
440 | - # If there are no translations, nothing is listed. |
441 | + # If there are no translations in Ubuntu, nothing is listed. |
442 | found_translations = list( |
443 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
444 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
445 | self.assertEquals(found_translations, []) |
446 | |
447 | # Adding a non-imported current translation doesn't change anything. |
448 | @@ -608,7 +608,7 @@ |
449 | translations=[u"Non-imported translation"]) |
450 | self.assertEquals(translation.is_imported, False) |
451 | found_translations = list( |
452 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
453 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
454 | self.assertEquals(found_translations, []) |
455 | |
456 | # Adding an imported translation which is also current indicates |
457 | @@ -619,18 +619,18 @@ |
458 | self.assertEquals(translation.is_imported, True) |
459 | self.assertEquals(translation.is_current, True) |
460 | found_translations = list( |
461 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
462 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
463 | self.assertEquals(found_translations, []) |
464 | |
465 | # However, changing current translation to a non-imported one |
466 | - # makes this a changed in LP translation. |
467 | + # makes this a changed in Ubuntu translation. |
468 | translation = self.factory.makeSharedTranslationMessage( |
469 | pofile=self.devel_sr_pofile, potmsgset=self.potmsgset, |
470 | translations=[u"Changed translation"], is_imported=False) |
471 | self.assertEquals(translation.is_imported, False) |
472 | self.assertEquals(translation.is_current, True) |
473 | found_translations = list( |
474 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
475 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
476 | self.assertEquals(found_translations, [self.potmsgset]) |
477 | |
478 | # Adding a diverged, non-imported translation, still lists |
479 | @@ -641,7 +641,7 @@ |
480 | self.assertEquals(translation.is_imported, False) |
481 | self.assertEquals(translation.is_current, True) |
482 | found_translations = list( |
483 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
484 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
485 | self.assertEquals(found_translations, [self.potmsgset]) |
486 | |
487 | # But adding a diverged current and imported translation means |
488 | @@ -654,7 +654,7 @@ |
489 | self.assertEquals(translation.is_imported, True) |
490 | self.assertEquals(translation.is_current, True) |
491 | found_translations = list( |
492 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
493 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
494 | self.assertEquals(found_translations, []) |
495 | |
496 | # Changing from a diverged, imported translation is correctly |
497 | @@ -665,10 +665,10 @@ |
498 | self.assertEquals(translation.is_imported, False) |
499 | self.assertEquals(translation.is_current, True) |
500 | found_translations = list( |
501 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
502 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
503 | self.assertEquals(found_translations, [self.potmsgset]) |
504 | |
505 | - def test_getPOTMsgSetChangedInLaunchpad_diverged_imported(self): |
506 | + def test_getPOTMsgSetChangedInUbuntu_diverged_imported(self): |
507 | # If there is a diverged imported (but non-current) message |
508 | # and a shared current message, it should not be listed as changed. |
509 | # Even though that is generally incorrect, this is a situation |
510 | @@ -698,11 +698,11 @@ |
511 | |
512 | # Such POTMsgSet is not considered changed in this PO file. |
513 | found_translations = list( |
514 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
515 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
516 | self.assertEquals(found_translations, []) |
517 | |
518 | - def test_getPOTMsgSetChangedInLaunchpad_SharedDiverged(self): |
519 | - # Test listing of changed in LP for shared/diverged messages. |
520 | + def test_getPOTMsgSetChangedInUbuntu_SharedDiverged(self): |
521 | + # Test listing of changed in Ubuntu for shared/diverged messages. |
522 | |
523 | # Adding an imported translation which is also current indicates |
524 | # that there are no changes. |
525 | @@ -712,7 +712,7 @@ |
526 | self.assertEquals(translation.is_imported, True) |
527 | self.assertEquals(translation.is_current, True) |
528 | found_translations = list( |
529 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
530 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
531 | self.assertEquals(found_translations, []) |
532 | |
533 | # Adding a diverged, non-imported translation makes it appear |
534 | @@ -723,7 +723,7 @@ |
535 | self.assertEquals(translation.is_imported, False) |
536 | self.assertEquals(translation.is_current, True) |
537 | found_translations = list( |
538 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
539 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
540 | self.assertEquals(found_translations, [self.potmsgset]) |
541 | |
542 | def test_getPOTMsgSetWithErrors(self): |
543 | @@ -743,7 +743,7 @@ |
544 | # We are constructing a POFile with: |
545 | # - 2 untranslated message |
546 | # - 2 unreviewed suggestions (for translated and untranslated each) |
547 | - # - 2 imported translations, out of which 1 is changed in LP |
548 | + # - 2 imported translations, out of which 1 is changed in Ubuntu |
549 | # - 1 LP-provided translation |
550 | # For a total of 6 messages, 4 translated (1 from import, |
551 | # 3 only in LP, where 1 is changed from imported). |
552 | @@ -775,7 +775,7 @@ |
553 | pofile=self.devel_sr_pofile, potmsgset=potmsgset, |
554 | translations=[u"Imported translation"], is_imported=True) |
555 | |
556 | - # Fifth POTMsgSet is translated in import, but changed in LP. |
557 | + # Fifth POTMsgSet is translated in import, but changed in Ubuntu. |
558 | potmsgset = self.factory.makePOTMsgSet(self.devel_potemplate) |
559 | potmsgset.setSequence(self.devel_potemplate, 5) |
560 | translation = self.factory.makeTranslationMessage( |
561 | @@ -1070,7 +1070,7 @@ |
562 | self.assertEquals(untranslated_potmsgsets, |
563 | [self.potmsgset1, self.potmsgset2]) |
564 | |
565 | - def test_getPOTMsgSetChangedInLaunchpad_ordering(self): |
566 | + def test_getPOTMsgSetChangedInUbuntu_ordering(self): |
567 | # Suggest a translation on both POTMsgSets in devel_sr_pofile, |
568 | # so they are returned with getPOTMsgSetWithNewSuggestions() call. |
569 | imported1 = self.factory.makeSharedTranslationMessage( |
570 | @@ -1095,7 +1095,7 @@ |
571 | is_imported=False) |
572 | |
573 | potmsgsets = list( |
574 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
575 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
576 | self.assertEquals(potmsgsets, |
577 | [self.potmsgset1, self.potmsgset2]) |
578 | |
579 | @@ -1106,13 +1106,13 @@ |
580 | |
581 | # And they are returned in the new order as desired. |
582 | potmsgsets = list( |
583 | - self.stable_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
584 | + self.stable_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
585 | self.assertEquals(potmsgsets, |
586 | [self.potmsgset2, self.potmsgset1]) |
587 | |
588 | # Order is unchanged for the previous template. |
589 | potmsgsets = list( |
590 | - self.devel_sr_pofile.getPOTMsgSetChangedInLaunchpad()) |
591 | + self.devel_sr_pofile.getPOTMsgSetChangedInUbuntu()) |
592 | self.assertEquals(potmsgsets, |
593 | [self.potmsgset1, self.potmsgset2]) |
594 | |
595 | |
596 | === modified file 'lib/lp/translations/tests/test_potmsgset.py' |
597 | --- lib/lp/translations/tests/test_potmsgset.py 2010-03-06 06:21:04 +0000 |
598 | +++ lib/lp/translations/tests/test_potmsgset.py 2010-03-23 19:06:29 +0000 |
599 | @@ -434,7 +434,7 @@ |
600 | [external_suggestion]) |
601 | |
602 | def test_hasTranslationChangedInLaunchpad(self): |
603 | - """Make sure checking whether a translation is changed in LP works.""" |
604 | + """Check whether a translation is changed in Ubuntu works.""" |
605 | |
606 | sr_pofile = self.factory.makePOFile('sr', self.devel_potemplate) |
607 | serbian = sr_pofile.language |
608 | @@ -446,7 +446,7 @@ |
609 | False) |
610 | |
611 | # If only a current, non-imported translation exists, it's not |
612 | - # changed in LP. |
613 | + # changed in Ubuntu. |
614 | current_shared = self.factory.makeSharedTranslationMessage( |
615 | pofile=sr_pofile, potmsgset=self.potmsgset, |
616 | is_imported=False) |
617 | @@ -455,7 +455,7 @@ |
618 | self.devel_potemplate, serbian), |
619 | False) |
620 | |
621 | - # If imported translation is current, it's not changed in LP. |
622 | + # If imported translation is current, it's not changed in Ubuntu. |
623 | current_shared.is_current = False |
624 | imported_shared = self.factory.makeSharedTranslationMessage( |
625 | pofile=sr_pofile, potmsgset=self.potmsgset, |
626 | @@ -466,7 +466,7 @@ |
627 | False) |
628 | |
629 | # If there's a current, diverged translation, and an imported |
630 | - # non-current one, it's changed in LP. |
631 | + # non-current one, it's changed in Ubuntu. |
632 | imported_shared.is_current = False |
633 | current_diverged = self.factory.makeTranslationMessage( |
634 | pofile=sr_pofile, potmsgset=self.potmsgset, |
635 | @@ -477,7 +477,7 @@ |
636 | True) |
637 | |
638 | # If imported one is shared and current, yet there is a diverged |
639 | - # current translation as well, it is changed in LP. |
640 | + # current translation as well, it is changed in Ubuntu. |
641 | imported_shared.is_current = False |
642 | self.assertEquals( |
643 | self.potmsgset.hasTranslationChangedInLaunchpad( |
644 | |
645 | === modified file 'lib/lp/translations/utilities/tests/import-flags.txt' |
646 | --- lib/lp/translations/utilities/tests/import-flags.txt 2009-07-02 17:16:50 +0000 |
647 | +++ lib/lp/translations/utilities/tests/import-flags.txt 2010-03-23 19:06:29 +0000 |
648 | @@ -242,7 +242,7 @@ |
649 | 6. sixth None None * |
650 | |
651 | We can notice that we have 4 translations (fuzzy messages are not considered |
652 | -translated), with "second" imported one now considered 'changed in LP', and |
653 | +translated), with "second" imported one now considered 'changed in Ubuntu', and |
654 | two new translations through Launchpad ("d-from-LP" and "e-from-LP"): |
655 | |
656 | >>> print_pofile_stats(firefox_serbian) |
657 | @@ -312,7 +312,7 @@ |
658 | With this latest import, we've got five non-fuzzy messages, which are all |
659 | considered 'translated'. Since we are reverting to imported translations |
660 | when there's only a Launchpad-done translation, only a single message is |
661 | -marked as 'changed in LP': |
662 | +marked as 'changed in Ubuntu': |
663 | |
664 | >>> print_pofile_stats(firefox_serbian) |
665 | total: 6 |