Merge lp:~cjwatson/launchpad/translations-pagetests-future-imports into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18678
Proposed branch: lp:~cjwatson/launchpad/translations-pagetests-future-imports
Merge into: lp:launchpad
Diff against target: 6928 lines (+990/-993)
83 files modified
lib/lp/translations/browser/tests/distroseries-views.txt (+4/-5)
lib/lp/translations/browser/tests/language-views.txt (+15/-16)
lib/lp/translations/browser/tests/pofile-views.txt (+22/-19)
lib/lp/translations/browser/tests/potemplate-views.txt (+10/-4)
lib/lp/translations/browser/tests/productseries-views.txt (+4/-4)
lib/lp/translations/browser/tests/test_views.py (+3/-2)
lib/lp/translations/browser/tests/translationimportqueue-views.txt (+13/-13)
lib/lp/translations/browser/tests/translationmessage-views.txt (+8/-8)
lib/lp/translations/browser/tests/translator-views.txt (+9/-9)
lib/lp/translations/stories/buildfarm/xx-build-summary.txt (+4/-4)
lib/lp/translations/stories/distribution/xx-distribution-change-language-pack-admins.txt (+1/-1)
lib/lp/translations/stories/distribution/xx-distribution-translations.txt (+14/-14)
lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt (+15/-14)
lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt (+5/-5)
lib/lp/translations/stories/importqueue/xx-entry-details.txt (+10/-10)
lib/lp/translations/stories/importqueue/xx-entry-error-output.txt (+4/-4)
lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.txt (+1/-1)
lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt (+6/-6)
lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt (+13/-13)
lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt (+22/-22)
lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt (+24/-24)
lib/lp/translations/stories/navigation-links/pofile.txt (+2/-3)
lib/lp/translations/stories/navigation-links/pomsgset.txt (+2/-2)
lib/lp/translations/stories/navigation-links/potemplate.txt (+2/-2)
lib/lp/translations/stories/productseries/xx-productseries-export-to-branch.txt (+11/-11)
lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt (+5/-6)
lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt (+10/-10)
lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt (+7/-7)
lib/lp/translations/stories/productseries/xx-productseries-translations.txt (+40/-40)
lib/lp/translations/stories/project/xx-project-translations.txt (+9/-9)
lib/lp/translations/stories/standalone/custom-language-codes.txt (+15/-15)
lib/lp/translations/stories/standalone/xx-language.txt (+40/-42)
lib/lp/translations/stories/standalone/xx-licensing.txt (+7/-7)
lib/lp/translations/stories/standalone/xx-person-activity.txt (+4/-4)
lib/lp/translations/stories/standalone/xx-person-editlanguages.txt (+19/-19)
lib/lp/translations/stories/standalone/xx-pofile-auto-alt-languages.txt (+3/-5)
lib/lp/translations/stories/standalone/xx-pofile-details.txt (+8/-8)
lib/lp/translations/stories/standalone/xx-pofile-export.txt (+7/-7)
lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt (+10/-10)
lib/lp/translations/stories/standalone/xx-pofile-translate-dismiss-suggestions.txt (+17/-18)
lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt (+2/-3)
lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt (+5/-5)
lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt (+2/-1)
lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt (+21/-21)
lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt (+8/-8)
lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt (+13/-12)
lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt (+1/-2)
lib/lp/translations/stories/standalone/xx-pofile-translate-private-issues.txt (+9/-9)
lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt (+1/-1)
lib/lp/translations/stories/standalone/xx-pofile-translate.txt (+14/-15)
lib/lp/translations/stories/standalone/xx-potemplate-admin.txt (+10/-10)
lib/lp/translations/stories/standalone/xx-potemplate-edit.txt (+6/-8)
lib/lp/translations/stories/standalone/xx-potemplate-export.txt (+2/-3)
lib/lp/translations/stories/standalone/xx-potemplate-index.txt (+22/-24)
lib/lp/translations/stories/standalone/xx-product-export.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-product-translations.txt (+27/-27)
lib/lp/translations/stories/standalone/xx-products-with-translations.txt (+1/-2)
lib/lp/translations/stories/standalone/xx-rosetta-distributionsourcepackage-list.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-rosetta-homepage.txt (+6/-6)
lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt (+6/-7)
lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt (+4/-4)
lib/lp/translations/stories/standalone/xx-series-templates.txt (+13/-13)
lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt (+31/-34)
lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-template-description-escaping.txt (+2/-4)
lib/lp/translations/stories/standalone/xx-test-potlists.txt (+2/-2)
lib/lp/translations/stories/standalone/xx-translation-access-display.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-translation-credits.txt (+7/-7)
lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt (+71/-71)
lib/lp/translations/stories/standalone/xx-translations-to-complete.txt (+5/-5)
lib/lp/translations/stories/standalone/xx-translations-to-review.txt (+5/-5)
lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt (+6/-6)
lib/lp/translations/stories/translationfocus/xx-product-translationfocus.txt (+12/-9)
lib/lp/translations/stories/translationgroups/xx-change-translation-policy.txt (+8/-8)
lib/lp/translations/stories/translationgroups/xx-link-to-documentation.txt (+16/-16)
lib/lp/translations/stories/translationgroups/xx-translationgroups.txt (+115/-115)
lib/lp/translations/stories/translations/xx-translations.txt (+65/-65)
lib/lp/translations/stories/webservice/xx-potemplate.txt (+1/-2)
lib/lp/translations/stories/webservice/xx-translationfocus.txt (+8/-7)
lib/lp/translations/stories/webservice/xx-translationimportqueue.txt (+16/-16)
lib/lp/translations/tests/test_doc.py (+8/-3)
To merge this branch: bzr merge lp:~cjwatson/launchpad/translations-pagetests-future-imports
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+347330@code.launchpad.net

Commit message

Convert pagetests under lp.translations to Launchpad's preferred __future__ imports.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Self-approving: large, test-only, and mostly mechanical. I had to hack around a deficiency in our current zope.publisher (it gets confused with Unicode filenames in some cases, which really shouldn't be a thing), but that's fixed in >= 4.0.0a1 so I left XXX comments.

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/tests/distroseries-views.txt'
2--- lib/lp/translations/browser/tests/distroseries-views.txt 2012-06-29 08:40:05 +0000
3+++ lib/lp/translations/browser/tests/distroseries-views.txt 2018-06-03 00:41:33 +0000
4@@ -54,16 +54,16 @@
5 ... distroseries.hide_all_translations = False
6 ... objection = check_translations_access(distroseries)
7 ... if objection is None:
8- ... print "User can access revealed translations."
9+ ... print("User can access revealed translations.")
10 ... else:
11- ... print "No access to revealed translations!", objection
12+ ... print("No access to revealed translations!", objection)
13 ...
14 ... distroseries.hide_all_translations = True
15 ... objection = check_translations_access(distroseries)
16 ... if objection is None:
17- ... print "User can access hidden translations."
18+ ... print("User can access hidden translations.")
19 ... else:
20- ... print "User can not access hidden translations:", objection
21+ ... print("User can not access hidden translations:", objection)
22 ...
23 ... distroseries.hide_all_translations = original_hide_flag
24
25@@ -158,4 +158,3 @@
26 User can access revealed translations.
27 User can not access hidden translations:
28 Translations for this release series are not available yet.
29-
30
31=== modified file 'lib/lp/translations/browser/tests/language-views.txt'
32--- lib/lp/translations/browser/tests/language-views.txt 2014-02-19 04:01:46 +0000
33+++ lib/lp/translations/browser/tests/language-views.txt 2018-06-03 00:41:33 +0000
34@@ -14,20 +14,20 @@
35
36 The language +admin view provides a label and a page_title for the page.
37
38- >>> print language_admin_view.label
39+ >>> print(language_admin_view.label)
40 Edit Portuguese (Brazil) in Launchpad
41
42- >>> print language_admin_view.page_title
43+ >>> print(language_admin_view.page_title)
44 Change details
45
46 The view provides also a cancel_url and a next_url, but they're the same
47 because the previous and next steps of editing a language are returning
48 to its index.
49
50- >>> print language_admin_view.cancel_url
51+ >>> print(language_admin_view.cancel_url)
52 http://translations.launchpad.dev/+languages/pt_BR
53
54- >>> print language_admin_view.next_url
55+ >>> print(language_admin_view.next_url)
56 http://translations.launchpad.dev/+languages/pt_BR
57
58
59@@ -41,7 +41,7 @@
60 ... 'pluralforms': 2,
61 ... 'pluralexpression': '1/n',
62 ... })
63- >>> print language_admin_view.getFieldError('pluralexpression')
64+ >>> print(language_admin_view.getFieldError('pluralexpression'))
65 Division by zero in plural expression for n = 0.
66
67
68@@ -50,18 +50,18 @@
69
70 >>> language_add_view = create_view(language_set, '+add')
71
72- >>> print language_add_view.label
73+ >>> print(language_add_view.label)
74 Register a language in Launchpad
75
76- >>> print language_add_view.page_title
77+ >>> print(language_add_view.page_title)
78 Register a language
79
80 The view provides also a cancel_url and a next_url:
81
82- >>> print language_add_view.cancel_url
83+ >>> print(language_add_view.cancel_url)
84 http://translations.launchpad.dev/+languages
85
86- >>> print language_add_view.field_names
87+ >>> print(language_add_view.field_names)
88 ['code', 'englishname', 'nativename', 'pluralforms',
89 'pluralexpression', 'visible', 'direction']
90
91@@ -82,7 +82,7 @@
92 >>> language_add_view.errors
93 []
94
95- >>> print language_add_view.next_url
96+ >>> print(language_add_view.next_url)
97 http://translations.launchpad.dev/+languages/lp_US
98
99
100@@ -110,7 +110,7 @@
101 >>> friendly_plural_forms = language_view.friendly_plural_forms
102
103 >>> for form_dict in friendly_plural_forms:
104- ... print form_dict['form'], ':', form_dict['examples']
105+ ... print(form_dict['form'], ':', form_dict['examples'])
106 0 : 1, 21, 31, 41, 51, 61...
107 1 : 2, 3, 4, 22, 23, 24...
108 2 : 0, 5, 6, 7, 8, 9...
109@@ -170,7 +170,7 @@
110 >>> translator_merged in top_contributors
111 False
112 >>> for translator in top_contributors:
113- ... print translator.name
114+ ... print(translator.name)
115 translator-main
116 translator-0
117 translator-1
118@@ -190,7 +190,7 @@
119 The user_languages property contains a list of the current user's preferred
120 languages formated as links.
121
122- >>> print languageset_view.user_languages
123+ >>> print(languageset_view.user_languages)
124 <a href=".../ca" ...>Catalan</a>,
125 <a href=".../en" ...>English</a>,
126 <a href=".../es" ...>Spanish</a>
127@@ -198,10 +198,9 @@
128 For a user without any preferred languages, English will be returned.
129
130 >>> person = factory.makePerson()
131- >>> print person.languages
132+ >>> print(person.languages)
133 []
134 >>> ignored = login_person(person)
135 >>> languageset_view = create_initialized_view(language_set, '+index')
136- >>> print languageset_view.user_languages
137+ >>> print(languageset_view.user_languages)
138 <a href=".../en" ...>English</a>
139-
140
141=== modified file 'lib/lp/translations/browser/tests/pofile-views.txt'
142--- lib/lp/translations/browser/tests/pofile-views.txt 2016-01-26 15:47:37 +0000
143+++ lib/lp/translations/browser/tests/pofile-views.txt 2018-06-03 00:41:33 +0000
144@@ -51,8 +51,8 @@
145
146 We know that we want all messages.
147
148- >>> pofile_view.show
149- 'all'
150+ >>> print(pofile_view.show)
151+ all
152
153 This time, we are going to see what happens if we get an IPOFile without
154 the plural form information.
155@@ -81,8 +81,8 @@
156
157 Yeah, it detects it correctly and stores the attribute as it should be.
158
159- >>> pofile_view.show
160- 'translated'
161+ >>> print(pofile_view.show)
162+ translated
163
164 Let's move to the navigation URLS testing.
165
166@@ -149,9 +149,9 @@
167 >>> for translationmessage_view in (
168 ... pofile_view.translationmessage_views):
169 ... translationmessage_view.initialize()
170- >>> print pofile_view.autofocus_html_id
171+ >>> print(pofile_view.autofocus_html_id)
172 msgset_130_es_translation_0_new
173- >>> print pofile_view.translations_order
174+ >>> print(pofile_view.translations_order)
175 msgset_130_es_translation_0_new msgset_131_es_translation_0_new
176 msgset_132_es_translation_0_new msgset_133_es_translation_0_new
177 msgset_134_es_translation_0_new msgset_135_es_translation_0_new
178@@ -207,7 +207,7 @@
179 their POTMsgSets' sequence numbers.
180
181 >>> for potmsgset in pofile_view._getSelectedPOTMsgSets():
182- ... print potmsgset.getSequence(pofile_es.potemplate)
183+ ... print(potmsgset.getSequence(pofile_es.potemplate))
184 1
185 2
186 3
187@@ -293,11 +293,11 @@
188 # >>> pomsgset.potmsgset.id
189 # 144
190 # >>> for text in pomsgset.active_texts:
191-# ... print text
192+# ... print(text)
193 # %d contacto
194 # %d contactos
195 # >>> for text in pomsgset.published_texts:
196-# ... print text
197+# ... print(text)
198 # %d contacto
199 # %d contactos
200 # >>> list(pomsgset.getNewSubmissions(0))
201@@ -305,10 +305,10 @@
202 # >>> list(pomsgset.getNewSubmissions(1))
203 # []
204 # >>> for submission in pomsgset.getCurrentSubmissions(0):
205-# ... print submission.datecreated.isoformat()
206+# ... print(submission.datecreated.isoformat())
207 # 2005-04-07T...
208 # >>> for submission in pomsgset.getCurrentSubmissions(1):
209-# ... print submission.datecreated.isoformat()
210+# ... print(submission.datecreated.isoformat())
211 # 2005-04-07T...
212
213 The POMsgSet we're looking at had its submissions cache pre-populated by the
214@@ -326,11 +326,11 @@
215 # >>> pomsgset.potmsgset.id
216 # 144
217 # >>> for text in pomsgset.active_texts:
218-# ... print text
219+# ... print(text)
220 # %d contacto
221 # %d contactos
222 # >>> for text in pomsgset.published_texts:
223-# ... print text
224+# ... print(text)
225 # %d contacto
226 # %d contactos
227 # >>> list(pomsgset.getNewSubmissions(0))
228@@ -338,10 +338,10 @@
229 # >>> list(pomsgset.getNewSubmissions(1))
230 # []
231 # >>> for submission in pomsgset.getCurrentSubmissions(0):
232-# ... print submission.datecreated.isoformat()
233+# ... print(submission.datecreated.isoformat())
234 # 2005-04-07T...
235 # >>> for submission in pomsgset.getCurrentSubmissions(1):
236-# ... print submission.datecreated.isoformat()
237+# ... print(submission.datecreated.isoformat())
238 # 2005-04-07T...
239
240 Now, we are going to check the alternative language submission.
241@@ -369,16 +369,19 @@
242 >>> translationimportqueue.countEntries()
243 2
244 >>> for entry in translationimportqueue.getAllEntries():
245- ... print entry.id, entry.content.filename
246+ ... print(entry.id, entry.content.filename)
247 1 evolution-2.2-test.pot
248 2 pt_BR.po
249
250 The FileUpload class needs a class with the attributes: filename, file and
251 headers.
252
253+XXX cjwatson 2018-06-02: FileUploadArgument.filename can become a native
254+string again once we're on zope.publisher >= 4.0.0a1.
255+
256 >>> class FileUploadArgument:
257- ... filename='po/es.po'
258- ... file=StringIO('foos')
259+ ... filename=b'po/es.po'
260+ ... file=StringIO(b'foos')
261 ... headers=''
262
263 Now, we do the upload.
264@@ -497,5 +500,5 @@
265
266 And we are redirected to the index page, as expected:
267
268- >>> print pofile_view.request.response.getHeader('Location')
269+ >>> print(pofile_view.request.response.getHeader('Location'))
270 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es
271
272=== modified file 'lib/lp/translations/browser/tests/potemplate-views.txt'
273--- lib/lp/translations/browser/tests/potemplate-views.txt 2015-10-05 08:36:52 +0000
274+++ lib/lp/translations/browser/tests/potemplate-views.txt 2018-06-03 00:41:33 +0000
275@@ -42,9 +42,12 @@
276 The FileUpload class needs a class with the attributes: filename, file and
277 headers.
278
279+XXX cjwatson 2018-06-02: FileUploadArgument.filename can become a native
280+string again once we're on zope.publisher >= 4.0.0a1.
281+
282 >>> class FileUploadArgument:
283- ... filename='po/foo.pot'
284- ... file=StringIO('foos')
285+ ... filename=b'po/foo.pot'
286+ ... file=StringIO(b'foos')
287 ... headers=''
288
289 Now, we do the upload.
290@@ -73,9 +76,12 @@
291 From the IPOTemplate upload form, we can also upload .po files. Let's check
292 that feature...
293
294+XXX cjwatson 2018-06-02: FileUploadArgument.filename can become a native
295+string again once we're on zope.publisher >= 4.0.0a1.
296+
297 >>> class FileUploadArgument:
298- ... filename='po/es.po'
299- ... file=StringIO('foos')
300+ ... filename=b'po/es.po'
301+ ... file=StringIO(b'foos')
302 ... headers=''
303
304 We do the upload...
305
306=== modified file 'lib/lp/translations/browser/tests/productseries-views.txt'
307--- lib/lp/translations/browser/tests/productseries-views.txt 2012-11-08 04:22:30 +0000
308+++ lib/lp/translations/browser/tests/productseries-views.txt 2018-06-03 00:41:33 +0000
309@@ -75,16 +75,16 @@
310 ... 'field.actions.save_settings': 'Save Settings'})
311 >>> view = ProductSeriesTranslationsSettingsView(
312 ... productseries, request)
313- >>> print productseries.translations_autoimport_mode.title
314+ >>> print(productseries.translations_autoimport_mode.title)
315 None
316 >>> view.initialize()
317- >>> print productseries.translations_autoimport_mode.title
318+ >>> print(productseries.translations_autoimport_mode.title)
319 Import template files
320
321 Also, a branch job to upload the full set of translation files has been
322 created to create the initial database entries from the files in the branch.
323
324- >>> print isUploadJobCreatedForBranch(productseries)
325+ >>> print(isUploadJobCreatedForBranch(productseries))
326 True
327
328
329@@ -104,5 +104,5 @@
330 >>> view = ProductSeriesTranslationsBzrImportView(
331 ... productseries, request)
332 >>> view.initialize()
333- >>> print isUploadJobCreatedForBranch(productseries, True)
334+ >>> print(isUploadJobCreatedForBranch(productseries, True))
335 True
336
337=== modified file 'lib/lp/translations/browser/tests/test_views.py'
338--- lib/lp/translations/browser/tests/test_views.py 2011-12-28 17:03:06 +0000
339+++ lib/lp/translations/browser/tests/test_views.py 2018-06-03 00:41:33 +0000
340@@ -1,4 +1,4 @@
341-# Copyright 2009 Canonical Ltd. This software is licensed under the
342+# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
343 # GNU Affero General Public License version 3 (see the file LICENSE).
344
345 """
346@@ -33,7 +33,8 @@
347 for filename in filenames:
348 path = filename
349 one_test = LayeredDocFileSuite(
350- path, setUp=setUp, tearDown=tearDown,
351+ path,
352+ setUp=lambda test: setUp(test, future=True), tearDown=tearDown,
353 layer=LaunchpadFunctionalLayer,
354 stdout_logging_level=logging.WARNING)
355 suite.addTest(one_test)
356
357=== modified file 'lib/lp/translations/browser/tests/translationimportqueue-views.txt'
358--- lib/lp/translations/browser/tests/translationimportqueue-views.txt 2014-08-20 06:59:52 +0000
359+++ lib/lp/translations/browser/tests/translationimportqueue-views.txt 2018-06-03 00:41:33 +0000
360@@ -19,7 +19,7 @@
361
362 >>> from lp.registry.interfaces.person import IPersonSet
363 >>> importer = getUtility(IPersonSet).getByEmail('foo.bar@canonical.com')
364- >>> print importer.displayname
365+ >>> print(importer.displayname)
366 Foo Bar
367
368 A real entry would have been uploaded in the context of productseries or a
369@@ -29,18 +29,18 @@
370 >>> from lp.registry.interfaces.productseries import (
371 ... IProductSeriesSet)
372 >>> productseries = getUtility(IProductSeriesSet).get(3)
373- >>> print productseries.name
374+ >>> print(productseries.name)
375 trunk
376- >>> print productseries.summary
377+ >>> print(productseries.summary)
378 The primary "trunk" of development for this product...
379
380 Now we create the entry in the queue.
381
382 >>> queue = getUtility(ITranslationImportQueue)
383 >>> pot_entry = queue.addOrUpdateEntry(
384- ... 'demo.pot', '# foo', False,
385+ ... 'demo.pot', b'# foo', False,
386 ... importer, productseries=productseries)
387- >>> print pot_entry.path
388+ >>> print(pot_entry.path)
389 demo.pot
390
391 The view is named "+index" and it is found on the TranslationsLayer. We want
392@@ -53,7 +53,7 @@
393
394 Upon initialization the view sets the file type.
395
396- >>> print view.initial_values['file_type']
397+ >>> print(view.initial_values['file_type'])
398 Template
399
400 Validating correct data should not produce an error.
401@@ -68,7 +68,7 @@
402 >>> def validate(view, data):
403 ... view.validate(data)
404 ... for err in view.errors:
405- ... print err
406+ ... print(err)
407 >>> validate(view, data)
408
409 But declaring a different file type would require different data, so we get
410@@ -154,7 +154,7 @@
411 We can upload to a sourcepackagename in the Ubuntu series.
412
413 >>> ubuntu_entry = queue.addOrUpdateEntry(
414- ... 'demo.pot', '# foo', True,
415+ ... 'demo.pot', b'# foo', True,
416 ... importer, distroseries=ubuntuseries,
417 ... sourcepackagename=packagename)
418 >>> ubuntu_view = create_initialized_view(ubuntu_entry, '+index')
419@@ -195,7 +195,7 @@
420
421 >>> other_series = factory.makeProductSeries()
422 >>> other_entry = queue.addOrUpdateEntry(
423- ... 'demo.pot', '# foo', True,
424+ ... 'demo.pot', b'# foo', True,
425 ... importer, productseries=other_series)
426 >>> other_view = create_initialized_view(other_entry, '+index')
427 >>> 'languagepack' in other_view.field_names
428@@ -205,9 +205,9 @@
429 available for selection.
430
431 >>> po_entry = queue.addOrUpdateEntry(
432- ... 'demo.po', '# foo', False,
433+ ... 'demo.po', b'# foo', False,
434 ... importer, productseries=productseries)
435- >>> print po_entry.path
436+ >>> print(po_entry.path)
437 demo.po
438
439 The drop-down list is fed from a vocabulary.
440@@ -215,7 +215,7 @@
441 >>> from lp.translations.vocabularies import TranslationTemplateVocabulary
442 >>> vocab = TranslationTemplateVocabulary(po_entry)
443 >>> for term in vocab:
444- ... print term.title
445+ ... print(term.title)
446 demo-name
447 evolution-2.2
448 evolution-2.2-test
449@@ -229,6 +229,6 @@
450
451 >>> vocab = TranslationTemplateVocabulary(po_entry)
452 >>> for term in vocab:
453- ... print term.title
454+ ... print(term.title)
455 evolution-2.2
456 evolution-2.2-test
457
458=== modified file 'lib/lp/translations/browser/tests/translationmessage-views.txt'
459--- lib/lp/translations/browser/tests/translationmessage-views.txt 2015-10-05 08:36:52 +0000
460+++ lib/lp/translations/browser/tests/translationmessage-views.txt 2018-06-03 00:41:33 +0000
461@@ -37,7 +37,7 @@
462
463 Here we can see that it's lacking that information.
464
465- >>> print translationmessage_page_view.context.language.pluralforms
466+ >>> print(translationmessage_page_view.context.language.pluralforms)
467 None
468
469 And the view class detects it correctly.
470@@ -61,7 +61,7 @@
471
472 We have the plural form information for this language.
473
474- >>> print translationmessage_page_view.context.language.pluralforms
475+ >>> print(translationmessage_page_view.context.language.pluralforms)
476 2
477
478 And thus, the view class should know that it doesn't lacks the plural forms
479@@ -118,7 +118,7 @@
480 As we didn't submit the form, the getSubmittedTranslation method will
481 return None.
482
483- >>> print subview.getSubmittedTranslation(0)
484+ >>> print(subview.getSubmittedTranslation(0))
485 None
486
487 If we request a plural form that is not valid, we get an AssertionError.
488@@ -287,10 +287,10 @@
489 >>> translationmessage_page_view.initialize()
490 >>> for notification in (
491 ... translationmessage_page_view.request.notifications):
492- ... print notification.message
493+ ... print(notification.message)
494 There is an error in the translation you provided. Please correct it
495 before continuing.
496- >>> print translationmessage_page_view.error
497+ >>> print(translationmessage_page_view.error)
498 This translation has changed since you last saw it. To avoid
499 accidentally reverting work done by others, we added your
500 translations as suggestions. Please review the current values.
501@@ -424,7 +424,7 @@
502 Which produces no suggestions, because Japanese only has one form but
503 Spanish has two.
504
505- >>> print suggestions.submissions
506+ >>> print(suggestions.submissions)
507 []
508
509 However, when we use the first plural form, which exists in both
510@@ -444,7 +444,7 @@
511 >>> submission = suggestions.submissions[0]
512 >>> for attr in sorted(dir(submission)):
513 ... if not attr.startswith('_'):
514- ... print "%s: %s" % (attr, getattr(submission, attr))
515+ ... print("%s: %s" % (attr, getattr(submission, attr)))
516 date_created: ...
517 id: ...
518 is_empty: False
519@@ -548,7 +548,7 @@
520 A shared translation is not explicitely shown, since the current one is
521 the shared translation.
522
523- >>> print subview.shared_translationmessage
524+ >>> print(subview.shared_translationmessage)
525 None
526
527 When looking at the entire POFile, diverging is not allowed.
528
529=== modified file 'lib/lp/translations/browser/tests/translator-views.txt'
530--- lib/lp/translations/browser/tests/translator-views.txt 2014-02-19 04:01:46 +0000
531+++ lib/lp/translations/browser/tests/translator-views.txt 2018-06-03 00:41:33 +0000
532@@ -24,16 +24,16 @@
533 Translator +admin view provides a nice page title and a form label.
534
535 >>> view = create_initialized_view(translator, '+admin')
536- >>> print view.label
537+ >>> print(view.label)
538 Edit Serbian translation team in Test translators
539
540- >>> print view.page_title
541+ >>> print(view.page_title)
542 Edit Serbian translation team
543
544 Canceling changes to the Translator takes one back to the group
545 page.
546
547- >>> print view.cancel_url
548+ >>> print(view.cancel_url)
549 http://translations.launchpad.dev/+groups/test-translators
550
551 TranslatorEditView
552@@ -44,15 +44,15 @@
553 describe that appropriately.
554
555 >>> view = create_initialized_view(translator, '+edit')
556- >>> print view.label
557+ >>> print(view.label)
558 Set Serbian guidelines for Test translators
559
560- >>> print view.page_title
561+ >>> print(view.page_title)
562 Set Serbian guidelines
563
564 Canceling changes to the guidelines takes one back to the team page.
565
566- >>> print view.cancel_url
567+ >>> print(view.cancel_url)
568 http://translations.launchpad.dev/~bad-translators
569
570
571@@ -63,13 +63,13 @@
572 for a language in a TranslationGroup.
573
574 >>> view = create_initialized_view(translator, '+remove')
575- >>> print view.label
576+ >>> print(view.label)
577 Unset 'Bad translators' as the Serbian translator in Test translators
578
579- >>> print view.page_title
580+ >>> print(view.page_title)
581 Remove translation team
582
583 Canceling removal of a translation team takes one back to the group page.
584
585- >>> print view.cancel_url
586+ >>> print(view.cancel_url)
587 http://translations.launchpad.dev/+groups/test-translators
588
589=== modified file 'lib/lp/translations/stories/buildfarm/xx-build-summary.txt'
590--- lib/lp/translations/stories/buildfarm/xx-build-summary.txt 2014-11-27 07:48:25 +0000
591+++ lib/lp/translations/stories/buildfarm/xx-build-summary.txt 2018-06-03 00:41:33 +0000
592@@ -72,7 +72,7 @@
593
594 >>> user_browser.mech_browser.set_handle_equiv(False)
595 >>> user_browser.open(builder_page)
596- >>> print extract_text(find_build_summary(user_browser))
597+ >>> print(extract_text(find_build_summary(user_browser)))
598 Working on TranslationTemplatesBuild for branch ...
599
600 >>> user_browser.getLink(branch_url).click()
601@@ -93,7 +93,7 @@
602 >>> logout()
603
604 >>> user_browser.open(build_url)
605- >>> print extract_text(find_main_content(user_browser.contents))
606+ >>> print(extract_text(find_main_content(user_browser.contents)))
607 created ...
608 Build status
609 Currently building
610@@ -119,7 +119,7 @@
611 >>> logout()
612
613 >>> user_browser.open(build_url)
614- >>> print extract_text(find_main_content(user_browser.contents))
615+ >>> print(extract_text(find_main_content(user_browser.contents)))
616 created ...
617 Build status
618 Currently building
619@@ -151,7 +151,7 @@
620 >>> user_browser.open(builder_page)
621 >>> user_browser.getLink('View full history').click()
622
623- >>> print extract_text(find_main_content(user_browser.contents))
624+ >>> print(extract_text(find_main_content(user_browser.contents)))
625 Build history for ...
626 1 ... 1 of 1 result
627 ...
628
629=== modified file 'lib/lp/translations/stories/distribution/xx-distribution-change-language-pack-admins.txt'
630--- lib/lp/translations/stories/distribution/xx-distribution-change-language-pack-admins.txt 2009-09-14 13:47:28 +0000
631+++ lib/lp/translations/stories/distribution/xx-distribution-change-language-pack-admins.txt 2018-06-03 00:41:33 +0000
632@@ -34,7 +34,7 @@
633 >>> browser.getControl('Language Pack Administrator').value = (
634 ... 'martin.pitt@canonical.com')
635 >>> browser.getControl('Change').click()
636- >>> print browser.url
637+ >>> print(browser.url)
638 http://translations.launchpad.dev/ubuntu/+select-language-pack-admin
639 >>> browser.getControl('Language Pack Administrator').value
640 'martin.pitt@canonical.com'
641
642=== modified file 'lib/lp/translations/stories/distribution/xx-distribution-translations.txt'
643--- lib/lp/translations/stories/distribution/xx-distribution-translations.txt 2012-01-15 11:06:57 +0000
644+++ lib/lp/translations/stories/distribution/xx-distribution-translations.txt 2018-06-03 00:41:33 +0000
645@@ -9,7 +9,7 @@
646
647 >>> browser.open('http://launchpad.dev/ubuntu')
648 >>> browser.getLink('Translations').click()
649- >>> print browser.title
650+ >>> print(browser.title)
651 Translations : Ubuntu
652
653 Check that there aren't disabled languages shown here:
654@@ -43,20 +43,20 @@
655 Now, we are going to check that the language list we got is pointing
656 to the right translation focus.
657
658- >>> print browser.getLink('Spanish').url
659+ >>> print(browser.getLink('Spanish').url)
660 http://translations.launchpad.dev/ubuntu/hoary/+lang/es
661- >>> print browser.getLink('Italian').url
662+ >>> print(browser.getLink('Italian').url)
663 http://translations.launchpad.dev/ubuntu/hoary/+lang/it
664- >>> print browser.getLink('Portuguese (Brazil)').url
665+ >>> print(browser.getLink('Portuguese (Brazil)').url)
666 http://translations.launchpad.dev/ubuntu/hoary/+lang/pt_BR
667
668 And the other Ubuntu distributions should be there too.
669
670 >>> content = find_main_content(browser.contents)
671- >>> print extract_text(content.findAll('h2')[1])
672+ >>> print(extract_text(content.findAll('h2')[1]))
673 Other versions of Ubuntu
674
675- >>> print extract_text(content.find(id='distroseries-list'))
676+ >>> print(extract_text(content.find(id='distroseries-list')))
677 Breezy Badger Autotest (6.6.6)
678 Grumpy (5.10)
679 Warty (4.10)
680@@ -64,11 +64,11 @@
681 We are not showing its translation status here, so we should have
682 links to their particular translation status.
683
684- >>> print browser.getLink('Breezy Badger Autotest (6.6.6)').url
685+ >>> print(browser.getLink('Breezy Badger Autotest (6.6.6)').url)
686 http://translations.launchpad.dev/ubuntu/breezy-autotest
687- >>> print browser.getLink('Grumpy (5.10)').url
688+ >>> print(browser.getLink('Grumpy (5.10)').url)
689 http://translations.launchpad.dev/ubuntu/grumpy
690- >>> print browser.getLink('Warty (4.10)').url
691+ >>> print(browser.getLink('Warty (4.10)').url)
692 http://translations.launchpad.dev/ubuntu/warty
693
694 But we are already showing the status for the translation focus one,
695@@ -100,25 +100,25 @@
696 It doesn't have any translation, so we will get the default GeoIP
697 languages pointing to the latest release, Hoary.
698
699- >>> print browser.getLink('Zulu').url
700+ >>> print(browser.getLink('Zulu').url)
701 http://translations.launchpad.dev/debian/sarge/+lang/zu
702
703 And the other Ubuntu distributions should be there too.
704
705 >>> content = find_main_content(browser.contents)
706- >>> print extract_text(content.findAll('h2')[1])
707+ >>> print(extract_text(content.findAll('h2')[1]))
708 Other versions of Debian
709
710- >>> print extract_text(content.find(id='distroseries-list'))
711+ >>> print(extract_text(content.find(id='distroseries-list')))
712 Sid (3.2)
713 Woody (3.0)
714
715 We are not showing its translation status here, so we should have
716 links to their particular translation status.
717
718- >>> print browser.getLink('Sid (3.2)').url
719+ >>> print(browser.getLink('Sid (3.2)').url)
720 http://translations.launchpad.dev/debian/sid
721- >>> print browser.getLink('Woody (3.0)').url
722+ >>> print(browser.getLink('Woody (3.0)').url)
723 http://translations.launchpad.dev/debian/woody
724
725 But we are already showing the status for the translation focus one,
726
727=== modified file 'lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt'
728--- lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt 2013-09-27 04:13:23 +0000
729+++ lib/lp/translations/stories/distroseries/xx-distroseries-language-packs.txt 2018-06-03 00:41:33 +0000
730@@ -23,33 +23,33 @@
731 base language pack.
732
733 >>> base = admin_browser.getControl('Language pack base')
734- >>> print base.displayValue
735+ >>> print(base.displayValue)
736 ['(nothing selected)']
737 >>> base.displayOptions
738 ['(nothing selected)', '2007-09-10 19:16:01 UTC', '2007-09-10 19:14:26 UTC']
739 >>> delta = admin_browser.getControl('Language pack update')
740- >>> print delta.displayValue
741+ >>> print(delta.displayValue)
742 ['(nothing selected)']
743 >>> proposed = admin_browser.getControl('Proposed language pack update')
744- >>> print proposed.displayValue
745+ >>> print(proposed.displayValue)
746 ['(nothing selected)']
747
748 Let's select a base one:
749
750 >>> base.displayValue = ['2007-09-10 19:14:26 UTC']
751 >>> admin_browser.getControl('Change').click()
752- >>> print admin_browser.url
753+ >>> print(admin_browser.url)
754 http://translations.launchpad.dev/ubuntu/hoary/+language-packs
755
756 Now the admin page will show us that language pack selected and a list of
757 available update packages.
758
759 >>> base = admin_browser.getControl('Language pack base')
760- >>> print base.displayValue
761+ >>> print(base.displayValue)
762 ['2007-09-10 19:14:26 UTC']
763
764 >>> update = admin_browser.getControl('Language pack update')
765- >>> print update.displayValue
766+ >>> print(update.displayValue)
767 ['(nothing selected)']
768 >>> update.displayOptions
769 ['(nothing selected)', '2007-09-10 19:15:19 UTC', '2007-09-10 19:15:01 UTC']
770@@ -58,7 +58,8 @@
771
772 >>> browser.open('http://translations.launchpad.dev/ubuntu/hoary')
773 >>> browser.getLink('See all language packs').click()
774- >>> print extract_text(find_tag_by_id(browser.contents, "language_packs"))
775+ >>> print(extract_text(
776+ ... find_tag_by_id(browser.contents, "language_packs")))
777 A language pack...
778 Active language packs
779 Base pack: 2007-09-10 19:14:26 UTC
780@@ -86,9 +87,9 @@
781 The active base language pack URL is linking to an archive, while the latest
782 URL uses '+latest-full-language-pack'.
783
784- >>> print browser.getLink('2007-09-10 19:14:26 UTC').url
785+ >>> print(browser.getLink('2007-09-10 19:14:26 UTC').url)
786 http.../71/ubuntu-hoary-translations.tar.gz
787- >>> print browser.getLink('2007-09-10 19:16:01 UTC').url
788+ >>> print(browser.getLink('2007-09-10 19:16:01 UTC').url)
789 http://translations.launchpad.dev/ubuntu/hoary/+latest-full-language-pack
790
791 An administrator can choose the current update pack and there is also an
792@@ -102,7 +103,7 @@
793 >>> admin_browser.getControl(
794 ... 'Request a full language pack export').selected = True
795 >>> admin_browser.getControl('Change').click()
796- >>> print admin_browser.url
797+ >>> print(admin_browser.url)
798 http://translations.launchpad.dev/ubuntu/hoary/+language-packs
799 >>> print_feedback_messages(admin_browser.contents)
800 Your request has been noted. Next language pack export will include
801@@ -122,7 +123,8 @@
802
803 >>> browser.open(
804 ... 'http://translations.launchpad.dev/ubuntu/hoary/+language-packs')
805- >>> print extract_text(find_tag_by_id(browser.contents, "language_packs"))
806+ >>> print(extract_text(
807+ ... find_tag_by_id(browser.contents, "language_packs")))
808 A language pack...
809 Active language packs
810 Base pack: 2007-09-10 19:14:26 UTC
811@@ -149,8 +151,7 @@
812 The active update language pack URL is linking to an archive, while the latest
813 URL uses '+latest-full-language-pack'.
814
815- >>> print browser.getLink('2007-09-10 19:15:01 UTC').url
816+ >>> print(browser.getLink('2007-09-10 19:15:01 UTC').url)
817 http.../72/ubuntu-hoary-translations-update.tar.gz
818- >>> print browser.getLink('2007-09-10 19:15:19 UTC').url
819+ >>> print(browser.getLink('2007-09-10 19:15:19 UTC').url)
820 http://translations.launchpad.dev/ubuntu/hoary/+latest-delta-language-pack
821-
822
823=== modified file 'lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt'
824--- lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt 2011-11-28 12:00:28 +0000
825+++ lib/lp/translations/stories/distroseries/xx-distroseries-translations.txt 2018-06-03 00:41:33 +0000
826@@ -24,7 +24,7 @@
827
828 But it shows the ones not hidden:
829
830- >>> print anon_browser.getLink('Spanish').url
831+ >>> print(anon_browser.getLink('Spanish').url)
832 http://translations.launchpad.dev/ubuntu/hoary/+lang/es
833
834 Launchpad has an option to hide all of the translations for a distribution
835@@ -55,7 +55,7 @@
836 >>> dtc_browser.getControl(
837 ... 'Hide translations for this release').selected = True
838 >>> dtc_browser.getControl('Change').click()
839- >>> print dtc_browser.url
840+ >>> print(dtc_browser.url)
841 http://translations.launchpad.dev/ubuntu/hoary
842
843 ...a notice about the fact shows up on the overview page.
844@@ -63,7 +63,7 @@
845 >>> notices = find_tags_by_class(
846 ... dtc_browser.contents, 'visibility-notice')
847 >>> for notice in notices:
848- ... print extract_text(notice)
849+ ... print(extract_text(notice))
850 Translations for this series are currently hidden.
851
852 Now, the translation status page will no longer display any languages to
853@@ -84,7 +84,7 @@
854 ...
855 HTTPError: HTTP Error 503: Service Unavailable
856 >>> main_content = find_main_content(user_browser.contents)
857- >>> print main_content.findNext('p').renderContents()
858+ >>> print(main_content.findNext('p').renderContents())
859 Translations for this release series are not available yet.
860
861 >>> user_browser.handleErrors = False
862@@ -139,7 +139,7 @@
863 >>> dtc_browser.getControl(
864 ... 'Defer translation imports').selected = True
865 >>> dtc_browser.getControl('Change').click()
866- >>> print dtc_browser.url
867+ >>> print(dtc_browser.url)
868 http://translations.launchpad.dev/ubuntu/hoary
869
870 Once the system accepts the submission, we can see such change applied.
871
872=== modified file 'lib/lp/translations/stories/importqueue/xx-entry-details.txt'
873--- lib/lp/translations/stories/importqueue/xx-entry-details.txt 2014-11-24 09:16:35 +0000
874+++ lib/lp/translations/stories/importqueue/xx-entry-details.txt 2018-06-03 00:41:33 +0000
875@@ -19,14 +19,14 @@
876 >>> trunk = product.getSeries('trunk')
877 >>> uploader = factory.makePerson()
878 >>> entry = queue.addOrUpdateEntry(
879- ... filename, '# empty', False, uploader, productseries=trunk)
880+ ... filename, b'# empty', False, uploader, productseries=trunk)
881 >>> entry_url = canonical_url(entry, rootsite='translations')
882 >>> logout()
883
884 >>> admin_browser.open(entry_url)
885 >>> details = find_tag_by_id(admin_browser.contents, 'portlet-details')
886 >>> details_text = extract_text(details)
887- >>> print details_text
888+ >>> print(details_text)
889 Upload attached to ... trunk series.
890 This project...s licence is open source.
891 Release series has no templates.
892@@ -44,9 +44,9 @@
893
894 There's also a link to the file's contents.
895
896- >>> print admin_browser.getLink(filename).text
897+ >>> print(admin_browser.getLink(filename).text)
898 po/foo.pot
899- >>> print admin_browser.getLink(filename).url
900+ >>> print(admin_browser.getLink(filename).url)
901 http://...foo.pot
902
903
904@@ -63,22 +63,22 @@
905 >>> admin_browser.open(entry_url)
906 >>> details = find_tag_by_id(admin_browser.contents, 'portlet-details')
907 >>> details_text = extract_text(details)
908- >>> print details_text
909+ >>> print(details_text)
910 Upload attached to
911 ...
912 Release series has 1 template.
913 ...
914
915- >>> print admin_browser.getLink('1 template').url
916+ >>> print(admin_browser.getLink('1 template').url)
917 http...://translations.launchpad.dev/.../trunk/+templates
918
919 >>> admin_browser.getLink('1 template').click()
920- >>> print admin_browser.title
921+ >>> print(admin_browser.title)
922 All templates : Series trunk : Translations : ...
923
924 In that case, the product is also shown to have translatable series.
925
926- >>> print details_text
927+ >>> print(details_text)
928 Upload attached to
929 ...
930 Project has translatable series: trunk.
931@@ -98,7 +98,7 @@
932 >>> distroseries = distro.getSeries('hoary')
933 >>> packagename = factory.makeSourcePackageName(name='xpad')
934 >>> entry = queue.addOrUpdateEntry(
935- ... filename, '# nothing', True, uploader, distroseries=distroseries,
936+ ... filename, b'# nothing', True, uploader, distroseries=distroseries,
937 ... sourcepackagename=packagename)
938 >>> entry_url = canonical_url(entry, rootsite='translations')
939 >>> logout()
940@@ -108,6 +108,6 @@
941 >>> admin_browser.open(entry_url)
942 >>> details = find_tag_by_id(admin_browser.contents, 'portlet-details')
943 >>> details_text = extract_text(details)
944- >>> print details_text
945+ >>> print(details_text)
946 Upload attached to xpad in Ubuntu Hoary.
947 File po/foo.pot uploaded by ...
948
949=== modified file 'lib/lp/translations/stories/importqueue/xx-entry-error-output.txt'
950--- lib/lp/translations/stories/importqueue/xx-entry-error-output.txt 2010-02-10 13:04:10 +0000
951+++ lib/lp/translations/stories/importqueue/xx-entry-error-output.txt 2018-06-03 00:41:33 +0000
952@@ -17,13 +17,13 @@
953 >>> product = factory.makeProduct()
954 >>> trunk = product.getSeries('trunk')
955 >>> entry = queue.addOrUpdateEntry(
956- ... 'la.po', '# contents', False, product.owner, productseries=trunk)
957+ ... 'la.po', b'# contents', False, product.owner, productseries=trunk)
958 >>> entry_url = canonical_url(entry, rootsite='translations')
959 >>> logout()
960
961 >>> admin_browser.open(entry_url)
962 >>> output_panel = find_error_output(admin_browser)
963- >>> print output_panel
964+ >>> print(output_panel)
965 None
966
967 The section showing the output only shows up when there is output to
968@@ -32,7 +32,7 @@
969 >>> entry.error_output = "Things went horribly wrong."
970 >>> admin_browser.open(entry_url)
971 >>> output_panel = find_error_output(admin_browser)
972- >>> print extract_text(output_panel)
973+ >>> print(extract_text(output_panel))
974 Error output for this entry:
975 Things went horribly wrong.
976
977@@ -41,6 +41,6 @@
978 >>> entry.error_output = "<h1>Injection &amp; subterfuge</h1>"
979 >>> admin_browser.open(entry_url)
980 >>> output_panel = find_error_output(admin_browser)
981- >>> print output_panel.renderContents()
982+ >>> print(output_panel.renderContents())
983 Error output for this entry:
984 ...&lt;h1&gt;Injection &amp;amp; subterfuge&lt;/h1&gt;...
985
986=== modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.txt'
987--- lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.txt 2016-01-26 15:47:37 +0000
988+++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-edit-autofilling.txt 2018-06-03 00:41:33 +0000
989@@ -21,7 +21,7 @@
990 >>> browser.url
991 'http://translations.launchpad.dev/alsa-utils/trunk/+translations-upload'
992 >>> for tag in find_tags_by_class(browser.contents, 'message'):
993- ... print tag
994+ ... print(tag)
995 <div...Thank you for your upload. 2 files from the tarball...
996
997 Let's check the values we get by default from the .pot file. The name field
998
999=== modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt'
1000--- lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt 2009-09-01 20:06:37 +0000
1001+++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-entry.txt 2018-06-03 00:41:33 +0000
1002@@ -12,10 +12,10 @@
1003
1004 >>> admin_browser.open('http://translations.launchpad.dev/+imports')
1005 >>> admin_browser.getLink(url='imports/1').click()
1006- >>> print admin_browser.getLink('Cancel').url
1007+ >>> print(admin_browser.getLink('Cancel').url)
1008 http://translations.launchpad.dev/+imports
1009 >>> admin_browser.getControl('Approve').click()
1010- >>> print admin_browser.url
1011+ >>> print(admin_browser.url)
1012 http://translations.launchpad.dev/+imports
1013
1014 Going to the same entry from the Evolution import queue, and then approving
1015@@ -24,10 +24,10 @@
1016 >>> admin_browser.open(
1017 ... 'http://translations.launchpad.dev/evolution/+imports')
1018 >>> admin_browser.getLink(url='imports/1').click()
1019- >>> print admin_browser.getLink('Cancel').url
1020+ >>> print(admin_browser.getLink('Cancel').url)
1021 http://translations.launchpad.dev/evolution/+imports
1022 >>> admin_browser.getControl('Approve').click()
1023- >>> print admin_browser.url
1024+ >>> print(admin_browser.url)
1025 http://translations.launchpad.dev/evolution/+imports
1026
1027 Similarly, if we go to an import queue entry through the user's import
1028@@ -36,8 +36,8 @@
1029 >>> admin_browser.open(
1030 ... 'http://translations.launchpad.dev/~name16/+imports')
1031 >>> admin_browser.getLink(url='imports/1').click()
1032- >>> print admin_browser.getLink('Cancel').url
1033+ >>> print(admin_browser.getLink('Cancel').url)
1034 http://translations.launchpad.dev/~name16/+imports
1035 >>> admin_browser.getControl('Approve').click()
1036- >>> print admin_browser.url
1037+ >>> print(admin_browser.url)
1038 http://translations.launchpad.dev/~name16/+imports
1039
1040=== modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt'
1041--- lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt 2015-10-05 08:36:52 +0000
1042+++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-filtering.txt 2018-06-03 00:41:33 +0000
1043@@ -28,7 +28,7 @@
1044 ... tarball, 'application/x-gzip', 'foo.tar.gz')
1045 >>> browser.getControl('Upload').click()
1046 >>> for tag in find_tags_by_class(browser.contents, 'message'):
1047- ... print tag
1048+ ... print(tag)
1049 <div...Thank you for your upload. 100 files from the tarball will be
1050 automatically reviewed...
1051
1052@@ -52,13 +52,14 @@
1053 ... """Print "x -> y of z results" batch navigator heading."""
1054 ... heading = find_tags_by_class(
1055 ... browser.contents, 'batch-navigation-index')[0]
1056- ... print extract_text(heading).encode('us-ascii', 'backslashreplace')
1057+ ... print(
1058+ ... extract_text(heading).encode('us-ascii', 'backslashreplace'))
1059
1060 >>> def print_dropdown(browser, name, index=0):
1061 ... """Print contents of named dropdown."""
1062 ... dropdown = browser.getControl(name=name, index=index)
1063 ... for item in dropdown.displayOptions:
1064- ... print item
1065+ ... print(item)
1066
1067 >>> def print_targets(browser):
1068 ... """Print contents of the import target dropdown."""
1069@@ -165,7 +166,7 @@
1070 ['APPROVED']
1071 >>> browser.getControl(name='field.filter_extension', index=0).value
1072 ['all']
1073- >>> print browser.contents
1074+ >>> print(browser.contents)
1075 <!DOCTYPE...
1076 ...There are no entries that match this filtering...
1077
1078@@ -185,7 +186,7 @@
1079 ['NEEDS_REVIEW']
1080 >>> browser.getControl(name='field.status_%d' % qid1).value = ['BLOCKED']
1081 >>> browser.getControl('Change status').click()
1082- >>> print browser.url
1083+ >>> print(browser.url)
1084 http://translations.launchpad.dev/+imports/+index
1085
1086 The entry now shows up in the Blocked filter.
1087@@ -285,7 +286,7 @@
1088 ... StringIO('foo'), 'application/x-po', 'foo.pot')
1089 >>> admin_browser.getControl('Upload').click()
1090 >>> for tag in find_tags_by_class(admin_browser.contents, 'message'):
1091- ... print extract_text(tag.renderContents())
1092+ ... print(extract_text(tag.renderContents()))
1093 Thank you for your upload. It will be automatically reviewed...
1094
1095 # Commit the transaction so librarian stores the uploaded file.
1096@@ -299,7 +300,7 @@
1097 >>> user_browser.getControl(
1098 ... name='field.filter_target', index=0).value = ['ubuntu/hoary']
1099 >>> user_browser.getControl('Filter').click()
1100- >>> print user_browser.url
1101+ >>> print(user_browser.url)
1102 http://.../+imports/+index?field.filter_target=ubuntu/hoary&...
1103
1104 The only entry that shows up now is the one Carlos just uploaded.
1105@@ -311,7 +312,7 @@
1106 >>> import_list = find_tag_by_id(
1107 ... user_browser.contents, 'import-entries-list')
1108 >>> first_entry = import_list.findNext('tr')
1109- >>> print represent_queue_entry(first_entry)
1110+ >>> print(represent_queue_entry(first_entry))
1111 foo.pot in evolution in Ubuntu Hoary
1112 Needs Review
1113
1114@@ -354,7 +355,7 @@
1115 The "Any project" filter here shows only those Evolution uploads.
1116
1117 >>> displayed_entries = summarize_displayed_queue_entries(user_browser)
1118- >>> print displayed_entries
1119+ >>> print(displayed_entries)
1120 po/evolution-2.2-test.pot in Evolution trunk series ...
1121 po/pt_BR.po in Evolution trunk series ...
1122 foo-01.po in Evolution trunk series ...
1123@@ -363,7 +364,7 @@
1124
1125 None of the Hoary uploads are shown.
1126
1127- >>> print re.findall('Hoary', displayed_entries)
1128+ >>> print(re.findall('Hoary', displayed_entries))
1129 []
1130
1131 The "Any distribution" filter on the other hand shows the Hoary upload
1132@@ -375,10 +376,10 @@
1133 >>> user_browser.getControl('Filter').click()
1134
1135 >>> displayed_entries = summarize_displayed_queue_entries(user_browser)
1136- >>> print displayed_entries
1137+ >>> print(displayed_entries)
1138 foo.pot in evolution in Ubuntu Hoary ...
1139
1140- >>> print re.findall('Evolution', displayed_entries)
1141+ >>> print(re.findall('Evolution', displayed_entries))
1142 []
1143
1144
1145@@ -393,4 +394,3 @@
1146 Traceback (most recent call last):
1147 ...
1148 UnexpectedFormData: Unknown target.
1149-
1150
1151=== modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt'
1152--- lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt 2009-09-14 19:00:45 +0000
1153+++ lib/lp/translations/stories/importqueue/xx-translation-import-queue-targets.txt 2018-06-03 00:41:33 +0000
1154@@ -14,12 +14,12 @@
1155
1156 There is no content for Ubuntu.
1157
1158- >>> print find_tag_by_id(
1159- ... user_browser.contents, 'description').renderContents().strip()
1160+ >>> print(find_tag_by_id(
1161+ ... user_browser.contents, 'description').renderContents().strip())
1162 These translation related entries are imported, blocked, deleted or
1163 waiting to be imported in Launchpad for Ubuntu.
1164- >>> print find_tag_by_id(
1165- ... user_browser.contents, 'no-entries').renderContents()
1166+ >>> print(find_tag_by_id(
1167+ ... user_browser.contents, 'no-entries').renderContents())
1168 There are no entries that match this filtering.
1169 >>> find_tag_by_id(user_browser.contents, 'import-entries-list') is None
1170 True
1171@@ -35,12 +35,12 @@
1172 And obviously, given that the ubuntu distribution had no content, Hoary, an
1173 Ubuntu distro series has also no content.
1174
1175- >>> print find_tag_by_id(
1176- ... user_browser.contents, 'description').renderContents().strip()
1177+ >>> print(find_tag_by_id(
1178+ ... user_browser.contents, 'description').renderContents().strip())
1179 These translation related entries are imported, blocked, deleted or
1180 waiting to be imported in Launchpad for Hoary.
1181- >>> print find_tag_by_id(
1182- ... user_browser.contents, 'no-entries').renderContents()
1183+ >>> print(find_tag_by_id(
1184+ ... user_browser.contents, 'no-entries').renderContents())
1185 There are no entries that match this filtering.
1186 >>> find_tag_by_id(user_browser.contents, 'import-entries-list') is None
1187 True
1188@@ -55,8 +55,8 @@
1189
1190 This time, we do have content for this product:
1191
1192- >>> print find_tag_by_id(
1193- ... user_browser.contents, 'description').renderContents().strip()
1194+ >>> print(find_tag_by_id(
1195+ ... user_browser.contents, 'description').renderContents().strip())
1196 These translation related entries are imported, blocked, deleted or
1197 waiting to be imported in Launchpad for Evolution.
1198 >>> find_tag_by_id(user_browser.contents, 'no-entries') is None
1199@@ -67,13 +67,13 @@
1200 >>> import_list = find_tag_by_id(
1201 ... user_browser.contents, 'import-entries-list')
1202 >>> first_entry = import_list.findNext('tr')
1203- >>> print extract_text(first_entry)
1204+ >>> print(extract_text(first_entry))
1205 po/evolution-2.2-test.pot in
1206 Evolution trunk series
1207 Imported
1208 >>> second_entry = first_entry.findNext(
1209 ... 'tr').findNext('tr').findNext('tr')
1210- >>> print extract_text(second_entry)
1211+ >>> print(extract_text(second_entry))
1212 po/pt_BR.po in
1213 Evolution trunk series
1214 Imported
1215@@ -88,8 +88,8 @@
1216
1217 This time, we do have content for this product:
1218
1219- >>> print find_tag_by_id(
1220- ... user_browser.contents, 'description').renderContents().strip()
1221+ >>> print(find_tag_by_id(
1222+ ... user_browser.contents, 'description').renderContents().strip())
1223 These translation related entries are imported, blocked, deleted or
1224 waiting to be imported in Launchpad for trunk.
1225 >>> find_tag_by_id(user_browser.contents, 'no-entries') is None
1226@@ -101,13 +101,13 @@
1227 >>> import_list = find_tag_by_id(
1228 ... user_browser.contents, 'import-entries-list')
1229 >>> first_entry = import_list.findNext('tr')
1230- >>> print extract_text(first_entry)
1231+ >>> print(extract_text(first_entry))
1232 po/evolution-2.2-test.pot in
1233 Evolution trunk series
1234 Imported
1235 >>> second_entry = first_entry.findNext(
1236 ... 'tr').findNext('tr').findNext('tr')
1237- >>> print extract_text(second_entry)
1238+ >>> print(extract_text(second_entry))
1239 po/pt_BR.po in
1240 Evolution trunk series
1241 Imported
1242@@ -122,8 +122,8 @@
1243
1244 This time, we do have content for this product:
1245
1246- >>> print find_tag_by_id(
1247- ... user_browser.contents, 'description').renderContents().strip()
1248+ >>> print(find_tag_by_id(
1249+ ... user_browser.contents, 'description').renderContents().strip())
1250 These translation related entries are imported, blocked, deleted or
1251 waiting to be imported in Launchpad for Foo Bar.
1252 >>> find_tag_by_id(user_browser.contents, 'no-entries') is None
1253@@ -135,23 +135,23 @@
1254 >>> import_list = find_tag_by_id(
1255 ... user_browser.contents, 'import-entries-list')
1256 >>> first_entry = import_list.findNext('tr')
1257- >>> print extract_text(first_entry)
1258+ >>> print(extract_text(first_entry))
1259 po/evolution-2.2-test.pot in
1260 Evolution trunk series
1261 Imported
1262 >>> first_entry_importer = first_entry.findNext('tr')
1263- >>> print extract_text(first_entry_importer)
1264+ >>> print(extract_text(first_entry_importer))
1265 Uploaded by
1266 Foo Bar
1267 on 2006-12-13 22:17:56 CET
1268 >>> second_entry = first_entry_importer.findNext(
1269 ... 'tr').findNext('tr')
1270- >>> print extract_text(second_entry)
1271+ >>> print(extract_text(second_entry))
1272 po/pt_BR.po in
1273 Evolution trunk series
1274 Imported
1275 >>> second_entry_importer = second_entry.findNext('tr')
1276- >>> print extract_text(second_entry_importer)
1277+ >>> print(extract_text(second_entry_importer))
1278 Uploaded by
1279 Foo Bar
1280 on 2006-12-13 22:18:28 CET
1281
1282=== modified file 'lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt'
1283--- lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt 2016-01-26 15:47:37 +0000
1284+++ lib/lp/translations/stories/importqueue/xx-translation-import-queue.txt 2018-06-03 00:41:33 +0000
1285@@ -31,7 +31,7 @@
1286 True
1287 >>> for tag in find_tags_by_class(ff_owner_browser.contents,
1288 ... 'informational message'):
1289- ... print extract_text(tag.renderContents())
1290+ ... print(extract_text(tag.renderContents()))
1291 Thank you for your upload. 2 files from the tarball will be automatically
1292 reviewed in the next few hours...
1293
1294@@ -39,7 +39,7 @@
1295 import status:
1296
1297 >>> ff_owner_browser.getLink('Translation Import Queue').click()
1298- >>> print ff_owner_browser.url
1299+ >>> print(ff_owner_browser.url)
1300 http://translations.launchpad.dev/firefox/1.0/+imports
1301
1302 Once the upload has completed, its templates and translations show up on
1303@@ -48,12 +48,12 @@
1304
1305 >>> anon_browser.open(
1306 ... 'http://translations.launchpad.dev/firefox/1.0/+imports')
1307- >>> print anon_browser.url
1308+ >>> print(anon_browser.url)
1309 http://translations.launchpad.dev/firefox/1.0/+imports
1310 >>> row = find_tags_by_class(anon_browser.contents, 'import_entry_row')[1]
1311- >>> print extract_text(row.find('', 'import_source'))
1312+ >>> print(extract_text(row.find('', 'import_source')))
1313 po/es.po in Mozilla Firefox 1.0 series
1314- >>> print extract_text(row.find('', 'import_status'))
1315+ >>> print(extract_text(row.find('', 'import_status')))
1316 Needs Review
1317
1318 Some tarballs contain files whose names look like PO or POT files, but
1319@@ -116,10 +116,10 @@
1320 >>> upload.add_file(StringIO('# foo\n'),
1321 ... 'text/x-gettext-translation-template', 'evolution.pot')
1322 >>> browser.getControl('Upload').click()
1323- >>> print browser.url
1324+ >>> print(browser.url)
1325 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+upload
1326 >>> for tag in find_tags_by_class(browser.contents, 'message'):
1327- ... print tag.renderContents()
1328+ ... print(tag.renderContents())
1329 Thank you for your upload. It will be automatically reviewed...
1330
1331 The import queue should have three additional entries with the last upload as
1332@@ -128,10 +128,10 @@
1333 >>> anon_browser.open('http://translations.launchpad.dev/+imports')
1334 >>> nav_index = first_tag_by_class(anon_browser.contents,
1335 ... 'batch-navigation-index')
1336- >>> print extract_text(nav_index)
1337+ >>> print(extract_text(nav_index))
1338 1 &rarr; 5 of 5 results
1339 >>> rows = find_tags_by_class(anon_browser.contents, 'import_entry_row')
1340- >>> print extract_text(rows[4])
1341+ >>> print(extract_text(rows[4]))
1342 evolution.pot in
1343 evolution in Ubuntu Hoary
1344 Needs Review
1345@@ -149,17 +149,17 @@
1346 >>> browser.getControl('Name').value = '.InvalidName'
1347 >>> browser.getControl('Translation domain').value = 'pkgconf-mozilla'
1348 >>> browser.getControl('Approve').click()
1349- >>> print browser.url
1350+ >>> print(browser.url)
1351 http://translations.launchpad.dev/+imports/.../+index
1352 >>> message = find_tags_by_class(browser.contents, 'message')[1]
1353- >>> print message.string
1354+ >>> print(message.string)
1355 Please specify a valid name...
1356
1357 So we'd better specify a valid name.
1358
1359 >>> browser.getControl('Name').value = 'pkgconf-mozilla'
1360 >>> browser.getControl('Approve').click()
1361- >>> print browser.url
1362+ >>> print(browser.url)
1363 http://translations.launchpad.dev/+imports
1364
1365 Open the edit form for the fourth entry.
1366@@ -179,7 +179,7 @@
1367 ... 'pkgconf-mozilla']
1368 >>> browser.getControl('Language').value = ['es']
1369 >>> browser.getControl('Approve').click()
1370- >>> print browser.url
1371+ >>> print(browser.url)
1372 http://translations.launchpad.dev/+imports
1373
1374 The entries are approved, and now have the place where they will be
1375@@ -188,7 +188,7 @@
1376 >>> anon_browser.open('http://translations.launchpad.dev/+imports')
1377 >>> imports_table = find_tag_by_id(
1378 ... anon_browser.contents, 'import-entries-list')
1379- >>> print extract_text(imports_table)
1380+ >>> print(extract_text(imports_table))
1381 pkgconf-mozilla.pot in
1382 Mozilla Firefox 1.0 series
1383 Approved
1384@@ -226,7 +226,7 @@
1385 ... 'http://translations.launchpad.dev/+imports',
1386 ... data=post_data)
1387 >>> for status in find_tags_by_class(user_browser.contents, 'import_status'):
1388- ... print extract_text(status)
1389+ ... print(extract_text(status))
1390 Approved
1391 Approved
1392 Imported
1393@@ -242,7 +242,7 @@
1394 >>> jordi_browser.url
1395 'http://translations.launchpad.dev/+imports/+index'
1396
1397- >>> print find_main_content(jordi_browser.contents)
1398+ >>> print(find_main_content(jordi_browser.contents))
1399 <...po/evolution-2.2-test.pot...
1400 ...Evolution trunk series...
1401 ...field.status_1...
1402@@ -258,7 +258,7 @@
1403 >>> admin_browser.url
1404 'http://translations.launchpad.dev/+imports/+index'
1405
1406- >>> print find_main_content(admin_browser.contents)
1407+ >>> print(find_main_content(admin_browser.contents))
1408 <...po/pt_BR.po...
1409 ...Evolution trunk series...
1410 ...field.status_2...
1411@@ -279,7 +279,7 @@
1412
1413 The entry now appears deleted.
1414
1415- >>> print find_main_content(ff_owner_browser.contents)
1416+ >>> print(find_main_content(ff_owner_browser.contents))
1417 <...po/es.po...
1418 ...Mozilla Firefox 1.0 series...
1419 ...field.status_...
1420@@ -315,7 +315,7 @@
1421 >>> uploader = factory.makePerson()
1422 >>> ubuntu.translationgroup = factory.makeTranslationGroup(group_owner)
1423 >>> ubuntu_upload = queue.addOrUpdateEntry(
1424- ... 'messages.pot', '(content)', False, uploader,
1425+ ... 'messages.pot', b'(content)', False, uploader,
1426 ... sourcepackagename=package, distroseries=hoary)
1427
1428 >>> logout()
1429@@ -354,7 +354,7 @@
1430 >>> evo_owner_browser.url
1431 'http://translations.launchpad.dev/evolution/trunk/+translations-upload'
1432 >>> for tag in find_tags_by_class(evo_owner_browser.contents, 'message'):
1433- ... print extract_text(tag)
1434+ ... print(extract_text(tag))
1435 Thank you for your upload. 2 files from the tarball will be automatically
1436 reviewed...
1437
1438@@ -366,7 +366,7 @@
1439 ... '+source/evolution/+pots/evolution-2.2/+upload')
1440 >>> browser.getControl('Upload').click()
1441 >>> for tag in find_tags_by_class(browser.contents, 'message'):
1442- ... print tag
1443+ ... print(tag)
1444 <div...Your upload was ignored because you didn&#x27;t select a file....
1445 ...Please select a file and try again.</div>...
1446
1447@@ -387,7 +387,7 @@
1448 >>> evo_owner_browser.url
1449 'http://translations.launchpad.dev/evolution/trunk/+translations-upload'
1450 >>> for tag in find_tags_by_class(evo_owner_browser.contents, 'message'):
1451- ... print extract_text(tag)
1452+ ... print(extract_text(tag))
1453 Thank you for your upload. 1 file from the tarball will be automatically
1454 reviewed...
1455
1456@@ -408,7 +408,7 @@
1457 >>> evo_owner_browser.url
1458 'http://translations.launchpad.dev/evolution/trunk/+translations-upload'
1459 >>> for tag in find_tags_by_class(evo_owner_browser.contents, 'message'):
1460- ... print extract_text(tag)
1461+ ... print(extract_text(tag))
1462 Upload ignored. The tarball you uploaded did not contain...
1463
1464 And also a truncated tarball inside a bzip2 wrapper:
1465@@ -428,7 +428,7 @@
1466 >>> evo_owner_browser.url
1467 'http://translations.launchpad.dev/evolution/trunk/+translations-upload'
1468 >>> for tag in find_tags_by_class(evo_owner_browser.contents, 'message'):
1469- ... print extract_text(tag)
1470+ ... print(extract_text(tag))
1471 Upload ignored. The tarball you uploaded did not contain...
1472
1473 Or even files that are not really tar.gz files even if the filename
1474
1475=== modified file 'lib/lp/translations/stories/navigation-links/pofile.txt'
1476--- lib/lp/translations/stories/navigation-links/pofile.txt 2014-11-26 23:50:26 +0000
1477+++ lib/lp/translations/stories/navigation-links/pofile.txt 2018-06-03 00:41:33 +0000
1478@@ -8,7 +8,7 @@
1479 >>> admin_browser.open(
1480 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
1481 ... 'evolution-2.2/es')
1482- >>> print admin_browser.url
1483+ >>> print(admin_browser.url)
1484 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es
1485
1486 The Application tabs should point to IProduct URLs.
1487@@ -26,7 +26,7 @@
1488 >>> admin_browser.open(
1489 ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/'
1490 ... '+pots/evolution-2.2/es')
1491- >>> print admin_browser.url
1492+ >>> print(admin_browser.url)
1493 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es
1494
1495 The Application tabs should point to IDistributionSourcePackage URLs.
1496@@ -38,4 +38,3 @@
1497 * Blueprints - not linked
1498 * Translations (selected) - http://translations.launchpad.dev/ubuntu/+source/evolution
1499 * Answers - http://answers.launchpad.dev/ubuntu/+source/evolution
1500-
1501
1502=== modified file 'lib/lp/translations/stories/navigation-links/pomsgset.txt'
1503--- lib/lp/translations/stories/navigation-links/pomsgset.txt 2014-11-26 23:50:26 +0000
1504+++ lib/lp/translations/stories/navigation-links/pomsgset.txt 2018-06-03 00:41:33 +0000
1505@@ -10,7 +10,7 @@
1506 We get a +translate page because that's the only page for an IPOMsgSet and the
1507 system forwards automatically there.
1508
1509- >>> print browser.url
1510+ >>> print(browser.url)
1511 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/1/+translate
1512
1513 The Application tabs should point to IProductSeries URLs.
1514@@ -32,7 +32,7 @@
1515 We get a +translate page because that's the only page for an IPOMsgSet and the
1516 system forwards automatically there.
1517
1518- >>> print browser.url
1519+ >>> print(browser.url)
1520 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
1521
1522 The Application tabs should point to ISourcePackage URLs.
1523
1524=== modified file 'lib/lp/translations/stories/navigation-links/potemplate.txt'
1525--- lib/lp/translations/stories/navigation-links/potemplate.txt 2014-11-26 23:50:26 +0000
1526+++ lib/lp/translations/stories/navigation-links/potemplate.txt 2018-06-03 00:41:33 +0000
1527@@ -6,7 +6,7 @@
1528 >>> admin_browser.open(
1529 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
1530 ... 'evolution-2.2')
1531- >>> print admin_browser.url
1532+ >>> print(admin_browser.url)
1533 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2
1534
1535 The Application tabs should point to IProduct URLs.
1536@@ -24,7 +24,7 @@
1537 >>> admin_browser.open(
1538 ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/'
1539 ... '+pots/evolution-2.2')
1540- >>> print admin_browser.url
1541+ >>> print(admin_browser.url)
1542 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2
1543
1544 The Application tabs should point to IDistributionSourcePackage URLs.
1545
1546=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-export-to-branch.txt'
1547--- lib/lp/translations/stories/productseries/xx-productseries-export-to-branch.txt 2012-05-24 20:25:54 +0000
1548+++ lib/lp/translations/stories/productseries/xx-productseries-export-to-branch.txt 2018-06-03 00:41:33 +0000
1549@@ -52,37 +52,37 @@
1550
1551 The settings page currently shows that no branch has been selected.
1552
1553- >>> print extract_text(get_translations_branch_paragraph(owner_browser))
1554+ >>> print(extract_text(get_translations_branch_paragraph(owner_browser)))
1555 Currently not exporting translations to a branch.
1556 Choose a target branch.
1557
1558 The notice links to a page where a translations branch can be selected.
1559
1560 >>> owner_browser.getLink('Choose a target branch').click()
1561- >>> print owner_browser.url
1562+ >>> print(owner_browser.url)
1563 http://translations.launchpad.dev/.../trunk/+link-translations-branch
1564
1565 >>> set_translations_branch(owner_browser, branch_name)
1566
1567 After setting the branch, the form returns to the settings page.
1568
1569- >>> print owner_browser.url
1570+ >>> print(owner_browser.url)
1571 http://translations.launchpad.dev/.../trunk/+translations-settings
1572
1573 It shows the changed setting.
1574
1575- >>> print extract_text(get_translations_branch_paragraph(owner_browser))
1576+ >>> print(extract_text(get_translations_branch_paragraph(owner_browser)))
1577 Exporting translations to branch: lp:...
1578
1579 The notice links to the branch, and to the page where the setting can be
1580 changed.
1581
1582 >>> edit_link = owner_browser.getLink(id='translations-branch-edit-link')
1583- >>> print edit_link.url
1584+ >>> print(edit_link.url)
1585 http://translations.launchpad.dev/.../trunk/+link-translations-branch
1586
1587 >>> branch_link = owner_browser.getLink(url=branch_name)
1588- >>> print branch_link.url
1589+ >>> print(branch_link.url)
1590 http://code.launchpad.dev/~.../.../...
1591
1592 >>> branch_link.click()
1593@@ -91,7 +91,7 @@
1594
1595 >>> back_reference = find_tag_by_id(
1596 ... owner_browser.contents, 'translations-sources')
1597- >>> print back_reference
1598+ >>> print(back_reference)
1599 <div ...>
1600 <h2>Automatic translations commits</h2>
1601 <ul>
1602@@ -108,12 +108,12 @@
1603 >>> owner_browser.open(link_page)
1604 >>> set_translations_branch(owner_browser, '')
1605
1606- >>> print owner_browser.url
1607+ >>> print(owner_browser.url)
1608 http://translations.launchpad.dev/.../trunk/+translations-settings
1609
1610 The settings page then goes back to showing the original message.
1611
1612- >>> print extract_text(get_translations_branch_paragraph(owner_browser))
1613+ >>> print(extract_text(get_translations_branch_paragraph(owner_browser)))
1614 Currently not exporting translations to a branch.
1615 Choose a target branch.
1616
1617@@ -123,7 +123,7 @@
1618 >>> owner_browser.open(branch_page)
1619 >>> back_reference = find_tag_by_id(
1620 ... owner_browser.contents, 'translations-sources')
1621- >>> print back_reference
1622+ >>> print(back_reference)
1623 None
1624
1625
1626@@ -140,7 +140,7 @@
1627 This leaves the translations_branch unchanged.
1628
1629 >>> owner_browser.open(settings_page)
1630- >>> print extract_text(get_translations_branch_paragraph(owner_browser))
1631+ >>> print(extract_text(get_translations_branch_paragraph(owner_browser)))
1632 Currently not exporting translations to a branch.
1633 Choose a target branch.
1634
1635
1636=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt'
1637--- lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt 2014-11-24 09:16:35 +0000
1638+++ lib/lp/translations/stories/productseries/xx-productseries-translation-export.txt 2018-06-03 00:41:33 +0000
1639@@ -13,7 +13,7 @@
1640
1641 >>> user_browser.open('http://translations.launchpad.dev/evolution/trunk/')
1642 >>> user_browser.getLink('download').click()
1643- >>> print user_browser.url
1644+ >>> print(user_browser.url)
1645 http://translations.launchpad.dev/evolution/trunk/+export
1646
1647 Another way of getting there is by going to the product's +translate page.
1648@@ -23,7 +23,7 @@
1649 >>> user_browser.open(
1650 ... 'http://translations.launchpad.dev/evolution/+translations')
1651 >>> user_browser.getLink('download').click()
1652- >>> print user_browser.url
1653+ >>> print(user_browser.url)
1654 http://translations.launchpad.dev/evolution/trunk/+export
1655
1656
1657@@ -44,7 +44,7 @@
1658 The logged-in user sees a page that lets them select an export format, and
1659 request the download.
1660
1661- >>> print user_browser.title
1662+ >>> print(user_browser.title)
1663 Download : Series trunk : Translations...
1664
1665
1666@@ -63,7 +63,7 @@
1667 >>> user_browser.getControl('Format:').value = ['PO']
1668 >>> user_browser.getControl('Request Download').click()
1669
1670- >>> print user_browser.url
1671+ >>> print(user_browser.url)
1672 http://translations.launchpad.dev/evolution/trunk
1673
1674 >>> print_feedback_messages(user_browser.contents)
1675@@ -74,7 +74,7 @@
1676 >>> user_browser.getLink('download').click()
1677 >>> user_browser.getControl('Format:').value = ['PO']
1678 >>> user_browser.getControl('Request Download').click()
1679- >>> print user_browser.url
1680+ >>> print(user_browser.url)
1681 http://translations.launchpad.dev/evolution/trunk
1682
1683 >>> print_feedback_messages(user_browser.contents)
1684@@ -98,4 +98,3 @@
1685 Traceback (most recent call last):
1686 ...
1687 LinkNotFoundError
1688-
1689
1690=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt'
1691--- lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt 2013-09-27 04:13:23 +0000
1692+++ lib/lp/translations/stories/productseries/xx-productseries-translations-bzr-request.txt 2018-06-03 00:41:33 +0000
1693@@ -13,7 +13,7 @@
1694 >>> browser.open(
1695 ... 'http://translations.launchpad.dev/evolution/trunk/')
1696 >>> browser.getLink('Request an import from bazaar').click()
1697- >>> print browser.url
1698+ >>> print(browser.url)
1699 http://translations.l...d.dev/evolution/trunk/+request-bzr-import
1700
1701 == The request page with a branch ==
1702@@ -21,7 +21,7 @@
1703 to request an import. The current branch is displayed on the page.
1704
1705 >>> branch = find_tag_by_id(browser.contents, 'branch-display')
1706- >>> print extract_text(branch)
1707+ >>> print(extract_text(branch))
1708 The official Bazaar branch is:
1709 lp://dev/evolution
1710
1711@@ -29,10 +29,10 @@
1712 continuously, the user is reminded of that here.
1713
1714 >>> settings = find_tag_by_id(browser.contents, 'settings-display')
1715- >>> print extract_text(settings)
1716+ >>> print(extract_text(settings))
1717 To enable continuous imports please change the settings here.
1718 >>> browser.getLink('here').click()
1719- >>> print browser.url
1720+ >>> print(browser.url)
1721 http://translations.l...d.dev/evolution/trunk/+translations-settings
1722
1723 Changing that setting will make that message disappear from the page.
1724@@ -45,7 +45,7 @@
1725 ... 'http://translations.launchpad.dev/evolution/trunk/'
1726 ... '+request-bzr-import')
1727 >>> settings = find_tag_by_id(browser.contents, 'settings-display')
1728- >>> print settings
1729+ >>> print(settings)
1730 None
1731
1732 The request is made by clicking on a button labeled
1733@@ -53,10 +53,10 @@
1734
1735 >>> request_button = find_tag_by_id(
1736 ... browser.contents, 'field.actions.request_import')
1737- >>> print request_button
1738+ >>> print(request_button)
1739 <input type="submit"...value="Request one-time import"...
1740 >>> browser.getControl("Request one-time import").click()
1741- >>> print browser.url
1742+ >>> print(browser.url)
1743 http://translations.launchpad.dev/evolution/trunk
1744 >>> print_feedback_messages(browser.contents)
1745 The import has been requested.
1746@@ -76,11 +76,11 @@
1747 ... 'http://translations.launchpad.dev/evolution/trunk/'
1748 ... '+request-bzr-import')
1749 >>> branch = find_tag_by_id(browser.contents, 'no-branch-display')
1750- >>> print extract_text(branch)
1751+ >>> print(extract_text(branch))
1752 This series does not have an official Bazaar branch.
1753 Please set it first.
1754 >>> browser.getLink('Please set it first.').click()
1755- >>> print browser.url
1756+ >>> print(browser.url)
1757 http://launchpad.dev/evolution/trunk/+setbranch
1758
1759 The request button is missing completely from the page.
1760@@ -90,5 +90,5 @@
1761 ... '+request-bzr-import')
1762 >>> request_button = find_tag_by_id(
1763 ... browser.contents, 'field.actions.request_import')
1764- >>> print request_button
1765+ >>> print(request_button)
1766 None
1767
1768=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt'
1769--- lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt 2016-01-26 15:47:37 +0000
1770+++ lib/lp/translations/stories/productseries/xx-productseries-translations-settings.txt 2018-06-03 00:41:33 +0000
1771@@ -17,7 +17,7 @@
1772 >>> browser.open(
1773 ... 'http://translations.launchpad.dev/evolution/trunk/')
1774 >>> browser.getLink('Set up branch synchronization').click()
1775- >>> print browser.url
1776+ >>> print(browser.url)
1777 http://translations.l...d.dev/evolution/trunk/+translations-settings
1778
1779 The branch display
1780@@ -27,7 +27,7 @@
1781 displayed on the page.
1782
1783 >>> branch = find_tag_by_id(browser.contents, 'branch-display')
1784- >>> print extract_text(branch)
1785+ >>> print(extract_text(branch))
1786 The official Bazaar branch is:
1787 lp://dev/evolution
1788
1789@@ -43,11 +43,11 @@
1790 ... 'http://translations.launchpad.dev/evolution/trunk/'
1791 ... '+translations-settings')
1792 >>> branch = find_tag_by_id(browser.contents, 'no-branch-display')
1793- >>> print extract_text(branch)
1794+ >>> print(extract_text(branch))
1795 This series does not have an official Bazaar branch.
1796 Set it now!
1797 >>> browser.getLink('Set it now!').click()
1798- >>> print browser.url
1799+ >>> print(browser.url)
1800 http://launchpad.dev/evolution/trunk/+setbranch
1801
1802 Pointer to one-time import
1803@@ -60,10 +60,10 @@
1804 ... 'http://translations.launchpad.dev/evolution/trunk/'
1805 ... '+translations-settings')
1806 >>> settings = find_tag_by_id(browser.contents, 'bzr-request-display')
1807- >>> print extract_text(settings)
1808+ >>> print(extract_text(settings))
1809 You can request a one-time import.
1810 >>> browser.getLink('request a one-time import').click()
1811- >>> print browser.url
1812+ >>> print(browser.url)
1813 http://translations.l...d.dev/evolution/trunk/+request-bzr-import
1814
1815 Changing the setting
1816@@ -86,7 +86,7 @@
1817
1818 The user is automatically redirected to the page they came from.
1819
1820- >>> print browser.url
1821+ >>> print(browser.url)
1822 http://translations.launchpad.dev/evolution/trunk/
1823 >>> print_feedback_messages(browser.contents)
1824 The settings have been updated.
1825
1826=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations.txt'
1827--- lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2015-06-15 08:35:10 +0000
1828+++ lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2018-06-03 00:41:33 +0000
1829@@ -27,30 +27,30 @@
1830 >>> def print_language_stats(browser):
1831 ... table = find_tag_by_id(browser.contents, 'languagestats')
1832 ... if table is None:
1833- ... print "No translations."
1834+ ... print("No translations.")
1835 ... return
1836 ... language_rows = find_tags_by_class(str(table), 'stats')
1837- ... print "%-25s %13s %13s" % (
1838- ... "Language", "Untranslated", "Unreviewed")
1839+ ... print("%-25s %13s %13s" % (
1840+ ... "Language", "Untranslated", "Unreviewed"))
1841 ... for row in language_rows:
1842 ... cols = row.findAll('td')
1843 ... language = extract_text(cols[0])
1844 ... untranslated = extract_link_info(cols[2])
1845 ... unreviewed = extract_link_info(cols[3])
1846- ... print "%-25s %13d %13d\n" % (
1847- ... language, untranslated[0], unreviewed[0])
1848- ... print "Untranslated link: %s\n" % untranslated[1]
1849- ... print "Unreviewed link: %s\n" % unreviewed[1]
1850+ ... print("%-25s %13d %13d\n" % (
1851+ ... language, untranslated[0], unreviewed[0]))
1852+ ... print("Untranslated link: %s\n" % untranslated[1])
1853+ ... print("Unreviewed link: %s\n" % unreviewed[1])
1854
1855 When there are no translatable templates, series is considered as not
1856 being set up for translation.
1857
1858 >>> anon_browser.open(frobnicator_trunk_url)
1859- >>> print anon_browser.title
1860+ >>> print(anon_browser.title)
1861 Series trunk : Translations : Frobnicator
1862
1863 >>> main_content = find_main_content(anon_browser.contents)
1864- >>> print extract_text(main_content.findAll('h1')[0])
1865+ >>> print(extract_text(main_content.findAll('h1')[0]))
1866 Translation status by language
1867
1868 >>> print_language_stats(anon_browser)
1869@@ -59,7 +59,7 @@
1870 Explanation is shown to indicate that there are no translations for
1871 this series.
1872
1873- >>> print extract_text(main_content.findAll('p')[0])
1874+ >>> print(extract_text(main_content.findAll('p')[0]))
1875 There are no translations for this release series.
1876
1877 Administrator will also see instructions on how to set up a project for
1878@@ -68,7 +68,7 @@
1879 >>> admin_browser.open(frobnicator_trunk_url)
1880 >>> main_content = find_main_content(admin_browser.contents)
1881 >>> paragraphs = main_content.findAll('p')
1882- >>> print extract_text(main_content.findAll('p')[1])
1883+ >>> print(extract_text(main_content.findAll('p')[1]))
1884 To start translating your project...
1885
1886 With one translatable template (with fake stats for 10 messages), a listing
1887@@ -145,8 +145,8 @@
1888 >>> owner_browser.open(
1889 ... 'http://translations.launchpad.dev/'
1890 ... 'evolution/trunk/+translations-upload')
1891- >>> print find_tag_by_id(
1892- ... owner_browser.contents, 'not-translated-in-launchpad')
1893+ >>> print(find_tag_by_id(
1894+ ... owner_browser.contents, 'not-translated-in-launchpad'))
1895 None
1896
1897 Nor does it appear on the template upload pages.
1898@@ -154,8 +154,8 @@
1899 >>> owner_browser.open(
1900 ... 'http://translations.launchpad.dev/'
1901 ... 'evolution/trunk/+pots/evolution-2.2/+upload')
1902- >>> print find_tag_by_id(
1903- ... owner_browser.contents, 'not-translated-in-launchpad')
1904+ >>> print(find_tag_by_id(
1905+ ... owner_browser.contents, 'not-translated-in-launchpad'))
1906 None
1907
1908 Now this is changed: Evolution's owner configures it not to use
1909@@ -171,13 +171,13 @@
1910 >>> owner_browser.open(
1911 ... 'http://translations.launchpad.dev/'
1912 ... 'bazaar/trunk/+translations-upload')
1913- >>> print extract_text(
1914+ >>> print(extract_text(
1915 ... find_tag_by_id(
1916- ... owner_browser.contents, 'not-translated-in-launchpad'))
1917+ ... owner_browser.contents, 'not-translated-in-launchpad')))
1918 trunk does not translate its messages.
1919- >>> print extract_text(
1920+ >>> print(extract_text(
1921 ... find_tag_by_id(
1922- ... owner_browser.contents, 'translations-explanation'))
1923+ ... owner_browser.contents, 'translations-explanation')))
1924 Launchpad allows communities to translate projects using
1925 imports or a branch.
1926 Getting started with translating your project in Launchpad
1927@@ -186,7 +186,7 @@
1928 The notice links to the page for configuring translations on the project.
1929
1930 >>> owner_browser.getLink('Translations', index=1).click()
1931- >>> print owner_browser.url
1932+ >>> print(owner_browser.url)
1933 http://.../bazaar/+configure-translations
1934
1935 An administrator also sees the notice.
1936@@ -194,13 +194,13 @@
1937 >>> admin_browser.open(
1938 ... 'http://translations.launchpad.dev/'
1939 ... 'bazaar/trunk/+translations-upload')
1940- >>> print extract_text(
1941+ >>> print(extract_text(
1942 ... find_tag_by_id(
1943- ... admin_browser.contents, 'not-translated-in-launchpad'))
1944+ ... admin_browser.contents, 'not-translated-in-launchpad')))
1945 trunk does not translate its messages.
1946- >>> print extract_text(
1947+ >>> print(extract_text(
1948 ... find_tag_by_id(
1949- ... admin_browser.contents, 'translations-explanation'))
1950+ ... admin_browser.contents, 'translations-explanation')))
1951 Launchpad allows communities to translate projects using
1952 imports or a branch.
1953 Getting started with translating your project in Launchpad
1954@@ -235,9 +235,9 @@
1955 ... 'http://translations.launchpad.dev/'
1956 ... 'bazaar/trunk/+translations-upload')
1957
1958- >>> print extract_text(
1959+ >>> print(extract_text(
1960 ... find_tag_by_id(
1961- ... jtv_browser.contents, 'not-translated-in-launchpad'))
1962+ ... jtv_browser.contents, 'not-translated-in-launchpad')))
1963 trunk does not translate its messages.
1964
1965 Branch synchronization options
1966@@ -248,7 +248,7 @@
1967 >>> browser.open(frobnicator_trunk_url)
1968 >>> sync_settings = first_tag_by_class(
1969 ... browser.contents, 'automatic-synchronization')
1970- >>> print extract_text(sync_settings)
1971+ >>> print(extract_text(sync_settings))
1972 Automatic synchronization
1973 This project is currently not using any synchronization
1974 with bazaar branches.
1975@@ -269,7 +269,7 @@
1976 >>> browser.open(frobnicator_trunk_url)
1977 >>> sync_settings = first_tag_by_class(
1978 ... browser.contents, 'automatic-synchronization')
1979- >>> print extract_text(sync_settings)
1980+ >>> print(extract_text(sync_settings))
1981 Automatic synchronization
1982 Translations are exported daily to branch
1983 lp://dev/~person-name.../frobnicator/branch....
1984@@ -287,7 +287,7 @@
1985 >>> browser.open(frobnicator_trunk_url)
1986 >>> sync_settings = first_tag_by_class(
1987 ... browser.contents, 'automatic-synchronization')
1988- >>> print extract_text(sync_settings)
1989+ >>> print(extract_text(sync_settings))
1990 Automatic synchronization
1991 This project is currently not using any synchronization
1992 with bazaar branches.
1993@@ -301,7 +301,7 @@
1994 >>> browser.open(frobnicator_trunk_url)
1995 >>> sync_settings = first_tag_by_class(
1996 ... browser.contents, 'automatic-synchronization')
1997- >>> print extract_text(sync_settings)
1998+ >>> print(extract_text(sync_settings))
1999 Automatic synchronization
2000 Translations are imported with every update from branch
2001 lp://dev/frobnicator.
2002@@ -317,11 +317,11 @@
2003 >>> distribution = factory.makeDistribution(name='earthian')
2004 >>> distroseries = factory.makeDistroSeries(
2005 ... name='1.4', distribution=distribution)
2006- >>> print distribution.translation_focus
2007+ >>> print(distribution.translation_focus)
2008 None
2009 >>> logout()
2010 >>> admin_browser.open('http://translations.launchpad.dev/earthian/1.4')
2011- >>> print find_tag_by_id(admin_browser.contents, 'translation-focus')
2012+ >>> print(find_tag_by_id(admin_browser.contents, 'translation-focus'))
2013 None
2014
2015 If focus is set, nice explanatory text is displayed.
2016@@ -332,8 +332,8 @@
2017 >>> distribution.translation_focus = focus_series
2018 >>> logout()
2019 >>> admin_browser.open('http://translations.launchpad.dev/earthian/1.4')
2020- >>> print extract_text(
2021- ... find_tag_by_id(admin_browser.contents, 'translation-focus'))
2022+ >>> print(extract_text(
2023+ ... find_tag_by_id(admin_browser.contents, 'translation-focus')))
2024 Launchpad currently recommends translating 1.6.
2025
2026
2027@@ -374,7 +374,7 @@
2028 ... 'http://translations.launchpad.dev/evolution')
2029 >>> untranslatable = find_tag_by_id(
2030 ... admin_browser.contents, 'portlet-untranslatable-branches')
2031- >>> print extract_text(untranslatable)
2032+ >>> print(extract_text(untranslatable))
2033 Set up translations for a series...
2034 evo-new series — manual or automatic...
2035
2036@@ -382,13 +382,13 @@
2037 page togheter with link for uploading a template from that series
2038 (manual) and setting automatic imports.
2039
2040- >>> print admin_browser.getLink('Evolution evo-new series').url
2041+ >>> print(admin_browser.getLink('Evolution evo-new series').url)
2042 http://translations.launchpad.dev/evolution/evo-new/+translations
2043
2044- >>> print admin_browser.getLink(
2045- ... 'manual', url='/evolution/evo-new/+translations-upload').url
2046+ >>> print(admin_browser.getLink(
2047+ ... 'manual', url='/evolution/evo-new/+translations-upload').url)
2048 http://translations.launchpad.dev/evolution/evo-new/+translations-upload
2049
2050- >>> print admin_browser.getLink(
2051- ... 'automatic', url='/evolution/evo-new/+translations-settings').url
2052+ >>> print(admin_browser.getLink(
2053+ ... 'automatic', url='/evolution/evo-new/+translations-settings').url)
2054 http://translations.launchpad.dev/evolution/evo-new/+translations-settings
2055
2056=== modified file 'lib/lp/translations/stories/project/xx-project-translations.txt'
2057--- lib/lp/translations/stories/project/xx-project-translations.txt 2011-09-20 01:33:04 +0000
2058+++ lib/lp/translations/stories/project/xx-project-translations.txt 2018-06-03 00:41:33 +0000
2059@@ -4,17 +4,17 @@
2060 GNOME is a good example, it has products with translations.
2061
2062 >>> browser.open('http://translations.launchpad.dev/gnome')
2063- >>> print browser.url
2064+ >>> print(browser.url)
2065 http://translations.launchpad.dev/gnome
2066
2067 Evolution being one with translations and being used officially
2068
2069 >>> evo_link = browser.getLink('Evolution')
2070- >>> print evo_link.url
2071+ >>> print(evo_link.url)
2072 http://launchpad.dev/evolution/+translations
2073
2074 >>> browser.open('http://translations.launchpad.dev/gnome')
2075- >>> print browser.url
2076+ >>> print(browser.url)
2077 http://translations.launchpad.dev/gnome
2078
2079 Netapplet is another product of GNOME project. It has translations,
2080@@ -24,7 +24,7 @@
2081 >>> translated_projects = find_tag_by_id(
2082 ... browser.contents, 'translatable-projects')
2083 >>> link = translated_projects.find(text='Network Applet')
2084- >>> print link
2085+ >>> print(link)
2086 None
2087
2088 It does show up among untranslated projects.
2089@@ -39,13 +39,13 @@
2090
2091 >>> anon_browser.open('http://launchpad.dev/gnome')
2092 >>> anon_browser.getLink('NetApplet').click()
2093- >>> print anon_browser.title
2094+ >>> print(anon_browser.title)
2095 NetApplet in Launchpad
2096
2097 Anonymous users don't see the translations
2098
2099 >>> anon_browser.getLink('Translations').click()
2100- >>> print anon_browser.title
2101+ >>> print(anon_browser.title)
2102 Translations : NetApplet
2103
2104 >>> find_tag_by_id(
2105@@ -66,7 +66,7 @@
2106 Let's confirm what we just stated.
2107
2108 >>> browser.open('http://launchpad.dev/gnome')
2109- >>> print browser.url
2110+ >>> print(browser.url)
2111 http://launchpad.dev/gnome
2112
2113 alsa-utils does not belong to GNOME project.
2114@@ -79,9 +79,9 @@
2115 It's using Launchpad Translations officially. And it has translations.
2116
2117 >>> browser.open('http://translations.launchpad.dev/alsa-utils')
2118- >>> print browser.url
2119+ >>> print(browser.url)
2120 http://translations.launchpad.dev/alsa-utils
2121
2122 >>> alsa_utils_spanish = browser.getLink('Spanish')
2123- >>> print alsa_utils_spanish.url
2124+ >>> print(alsa_utils_spanish.url)
2125 http://translations.../alsa-utils/trunk/+pots/alsa-utils/es/+translate
2126
2127=== modified file 'lib/lp/translations/stories/standalone/custom-language-codes.txt'
2128--- lib/lp/translations/stories/standalone/custom-language-codes.txt 2014-11-27 07:48:25 +0000
2129+++ lib/lp/translations/stories/standalone/custom-language-codes.txt 2018-06-03 00:41:33 +0000
2130@@ -41,7 +41,7 @@
2131
2132 >>> owner_browser.open(product_page)
2133 >>> tag = find_custom_language_codes_link(owner_browser)
2134- >>> print extract_text(tag.renderContents())
2135+ >>> print(extract_text(tag.renderContents()))
2136 If necessary, you may
2137 define custom language codes
2138 for this project.
2139@@ -50,7 +50,7 @@
2140
2141 >>> rosetta_admin_browser.open(product_page)
2142 >>> tag = find_custom_language_codes_link(rosetta_admin_browser)
2143- >>> print extract_text(tag.renderContents())
2144+ >>> print(extract_text(tag.renderContents()))
2145 If necessary, you may
2146 define custom language codes
2147 for this project.
2148@@ -63,13 +63,13 @@
2149 Other users don't see this link.
2150
2151 >>> user_browser.open(product_page)
2152- >>> print find_custom_language_codes_link(user_browser)
2153+ >>> print(find_custom_language_codes_link(user_browser))
2154 None
2155
2156 Initially the page shows no custom language codes for the project.
2157
2158 >>> tag = find_tag_by_id(owner_browser.contents, 'empty')
2159- >>> print extract_text(tag.renderContents())
2160+ >>> print(extract_text(tag.renderContents()))
2161 No custom language codes have been defined.
2162
2163 There is a link to add a custom language code.
2164@@ -88,7 +88,7 @@
2165 True
2166
2167 >>> tag = find_tag_by_id(owner_browser.contents, 'nonempty')
2168- >>> print extract_text(tag.renderContents())
2169+ >>> print(extract_text(tag.renderContents()))
2170 Foo uses the following custom language codes:
2171 Code... ...maps to language
2172 no Norwegian Nynorsk
2173@@ -98,7 +98,7 @@
2174
2175 >>> owner_browser.getLink("no").click()
2176 >>> main = find_main_content(owner_browser.contents)
2177- >>> print extract_text(main.renderContents())
2178+ >>> print(extract_text(main.renderContents()))
2179 Custom language code ...no... for Foo
2180 For Foo, uploads with the language code
2181 &ldquo;no&rdquo;
2182@@ -130,7 +130,7 @@
2183 True
2184
2185 >>> tag = find_tag_by_id(owner_browser.contents, 'empty')
2186- >>> print extract_text(tag.renderContents())
2187+ >>> print(extract_text(tag.renderContents()))
2188 No custom language codes have been defined.
2189
2190
2191@@ -143,7 +143,7 @@
2192 >>> user_browser.open(custom_language_codes_page)
2193
2194 >>> tag = find_tag_by_id(user_browser.contents, 'empty')
2195- >>> print extract_text(tag.renderContents())
2196+ >>> print(extract_text(tag.renderContents()))
2197 No custom language codes have been defined.
2198
2199 However all they get is a read-only version of the page.
2200@@ -170,7 +170,7 @@
2201
2202 >>> user_browser.open(custom_language_codes_page)
2203 >>> tag = find_tag_by_id(user_browser.contents, 'nonempty')
2204- >>> print extract_text(tag.renderContents())
2205+ >>> print(extract_text(tag.renderContents()))
2206 Foo uses the following custom language codes:
2207 Code... ...maps to language
2208 no Norwegian Nynorsk
2209@@ -231,7 +231,7 @@
2210 codes talks about a package, not a project.
2211
2212 >>> tag = find_custom_language_codes_link(translations_browser)
2213- >>> print extract_text(tag.renderContents())
2214+ >>> print(extract_text(tag.renderContents()))
2215 If necessary, you may
2216 define custom language codes
2217 for this package.
2218@@ -240,7 +240,7 @@
2219 >>> custom_language_codes_page = translations_browser.url
2220
2221 >>> tag = find_tag_by_id(translations_browser.contents, 'empty')
2222- >>> print extract_text(tag.renderContents())
2223+ >>> print(extract_text(tag.renderContents()))
2224 No custom language codes have been defined.
2225
2226 A translations admin can add a language code.
2227@@ -255,7 +255,7 @@
2228 The language code is displayed.
2229
2230 >>> tag = find_tag_by_id(translations_browser.contents, 'nonempty')
2231- >>> print extract_text(tag.renderContents())
2232+ >>> print(extract_text(tag.renderContents()))
2233 bar in Distro uses the following custom language codes:
2234 Code... ...maps to language
2235 pt-br Portuguese (Brazil)
2236@@ -265,14 +265,14 @@
2237
2238 >>> translations_browser.open(page_in_other_series)
2239 >>> tag = find_custom_language_codes_link(translations_browser)
2240- >>> print extract_text(tag.renderContents())
2241+ >>> print(extract_text(tag.renderContents()))
2242 If necessary, you may
2243 define custom language codes
2244 for this package.
2245
2246 >>> translations_browser.getLink("define custom language codes").click()
2247 >>> tag = find_tag_by_id(translations_browser.contents, 'nonempty')
2248- >>> print extract_text(tag.renderContents())
2249+ >>> print(extract_text(tag.renderContents()))
2250 bar in Distro uses the following custom language codes:
2251 Code... ...maps to language
2252 pt-br Portuguese (Brazil)
2253@@ -288,5 +288,5 @@
2254 >>> translations_browser.getControl("Remove").click()
2255
2256 >>> tag = find_tag_by_id(translations_browser.contents, 'empty')
2257- >>> print extract_text(tag.renderContents())
2258+ >>> print(extract_text(tag.renderContents()))
2259 No custom language codes have been defined.
2260
2261=== modified file 'lib/lp/translations/stories/standalone/xx-language.txt'
2262--- lib/lp/translations/stories/standalone/xx-language.txt 2011-12-22 05:09:10 +0000
2263+++ lib/lp/translations/stories/standalone/xx-language.txt 2018-06-03 00:41:33 +0000
2264@@ -17,7 +17,7 @@
2265 There we can find a link to browse and manage languages.
2266
2267 >>> admin_browser.getLink('18 languages').click()
2268- >>> print admin_browser.url
2269+ >>> print(admin_browser.url)
2270 http://translations.launchpad.dev/+languages
2271
2272
2273@@ -28,14 +28,14 @@
2274 add new languages.
2275
2276 >>> admin_browser.getLink('Add new language').click()
2277- >>> print admin_browser.url
2278+ >>> print(admin_browser.url)
2279 http://translations.launchpad.dev/+languages/+add
2280
2281 Which detects an attempt to create duplicate Languages, such as Spanish,
2282 which is already registered:
2283
2284 >>> browser.open('http://translations.launchpad.dev/+languages/es')
2285- >>> print browser.url
2286+ >>> print(browser.url)
2287 http://translations.launchpad.dev/+languages/es
2288
2289 If someone tries to create a new language with the same language code,
2290@@ -44,11 +44,11 @@
2291 >>> admin_browser.getControl('The ISO 639').value = 'es'
2292 >>> admin_browser.getControl('English name').value = 'Foos'
2293 >>> admin_browser.getControl('Add').click()
2294- >>> print admin_browser.url
2295+ >>> print(admin_browser.url)
2296 http://translations.launchpad.dev/+languages/+add
2297
2298 >>> for tag in find_tags_by_class(admin_browser.contents, 'message'):
2299- ... print tag.renderContents()
2300+ ... print(tag.renderContents())
2301 There is 1 error.
2302 There is already a language with that code.
2303
2304@@ -65,13 +65,13 @@
2305
2306 And the system forwards us to its main page:
2307
2308- >>> print admin_browser.url
2309+ >>> print(admin_browser.url)
2310 http://translations.launchpad.dev/+languages/foos
2311
2312 A normal user will not be able to see or use the url to add languages.
2313
2314 >>> user_browser.open('http://translations.launchpad.dev/+languages')
2315- >>> print user_browser.url
2316+ >>> print(user_browser.url)
2317 http://translations.launchpad.dev/+languages
2318
2319 >>> user_browser.getLink('Add new language')
2320@@ -92,13 +92,13 @@
2321 From the top languages page, anyone can find languages.
2322
2323 >>> browser.open('http://translations.launchpad.dev/+languages')
2324- >>> print browser.url
2325+ >>> print(browser.url)
2326 http://translations.launchpad.dev/+languages
2327
2328 >>> text_search = browser.getControl(name='field.search_lang')
2329 >>> text_search.value = 'Spanish'
2330 >>> browser.getControl('Find language', index=0).click()
2331- >>> print browser.url
2332+ >>> print(browser.url)
2333 http://translations.launchpad.dev/+languages/+index?field.search_lang=Spanish
2334
2335
2336@@ -109,11 +109,11 @@
2337 about the selected language.
2338
2339 >>> browser.getLink('Spanish').click()
2340- >>> print browser.url
2341+ >>> print(browser.url)
2342 http://translations.launchpad.dev/+languages/es
2343
2344- >>> print extract_text(find_portlet(browser.contents, 'Plural forms'
2345- ... ).renderContents())
2346+ >>> print(extract_text(find_portlet(browser.contents, 'Plural forms'
2347+ ... ).renderContents()))
2348 Plural forms
2349 Spanish has 2 plural forms:
2350 Form 0 for 1.
2351@@ -122,13 +122,13 @@
2352
2353 >>> translationteams_portlet = find_portlet(
2354 ... browser.contents, 'Translation teams')
2355- >>> print translationteams_portlet
2356+ >>> print(translationteams_portlet)
2357 <...
2358 ...testing Spanish team...
2359 ...Just a testing team...
2360
2361 >>> countries_portlet = find_portlet(browser.contents, 'Countries')
2362- >>> print countries_portlet
2363+ >>> print(countries_portlet)
2364 <...
2365 ...Argentina...
2366 ...Bolivia...
2367@@ -153,7 +153,7 @@
2368
2369 >>> topcontributors_portlet = find_portlet(
2370 ... browser.contents, 'Top contributors')
2371- >>> print topcontributors_portlet
2372+ >>> print(topcontributors_portlet)
2373 <...
2374 ...Carlos Perelló Marín...
2375
2376@@ -165,13 +165,13 @@
2377 form.
2378
2379 >>> browser.open('http://translations.launchpad.dev/+languages/ab')
2380- >>> print extract_text(find_portlet(browser.contents, 'Plural forms'
2381- ... ).renderContents())
2382+ >>> print(extract_text(find_portlet(browser.contents, 'Plural forms'
2383+ ... ).renderContents()))
2384 Plural forms
2385 Unfortunately, Launchpad doesn't know the plural
2386 form information for this language...
2387
2388- >>> print browser.getLink(id='plural_question').url
2389+ >>> print(browser.getLink(id='plural_question').url)
2390 http://answers.launchpad.dev/launchpad/+addquestion
2391
2392 We will see a note that Launchpad does not know in which countries
2393@@ -179,12 +179,12 @@
2394 Rosetta admin about the countries where this page is officially spoken.
2395
2396 >>> countries_portlet = find_portlet(browser.contents, 'Countries')
2397- >>> print countries_portlet
2398+ >>> print(countries_portlet)
2399 <...
2400 Abkhazian is not registered as being spoken in any
2401 country...
2402
2403- >>> print browser.getLink(id='country_question').url
2404+ >>> print(browser.getLink(id='country_question').url)
2405 http://answers.launchpad.dev/launchpad/+addquestion
2406
2407
2408@@ -195,7 +195,7 @@
2409
2410 >>> user_browser.open(
2411 ... 'http://translations.launchpad.dev/+languages/es')
2412- >>> print user_browser.url
2413+ >>> print(user_browser.url)
2414 http://translations.launchpad.dev/+languages/es
2415
2416 A plain user is not able to reach it.
2417@@ -217,35 +217,35 @@
2418
2419 >>> admin_browser.open(
2420 ... 'http://translations.launchpad.dev/+languages/es')
2421- >>> print admin_browser.url
2422+ >>> print(admin_browser.url)
2423 http://translations.launchpad.dev/+languages/es
2424
2425 >>> admin_browser.getLink('Administer').click()
2426- >>> print admin_browser.url
2427+ >>> print(admin_browser.url)
2428 http://translations.launchpad.dev/+languages/es/+admin
2429
2430- >>> print admin_browser.getControl('ISO 639').value
2431+ >>> print(admin_browser.getControl('ISO 639').value)
2432 es
2433
2434- >>> print admin_browser.getControl('English name').value
2435+ >>> print(admin_browser.getControl('English name').value)
2436 Spanish
2437
2438- >>> print admin_browser.getControl('Native name').value
2439+ >>> print(admin_browser.getControl('Native name').value)
2440
2441- >>> print admin_browser.getControl('Number of plural forms').value
2442+ >>> print(admin_browser.getControl('Number of plural forms').value)
2443 2
2444
2445- >>> print admin_browser.getControl('Plural form expression').value
2446+ >>> print(admin_browser.getControl('Plural form expression').value)
2447 n != 1
2448
2449- >>> print admin_browser.getControl('Visible').optionValue
2450+ >>> print(admin_browser.getControl('Visible').optionValue)
2451 on
2452
2453- >>> print admin_browser.getControl('Text direction').displayValue
2454+ >>> print(admin_browser.getControl('Text direction').displayValue)
2455 ['Left to Right']
2456
2457 >>> control = admin_browser.getControl(name='field.countries')
2458- >>> print [strip_label(country) for country in control.displayValue]
2459+ >>> print([strip_label(country) for country in control.displayValue])
2460 ['Argentina', 'Bolivia', 'Chile', 'Colombia',
2461 'Costa Rica', 'Dominican Republic', 'Ecuador',
2462 'El Salvador', 'Guatemala', 'Honduras', 'Mexico',
2463@@ -261,11 +261,11 @@
2464
2465 >>> admin_browser.getControl('ISO 639').value = 'fr'
2466 >>> admin_browser.getControl('Admin Language').click()
2467- >>> print admin_browser.url
2468+ >>> print(admin_browser.url)
2469 http://translations.launchpad.dev/+languages/es/+admin
2470
2471 >>> for tag in find_tags_by_class(admin_browser.contents, 'message'):
2472- ... print tag.renderContents()
2473+ ... print(tag.renderContents())
2474 There is 1 error.
2475 There is already a language with that code.
2476
2477@@ -274,26 +274,26 @@
2478 >>> admin_browser.getControl('ISO 639').value = 'bars'
2479 >>> admin_browser.getControl('English name').value = 'Changed field'
2480 >>> spokenin_control = admin_browser.getControl(name='field.countries')
2481- >>> spokenin_control.getControl('Argentina').selected = False
2482- >>> spokenin_control.getControl('France').selected = True
2483+ >>> spokenin_control.getControl(b'Argentina').selected = False
2484+ >>> spokenin_control.getControl(b'France').selected = True
2485 >>> admin_browser.getControl('Admin Language').click()
2486- >>> print admin_browser.url
2487+ >>> print(admin_browser.url)
2488 http://translations.launchpad.dev/+languages/bars
2489
2490 And we can validate it:
2491
2492 >>> admin_browser.getLink('Administer').click()
2493- >>> print admin_browser.url
2494+ >>> print(admin_browser.url)
2495 http://translations.launchpad.dev/+languages/bars/+admin
2496
2497- >>> print admin_browser.getControl('ISO 639').value
2498+ >>> print(admin_browser.getControl('ISO 639').value)
2499 bars
2500
2501- >>> print admin_browser.getControl('English name').value
2502+ >>> print(admin_browser.getControl('English name').value)
2503 Changed field
2504
2505 >>> control = admin_browser.getControl(name='field.countries')
2506- >>> print [strip_label(country) for country in control.displayValue]
2507+ >>> print([strip_label(country) for country in control.displayValue])
2508 ['Bolivia', 'Chile', 'Colombia', 'Costa Rica',
2509 'Dominican Republic', 'Ecuador', 'El Salvador', 'France',
2510 'Guatemala', 'Honduras', 'Mexico', 'Nicaragua',
2511@@ -307,5 +307,3 @@
2512 Traceback (most recent call last):
2513 ...
2514 NotFound:...
2515-
2516-
2517
2518=== modified file 'lib/lp/translations/stories/standalone/xx-licensing.txt'
2519--- lib/lp/translations/stories/standalone/xx-licensing.txt 2016-01-26 15:47:37 +0000
2520+++ lib/lp/translations/stories/standalone/xx-licensing.txt 2018-06-03 00:41:33 +0000
2521@@ -14,9 +14,9 @@
2522 Karl realises that he is not on the translate page, he can see that
2523 that this page has information about relicensing.
2524
2525- >>> print browser.title
2526+ >>> print(browser.title)
2527 Licensing : Translations...
2528- >>> print extract_text(find_main_content(browser.contents))
2529+ >>> print(extract_text(find_main_content(browser.contents)))
2530 Translations licensing by Karl Tilbury
2531 ...
2532
2533@@ -50,10 +50,10 @@
2534 >>> main_content = find_tag_by_id(
2535 ... browser.contents, 'messages_to_translate')
2536 >>> for textarea in main_content.findAll('textarea'):
2537- ... print 'Found textarea:\n%s' % textarea
2538+ ... print('Found textarea:\n%s' % textarea)
2539
2540 >>> for input in main_content.findAll('input'):
2541- ... print 'Found input:\n%s' % input
2542+ ... print('Found input:\n%s' % input)
2543
2544 Karl changes his mind. He returns to the licensing page.
2545
2546@@ -61,13 +61,13 @@
2547 >>> browser.getLink('Translations licensing').click()
2548 >>> browser.url
2549 'http://translations.launchpad.dev/~karl/+licensing'
2550- >>> print browser.title
2551+ >>> print(browser.title)
2552 Licensing : Translations...
2553
2554 Karl sees that the current value is 'no', which he set before.
2555
2556 >>> radiobuttons = browser.getControl(name='field.allow_relicensing')
2557- >>> print radiobuttons.value
2558+ >>> print(radiobuttons.value)
2559 ['REMOVE']
2560
2561 He changes it again.
2562@@ -84,7 +84,7 @@
2563 ... '+pots/alsa-utils/es/+translate')
2564 >>> browser.url
2565 'http://.../alsa-utils/trunk/+pots/alsa-utils/es/+translate'
2566- >>> print browser.title
2567+ >>> print(browser.title)
2568 Spanish (es) : Template ...alsa-utils... : Series trunk :
2569 Translations : alsa-utils
2570
2571
2572=== modified file 'lib/lp/translations/stories/standalone/xx-person-activity.txt'
2573--- lib/lp/translations/stories/standalone/xx-person-activity.txt 2016-01-26 15:47:37 +0000
2574+++ lib/lp/translations/stories/standalone/xx-person-activity.txt 2018-06-03 00:41:33 +0000
2575@@ -21,7 +21,7 @@
2576 # Prints a heading and formatted list of POFiles and latest submissions.
2577 >>> def print_activity_list(listing):
2578 ... for row in listing.findAll('tr'):
2579- ... print extract_text(row)
2580+ ... print(extract_text(row))
2581
2582 >>> listing = find_tag_by_id(anon_browser.contents, 'activity-table')
2583 >>> print_activity_list(listing)
2584@@ -44,7 +44,7 @@
2585 >>> alsa_utils_link = (
2586 ... 'Spanish (es) translation of alsa-utils in alsa-utils trunk')
2587 >>> anon_browser.getLink(alsa_utils_link).click()
2588- >>> print anon_browser.title
2589+ >>> print(anon_browser.title)
2590 Translations by ...Spanish (es)...
2591
2592
2593@@ -71,11 +71,11 @@
2594 >>> table = find_tag_by_id(user_browser.contents, 'activity-table')
2595 >>> link = table.find('a')
2596 >>> url = link['href']
2597- >>> print url.split('/')[-1]
2598+ >>> print(url.split('/')[-1])
2599 +filter?person=a%2Bb
2600
2601 Because of this, the link actually works.
2602
2603 >>> user_browser.open(url.encode('ascii'))
2604- >>> print user_browser.title
2605+ >>> print(user_browser.title)
2606 Translations by A+b in...Serbian (sr) translation...
2607
2608=== modified file 'lib/lp/translations/stories/standalone/xx-person-editlanguages.txt'
2609--- lib/lp/translations/stories/standalone/xx-person-editlanguages.txt 2017-10-23 00:16:39 +0000
2610+++ lib/lp/translations/stories/standalone/xx-person-editlanguages.txt 2018-06-03 00:41:33 +0000
2611@@ -15,7 +15,7 @@
2612 ... tag = find_tag_by_id(page, 'preferred-languages')
2613 ... return extract_text(tag)
2614
2615- >>> print find_languages_section(browser.contents)
2616+ >>> print(find_languages_section(browser.contents))
2617 Your preferred languages
2618 Catalan
2619 Spanish
2620@@ -25,7 +25,7 @@
2621 +editlanguages page.
2622
2623 >>> browser.getLink(id="change-languages").click()
2624- >>> print extract_text(find_main_content(browser.contents).find('h1'))
2625+ >>> print(extract_text(find_main_content(browser.contents).find('h1')))
2626 Your language preferences
2627
2628 So far, he has Spanish selected as one of his preferred languages, but
2629@@ -54,12 +54,12 @@
2630 confirming his changes.
2631
2632 >>> for message in find_tags_by_class(browser.contents, 'message'):
2633- ... print message.renderContents()
2634+ ... print(message.renderContents())
2635 Added Welsh to your preferred languages.<br
2636 />Removed Spanish from your preferred languages.
2637
2638 >>> browser.open('http://translations.launchpad.dev/')
2639- >>> print find_languages_section(browser.contents)
2640+ >>> print(find_languages_section(browser.contents))
2641 Your preferred languages
2642 Catalan
2643 Welsh
2644@@ -72,7 +72,7 @@
2645 >>> # Fake request from a Liechtenstein IP address by setting
2646 >>> # X-Forwarded-For in the http header, like a proxy would.
2647 >>> browser.addHeader('X-Forwarded-For', '80.66.224.0')
2648- >>> browser.addHeader('Accept-Language', 'pt_br, Espa\xf1ol')
2649+ >>> browser.addHeader('Accept-Language', b'pt_br, Espa\xf1ol')
2650 >>> browser.open(
2651 ... 'http://translations.launchpad.dev/~name12/+editlanguages')
2652
2653@@ -82,7 +82,7 @@
2654 pt_br language code is recognized properly.
2655
2656 >>> portlet = find_tag_by_id(browser.contents, 'portlet-browser-languages')
2657- >>> print extract_text(portlet)
2658+ >>> print(extract_text(portlet))
2659 Your browser languages:
2660 Portuguese (Brazil)
2661
2662@@ -91,7 +91,7 @@
2663
2664 >>> country_portlet = find_tag_by_id(browser.contents,
2665 ... 'portlet-country-languages')
2666- >>> print extract_text(country_portlet.dt)
2667+ >>> print(extract_text(country_portlet.dt))
2668 Languages in Liechtenstein
2669
2670 The system has no information about languages spoken in Liechtenstein,
2671@@ -103,9 +103,9 @@
2672 ... list_items = find_tags_by_class(str(spoken_in), 'language')
2673 ... return [li.contents for li in list_items]
2674
2675- >>> print find_spoken_languages(country_portlet)
2676+ >>> print(find_spoken_languages(country_portlet))
2677 []
2678- >>> print country_portlet.find('a')['href']
2679+ >>> print(country_portlet.find('a')['href'])
2680 http://answers.launchpad.dev/launchpad
2681
2682 Back home in Brazil, Joao gets the equivalent for Brazil, where the
2683@@ -117,7 +117,7 @@
2684 ... 'http://translations.launchpad.dev/~name12/+editlanguages')
2685 >>> country_portlet = find_tag_by_id(browser.contents,
2686 ... 'portlet-country-languages')
2687- >>> print find_spoken_languages(country_portlet)
2688+ >>> print(find_spoken_languages(country_portlet))
2689 [[u'Portuguese (Brazil)']]
2690
2691 We also have a page under the launchpad root, called +editmylanguages,
2692@@ -154,13 +154,13 @@
2693 'Landscape Developers in Launchpad'
2694
2695 >>> browser.getLink('Set preferred languages').click()
2696- >>> print extract_text(find_main_content(browser.contents).find('h1'))
2697+ >>> print(extract_text(find_main_content(browser.contents).find('h1')))
2698 Landscape Developers's language preferences
2699
2700 >>> browser.getControl('Spanish').selected = True
2701 >>> browser.getControl('Save').click()
2702 >>> for message in find_tags_by_class(browser.contents, 'message'):
2703- ... print extract_text(message)
2704+ ... print(extract_text(message))
2705 Added Spanish to Landscape Developers&#x27;s preferred languages.
2706
2707
2708@@ -175,14 +175,14 @@
2709 >>> admin_browser.title
2710 'No Privileges Person in Launchpad'
2711 >>> admin_browser.getLink('Set preferred languages').click()
2712- >>> print extract_text(
2713- ... find_main_content(admin_browser.contents).find('h1'))
2714+ >>> print(extract_text(
2715+ ... find_main_content(admin_browser.contents).find('h1')))
2716 No Privileges Person's language preferences
2717
2718 >>> admin_browser.getControl('Esperanto').selected = True
2719 >>> admin_browser.getControl('Save').click()
2720 >>> for message in find_tags_by_class(admin_browser.contents, 'message'):
2721- ... print extract_text(message)
2722+ ... print(extract_text(message))
2723 Added Esperanto to No Privileges Person&#x27;s preferred languages.
2724
2725
2726@@ -212,20 +212,20 @@
2727
2728 The home page reminds her to set her preferred languages.
2729
2730- >>> print find_nag(noi_browser)
2731+ >>> print(find_nag(noi_browser))
2732 You have not selected your preferred languages.
2733 Please <a ...>set them now</a>.
2734
2735 The message does not appear for other users looking at Noi's home page.
2736
2737 >>> user_browser.open(noi_home)
2738- >>> print find_nag(user_browser)
2739+ >>> print(find_nag(user_browser))
2740 None
2741
2742 The nag message links to the languages editing page.
2743
2744 >>> noi_browser.getLink(id='set-languages').click()
2745- >>> print noi_browser.title
2746+ >>> print(noi_browser.title)
2747 Language preferences...
2748
2749 Once Noi has set one or more preferred languages, the nag message goes
2750@@ -237,5 +237,5 @@
2751 >>> logout()
2752
2753 >>> noi_browser.open(noi_home)
2754- >>> print find_nag(noi_browser)
2755+ >>> print(find_nag(noi_browser))
2756 None
2757
2758=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-auto-alt-languages.txt'
2759--- lib/lp/translations/stories/standalone/xx-pofile-auto-alt-languages.txt 2009-07-01 20:45:39 +0000
2760+++ lib/lp/translations/stories/standalone/xx-pofile-auto-alt-languages.txt 2018-06-03 00:41:33 +0000
2761@@ -11,7 +11,7 @@
2762 >>> browser.open(
2763 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
2764 ... 'evolution-2.2/es_MX/+translate')
2765- >>> print browser.url
2766+ >>> print(browser.url)
2767 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es_MX/+translate
2768
2769 >>> browser.getControl(name='field.alternative_language', index=0).value
2770@@ -23,7 +23,7 @@
2771 >>> browser.open(
2772 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
2773 ... 'evolution-2.2/pt_BR/+translate')
2774- >>> print browser.url
2775+ >>> print(browser.url)
2776 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/pt_BR/+translate
2777
2778 >>> browser.getControl(name='field.alternative_language', index=0).value
2779@@ -35,10 +35,8 @@
2780 >>> browser.open(
2781 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
2782 ... 'evolution-2.2/fr/+translate')
2783- >>> print browser.url
2784+ >>> print(browser.url)
2785 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/fr/+translate
2786
2787 >>> browser.getControl(name='field.alternative_language', index=0).value
2788 ['']
2789-
2790-
2791
2792=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-details.txt'
2793--- lib/lp/translations/stories/standalone/xx-pofile-details.txt 2013-09-27 04:13:23 +0000
2794+++ lib/lp/translations/stories/standalone/xx-pofile-details.txt 2018-06-03 00:41:33 +0000
2795@@ -8,8 +8,8 @@
2796 >>> anon_browser.open(
2797 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
2798 ... 'evolution-2.2/es/+details')
2799- >>> print extract_text(find_main_content(anon_browser.contents)).encode(
2800- ... 'ascii', 'backslashreplace')
2801+ >>> print(extract_text(find_main_content(anon_browser.contents)).encode(
2802+ ... 'ascii', 'backslashreplace'))
2803 Details for Spanish translation
2804 ...
2805 Latest contributor:
2806@@ -25,7 +25,7 @@
2807 appearing among contributors), by choosing the 'filter' link:
2808
2809 >>> anon_browser.getLink('filter').click()
2810- >>> print anon_browser.title
2811+ >>> print(anon_browser.title)
2812 Translations by Carlos ... in ...
2813
2814 To display all the translations submitted by Carlos, and allow easier
2815@@ -63,7 +63,7 @@
2816 ... contents = get_columns(cells)
2817 ... if len(contents) > 50:
2818 ... contents = contents[:47] + '...'
2819- ... print "%-10s %s" % (types[type], contents)
2820+ ... print("%-10s %s" % (types[type], contents))
2821
2822 A user can see all the submissions Carlos has made to this POFile.
2823 Note that 'english' in the first column indicates a msgid, and 'used',
2824@@ -102,9 +102,9 @@
2825 A POTMsgSet sequence number is also a link to edit a translation.
2826
2827 >>> anon_browser.getLink('14.').click()
2828- >>> print anon_browser.url
2829+ >>> print(anon_browser.url)
2830 http://.../evolution/trunk/+pots/evolution-2.2/es/14/+translate
2831- >>> print anon_browser.title
2832+ >>> print(anon_browser.title)
2833 Browsing Spanish translation...
2834
2835
2836@@ -164,7 +164,7 @@
2837 ... "ubuntu/hoary/+source/%s/+pots/%s/%s/+details") % (
2838 ... package.name, template.name, language_code))
2839 >>> main_text = extract_text(find_main_content(browser.contents))
2840- >>> print main_text
2841+ >>> print(main_text)
2842 Details for ...
2843 Contributors to this translation
2844 The following people have made some contribution to this specific
2845@@ -192,7 +192,7 @@
2846
2847 >>> browser.open(pofile_url)
2848 >>> stats_portlet = find_tag_by_id(browser.contents, 'portlet-stats')
2849- >>> print extract_text(stats_portlet)
2850+ >>> print(extract_text(stats_portlet))
2851 Statistics
2852 Messages: 10
2853 Translated: 7 (70.0%)
2854
2855=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-export.txt'
2856--- lib/lp/translations/stories/standalone/xx-pofile-export.txt 2017-10-23 00:16:39 +0000
2857+++ lib/lp/translations/stories/standalone/xx-pofile-export.txt 2018-06-03 00:41:33 +0000
2858@@ -18,11 +18,11 @@
2859 ... '/+source/evolution/+pots/evolution-2.2/es')
2860 >>> user_browser.getLink('Download').click()
2861
2862- >>> print user_browser.title
2863+ >>> print(user_browser.title)
2864 Download translation : Spanish (es)... : Hoary (5.04) :
2865 Translations : evolution package : Ubuntu
2866
2867- >>> print find_main_content(user_browser.contents)
2868+ >>> print(find_main_content(user_browser.contents))
2869 <...
2870 ...Download Spanish translation...
2871 Once the file is ready for download, Launchpad will email
2872@@ -33,7 +33,7 @@
2873
2874 >>> user_browser.getControl(name='format').value = ['PO']
2875 >>> user_browser.getControl('Request Download').click()
2876- >>> print user_browser.url
2877+ >>> print(user_browser.url)
2878 http://translatio.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es
2879
2880 >>> for tag in find_tags_by_class(user_browser.contents, 'informational'):
2881@@ -50,12 +50,12 @@
2882
2883 >>> user_browser.getControl(name='format').value = ['PO']
2884 >>> user_browser.getControl('Request Download').click()
2885- >>> print user_browser.url
2886+ >>> print(user_browser.url)
2887 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/cy
2888
2889 >>> for tag in find_tags_by_class(
2890 ... user_browser.contents, 'informational'):
2891- ... print tag.renderContents()
2892+ ... print(tag.renderContents())
2893 Your request has been received. Expect to receive an email shortly.
2894
2895 If the POFile first has to be created, the requester becomes its owner.
2896@@ -72,7 +72,7 @@
2897
2898 >>> browser.getControl(name='format').value = ['PO']
2899 >>> browser.getControl('Request Download').click()
2900- >>> print browser.url
2901+ >>> print(browser.url)
2902 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/sv
2903
2904 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
2905@@ -97,7 +97,7 @@
2906
2907 >>> browser.getControl(name='format').value = ['PO']
2908 >>> browser.getControl('Request Download').click()
2909- >>> print browser.url
2910+ >>> print(browser.url)
2911 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/sv
2912
2913 >>> for tag in find_tags_by_class(browser.contents, 'informational'):
2914
2915=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt'
2916--- lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2016-01-26 15:47:37 +0000
2917+++ lib/lp/translations/stories/standalone/xx-pofile-translate-alternative-language.txt 2018-06-03 00:41:33 +0000
2918@@ -86,8 +86,8 @@
2919 "cards" might translate to Catalan as "targetas," the Spanish equivalent is
2920 "tarjetas."
2921
2922- >>> print extract_text(find_main_content(
2923- ... browser.contents)).encode('ASCII', 'backslashreplace')
2924+ >>> print(extract_text(find_main_content(
2925+ ... browser.contents)).encode('ASCII', 'backslashreplace'))
2926 Translating into Catalan...
2927 ...
2928 English: cards
2929@@ -123,7 +123,7 @@
2930
2931 It even presents a link to where the user can set the preferred languages.
2932
2933- >>> print browser.getLink("add it to your preferred languages").url
2934+ >>> print(browser.getLink("add it to your preferred languages").url)
2935 http...~carlos/+editlanguages
2936
2937 This distinction between alternative languages from the user's preferred set
2938@@ -134,8 +134,8 @@
2939 >>> anon_browser.getControl('Spanish (es)').selected = True
2940 >>> anon_browser.getControl('Change').click()
2941
2942- >>> print extract_text(find_main_content(
2943- ... anon_browser.contents)).encode('ASCII', 'backslashreplace')
2944+ >>> print(extract_text(find_main_content(
2945+ ... anon_browser.contents)).encode('ASCII', 'backslashreplace'))
2946 Browsing Catalan translation
2947 ...
2948 English: cards
2949@@ -164,16 +164,17 @@
2950 >>> browser.getControl('Catalan (ca)').selected = True
2951 >>> browser.getControl('untranslated').selected = True
2952 >>> browser.getControl('Change').click()
2953- >>> print extract_url_parameter(browser.url, 'field.alternative_language')
2954+ >>> print(extract_url_parameter(
2955+ ... browser.url, 'field.alternative_language'))
2956 field.alternative_language=ca
2957- >>> print extract_url_parameter(browser.url, 'show')
2958+ >>> print(extract_url_parameter(browser.url, 'show'))
2959 show=untranslated
2960
2961 Carlos can see that he is viewing the first page of results in the
2962 navigation bar between the translation controls and the messages.
2963
2964 >>> navigation = find_tags_by_class(browser.contents, 'results')[0].td
2965- >>> print extract_text(navigation).decode('utf-8')
2966+ >>> print(extract_text(navigation).decode('utf-8'))
2967 1 ... 10 of 15 results ...
2968
2969 Carlos uses the 'Save & Continue' button to see the next page of
2970@@ -181,7 +182,7 @@
2971
2972 >>> browser.getControl('Save & Continue').click()
2973 >>> navigation = find_tags_by_class(browser.contents, 'results')[0].td
2974- >>> print extract_text(navigation)
2975+ >>> print(extract_text(navigation))
2976 11 ... 15 of 15 results ...
2977
2978
2979@@ -273,4 +274,3 @@
2980 >>> browser.getControl(
2981 ... name='field.alternative_language').displayValue
2982 ['(nothing selected)']
2983-
2984
2985=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-dismiss-suggestions.txt'
2986--- lib/lp/translations/stories/standalone/xx-pofile-translate-dismiss-suggestions.txt 2015-10-05 08:36:52 +0000
2987+++ lib/lp/translations/stories/standalone/xx-pofile-translate-dismiss-suggestions.txt 2018-06-03 00:41:33 +0000
2988@@ -25,10 +25,10 @@
2989 ... name='msgset_198_de_translation_0_radiobutton').value = [
2990 ... 'msgset_198_de_translation_0_new']
2991 >>> admin_browser.getControl('Save & Continue').click()
2992- >>> print admin_browser.url
2993+ >>> print(admin_browser.url)
2994 http://translations.../alsa-utils/trunk/+pots/alsa-utils/de/+translate
2995- >>> print extract_text(find_tag_by_id(admin_browser.contents,
2996- ... 'msgset_198_de_translation_0'))
2997+ >>> print(extract_text(find_tag_by_id(admin_browser.contents,
2998+ ... 'msgset_198_de_translation_0')))
2999 The great new translation.
3000
3001 Now somebody else comes and makes a really bad suggestion.
3002@@ -44,18 +44,18 @@
3003 >>> user_browser.getControl(
3004 ... name='msgset_198_de_needsreview').value = 'force_suggestion'
3005 >>> user_browser.getControl('Save & Continue').click()
3006- >>> print user_browser.url
3007+ >>> print(user_browser.url)
3008 http://translations.../alsa-utils/trunk/+pots/alsa-utils/de/+translate
3009
3010 But it's only a suggestion, so the translation remains unchanged.
3011
3012 >>> import re
3013- >>> print extract_text(find_tag_by_id(user_browser.contents,
3014- ... 'msgset_198_de_translation_0'))
3015+ >>> print(extract_text(find_tag_by_id(user_browser.contents,
3016+ ... 'msgset_198_de_translation_0')))
3017 The great new translation.
3018- >>> print extract_text(find_tag_by_id(
3019+ >>> print(extract_text(find_tag_by_id(
3020 ... user_browser.contents,
3021- ... re.compile(r'^msgset_198_de_suggestion_\d+_0$')))
3022+ ... re.compile(r'^msgset_198_de_suggestion_\d+_0$'))))
3023 The really bad suggestion.
3024
3025 In order to get rid of this, the admin chooses to keep the great new
3026@@ -66,19 +66,19 @@
3027 >>> admin_browser.getControl(name='msgset_198_dismiss').value = (
3028 ... 'dismiss_suggestions')
3029 >>> admin_browser.getControl('Save & Continue').click()
3030- >>> print admin_browser.url
3031+ >>> print(admin_browser.url)
3032 http://translations.../alsa-utils/trunk/+pots/alsa-utils/de/+translate
3033
3034 The great new translation is still intact.
3035
3036- >>> print extract_text(find_tag_by_id(admin_browser.contents,
3037- ... 'msgset_198_de_translation_0'))
3038+ >>> print(extract_text(find_tag_by_id(admin_browser.contents,
3039+ ... 'msgset_198_de_translation_0')))
3040 The great new translation.
3041
3042 But the really bad suggestion is gone.
3043
3044- >>> print find_tag_by_id(admin_browser.contents,
3045- ... 'msgset_198_de_suggestion_702_0')
3046+ >>> print(find_tag_by_id(admin_browser.contents,
3047+ ... 'msgset_198_de_suggestion_702_0'))
3048 None
3049
3050 == External suggestions ==
3051@@ -91,19 +91,18 @@
3052 >>> admin_browser.getControl(name='msgset_5_dismiss').value = (
3053 ... 'dismiss_suggestions')
3054 >>> admin_browser.getControl('Save & Continue').click()
3055- >>> print admin_browser.url
3056+ >>> print(admin_browser.url)
3057 http://translations.../evolution/trunk/+pots/evolution-2.2/es/6/+translate
3058
3059 There are still suggestions because they are external.
3060
3061 >>> admin_browser.open('http://translations.launchpad.dev/evolution/'
3062 ... 'trunk/+pots/evolution-2.2/es/5/+translate')
3063- >>> print extract_text(find_tag_by_id(admin_browser.contents,
3064- ... 'msgset_5_es_suggestion_686_0'))
3065+ >>> print(extract_text(find_tag_by_id(admin_browser.contents,
3066+ ... 'msgset_5_es_suggestion_686_0')))
3067 caratas
3068
3069 But the checkbox for dismissal is gone.
3070
3071- >>> print find_tag_by_id(admin_browser.contents, 'msgset_5_dismiss')
3072+ >>> print(find_tag_by_id(admin_browser.contents, 'msgset_5_dismiss'))
3073 None
3074-
3075
3076=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt'
3077--- lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt 2011-07-13 06:08:16 +0000
3078+++ lib/lp/translations/stories/standalone/xx-pofile-translate-empty-strings-without-validation.txt 2018-06-03 00:41:33 +0000
3079@@ -9,7 +9,7 @@
3080 translation should use it too. If the translation is empty, our validation
3081 system should not detect that as an error.
3082
3083- >>> print browser.contents
3084+ >>> print(browser.contents)
3085 <!DOCTYPE...
3086 ...Migrating `...%s...':...
3087
3088@@ -26,6 +26,5 @@
3089 We should be redirected to the next page because the validation didn't get
3090 it as an error.
3091
3092- >>> print browser.url
3093+ >>> print(browser.url)
3094 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?batch=1&memo=13&start=13
3095-
3096
3097=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt'
3098--- lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt 2009-07-01 20:45:39 +0000
3099+++ lib/lp/translations/stories/standalone/xx-pofile-translate-gettext-error-middle-page.txt 2018-06-03 00:41:33 +0000
3100@@ -15,7 +15,7 @@
3101 ... name='msgset_142_es_translation_0_radiobutton').value = [
3102 ... 'msgset_142_es_translation_0_new']
3103 >>> browser.getControl(name='msgset_142_es_translation_0_new').value = (
3104- ... 'Migrando \xc2\xab%i\xc2\xbb')
3105+ ... b'Migrando \xc2\xab%i\xc2\xbb')
3106
3107 We are going to add a valid translation too so we are sure that it's stored
3108 even when there is an error in another message of the same form.
3109@@ -31,19 +31,19 @@
3110
3111 We remain at the same page:
3112
3113- >>> print browser.url
3114+ >>> print(browser.url)
3115 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=10&batch=5
3116
3117 The valid translation is stored:
3118
3119- >>> print find_tag_by_id(
3120- ... browser.contents, 'msgset_140_es_translation_0').renderContents()
3121+ >>> print(find_tag_by_id(
3122+ ... browser.contents, 'msgset_140_es_translation_0').renderContents())
3123 Foo
3124
3125 And the error is noted in the page.
3126
3127 >>> for tag in find_tags_by_class(browser.contents, 'error'):
3128- ... print tag
3129+ ... print(tag)
3130 <div class="error message">There is an error in a translation you provided.
3131 Please correct it before continuing.</div>
3132 <tr class="error translation">
3133
3134=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt'
3135--- lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt 2011-07-13 06:08:16 +0000
3136+++ lib/lp/translations/stories/standalone/xx-pofile-translate-html-tags-escape.txt 2018-06-03 00:41:33 +0000
3137@@ -19,7 +19,7 @@
3138
3139 We are in next form page.
3140
3141- >>> print user_browser.url
3142+ >>> print(user_browser.url)
3143 http://translations.launchpad.dev/ubuntu/hoary/+source/pmount/+pots/pmount/hr/+translate?memo=10&start=10
3144
3145 Let's go back to the modified message.
3146@@ -30,6 +30,6 @@
3147
3148 >>> text = find_tag_by_id(
3149 ... user_browser.contents, 'msgset_67_hr_translation_0')
3150- >>> print extract_text(text.renderContents())
3151+ >>> print(extract_text(text.renderContents()))
3152 Upotreba:
3153 %s [opcije] &lt;foo&gt; [&lt;etiketa&gt;]%s%s%s
3154
3155=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt'
3156--- lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt 2017-12-24 15:45:26 +0000
3157+++ lib/lp/translations/stories/standalone/xx-pofile-translate-lang-direction.txt 2018-06-03 00:41:33 +0000
3158@@ -46,7 +46,8 @@
3159 But suggestion text is tagged with its language code and its own text
3160 direction:
3161
3162- >>> print find_tag_by_id(browser.contents, 'msgset_130_es_suggestion_562_0')
3163+ >>> print(find_tag_by_id(
3164+ ... browser.contents, 'msgset_130_es_suggestion_562_0'))
3165 <label style="white-space: normal" dir="ltr"
3166 for="msgset_130_es_suggestion_562_0_radiobutton"
3167 id="msgset_130_es_suggestion_562_0" lang="es">libreta de
3168
3169=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt'
3170--- lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt 2010-10-26 10:31:37 +0000
3171+++ lib/lp/translations/stories/standalone/xx-pofile-translate-legal-warning.txt 2018-06-03 00:41:33 +0000
3172@@ -20,8 +20,8 @@
3173
3174 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
3175 >>> browser.open('http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/3/+translate')
3176- >>> print extract_text(find_tag_by_id(
3177- ... browser.contents, 'msgset_132_es_suggestion_3_0'))
3178+ >>> print(extract_text(find_tag_by_id(
3179+ ... browser.contents, 'msgset_132_es_suggestion_3_0')))
3180 tiene
3181
3182 A warning icon about the legal situation is shown alongside the suggestion
3183
3184=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt'
3185--- lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2017-12-24 15:45:26 +0000
3186+++ lib/lp/translations/stories/standalone/xx-pofile-translate-message-filtering.txt 2018-06-03 00:41:33 +0000
3187@@ -34,8 +34,8 @@
3188 ... # Print matching HTML tags, in numeric order of msgset id
3189 ... for msgset_id in sorted(translations.keys()):
3190 ... translation = translations[msgset_id]
3191- ... print "%d: '%s'" % (
3192- ... msgset_id, translation.renderContents().strip())
3193+ ... print("%d: '%s'" % (
3194+ ... msgset_id, translation.renderContents().strip()))
3195
3196
3197 Filters
3198@@ -47,7 +47,7 @@
3199 >>> user_browser.open(
3200 ... 'http://translations.launchpad.dev/ubuntu/hoary/'
3201 ... '+source/evolution/+pots/evolution-2.2/es/+translate')
3202- >>> print user_browser.title
3203+ >>> print(user_browser.title)
3204 Spanish (es) : Template ...evolution-2.2... :
3205 Hoary (5.04) : Translations : evolution package : Ubuntu
3206
3207@@ -61,7 +61,7 @@
3208 this page, and which alternate language to get suggestions from (tested
3209 in xx-pofile-translate-alternative-language.txt).
3210
3211- >>> print contents
3212+ >>> print(contents)
3213 <... Translating ... using ... as a guide...
3214
3215
3216@@ -77,10 +77,10 @@
3217 >>> re.match('[^?]*', user_browser.url).group()
3218 'http://.../evolution-2.2/es/+translate'
3219
3220- >>> print extract_url_parameter(user_browser.url, 'batch')
3221+ >>> print(extract_url_parameter(user_browser.url, 'batch'))
3222 batch=10
3223
3224- >>> print extract_url_parameter(user_browser.url, 'show')
3225+ >>> print(extract_url_parameter(user_browser.url, 'show'))
3226 show=untranslated
3227
3228 >>> contents = find_main_content(user_browser.contents)
3229@@ -124,7 +124,7 @@
3230 ... '+source/evolution/+pots/evolution-2.2/en_AU/+translate')
3231 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
3232 >>> user_browser.getControl('Change').click()
3233- >>> print user_browser.title
3234+ >>> print(user_browser.title)
3235 English (Australia) (en_AU) : Template ...evolution-2.2... :
3236 Hoary (5.04) : Translations : evolution package : Ubuntu
3237
3238@@ -156,8 +156,8 @@
3239 >>> print_batch_header(contents)
3240 1 ... 10 of 21 results
3241
3242- >>> print find_tag_by_id(
3243- ... user_browser.contents, 'msgset_130_en_AU_translation_0')
3244+ >>> print(find_tag_by_id(
3245+ ... user_browser.contents, 'msgset_130_en_AU_translation_0'))
3246 None
3247
3248 Projects can restrict translation to privileged users. The messages that
3249@@ -192,7 +192,7 @@
3250 ... 'evolution/trunk/+pots/evolution-2.2/en_AU/+translate')
3251 >>> user_browser.getControl(name='show', index=1).value = ['untranslated']
3252 >>> user_browser.getControl('Change').click()
3253- >>> print user_browser.title
3254+ >>> print(user_browser.title)
3255 English (Australia) (en_AU) : Template ...evolution-2.2... :
3256 Series trunk : Translations : Evolution
3257
3258@@ -235,10 +235,10 @@
3259 >>> user_browser.getControl(name='show', index=1).displayValue = [
3260 ... 'changed in Ubuntu']
3261 >>> user_browser.getControl('Change').click()
3262- >>> print extract_url_parameter(user_browser.url, 'batch')
3263+ >>> print(extract_url_parameter(user_browser.url, 'batch'))
3264 batch=10
3265
3266- >>> print extract_url_parameter(user_browser.url, 'show')
3267+ >>> print(extract_url_parameter(user_browser.url, 'show'))
3268 show=changed_in_ubuntu
3269
3270 >>> contents = find_main_content(user_browser.contents)
3271@@ -253,10 +253,10 @@
3272 the browser is redirected to the first batch.
3273
3274 >>> user_browser.getControl('Save & Continue').click()
3275- >>> print extract_url_parameter(user_browser.url, 'batch')
3276+ >>> print(extract_url_parameter(user_browser.url, 'batch'))
3277 batch=10
3278
3279- >>> print extract_url_parameter(user_browser.url, 'show')
3280+ >>> print(extract_url_parameter(user_browser.url, 'show'))
3281 show=changed_in_ubuntu
3282
3283 >>> print_shown_messages(user_browser)
3284@@ -276,10 +276,10 @@
3285 >>> user_browser.getControl(name='show', index=1).displayValue = [
3286 ... 'with new suggestions']
3287 >>> user_browser.getControl('Change').click()
3288- >>> print extract_url_parameter(user_browser.url, 'batch')
3289+ >>> print(extract_url_parameter(user_browser.url, 'batch'))
3290 batch=10
3291
3292- >>> print extract_url_parameter(user_browser.url, 'show')
3293+ >>> print(extract_url_parameter(user_browser.url, 'show'))
3294 show=new_suggestions
3295
3296 >>> print_shown_messages(user_browser)
3297@@ -300,7 +300,7 @@
3298
3299 >>> description = first_tag_by_class(user_browser.contents,
3300 ... 'documentDescription')
3301- >>> print extract_text(description)
3302+ >>> print(extract_text(description))
3303 There are no messages that match this filtering.
3304
3305
3306@@ -358,8 +358,8 @@
3307 conversion specifications the original message has, and is shown an
3308 error.
3309
3310- >>> print find_tag_by_id(
3311- ... user_browser.contents, 'msgset_142_singular').renderContents()
3312+ >>> print(find_tag_by_id(
3313+ ... user_browser.contents, 'msgset_142_singular').renderContents())
3314 Migrating ...%s...
3315
3316 >>> user_browser.getControl(
3317@@ -391,7 +391,7 @@
3318 142: '(no translation yet)'
3319
3320 >>> for tag in find_tags_by_class(user_browser.contents, 'error'):
3321- ... print tag.renderContents()
3322+ ... print(tag.renderContents())
3323 There is an error in a translation you provided.
3324 Please correct it before continuing.
3325 ...Error in Translation:...
3326@@ -428,7 +428,7 @@
3327 >>> user_browser.getLink("Previous").click()
3328
3329 >>> text = extract_text(find_main_content(user_browser.contents))
3330- >>> print text.encode('UTF-8')
3331+ >>> print(text.encode('UTF-8'))
3332 Translating...
3333 English: current addressbook folder
3334 Current Chinese (China): (no translation yet)
3335
3336=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt'
3337--- lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt 2015-10-05 08:36:52 +0000
3338+++ lib/lp/translations/stories/standalone/xx-pofile-translate-needs-review-flags-preserved.txt 2018-06-03 00:41:33 +0000
3339@@ -18,7 +18,7 @@
3340 ... 'Someone should review this translation')
3341 Traceback (most recent call last):
3342 ...
3343- LookupError: label 'Someone...
3344+ LookupError: label u'Someone...
3345
3346 If the same user tries translating for another, unrestricted project,
3347 they get to see the checkbox:
3348@@ -41,7 +41,7 @@
3349 >>> user_browser.getControl(
3350 ... name='msgset_130_es_translation_0_new').value = "New suggestion"
3351 >>> user_browser.getControl('Save & Continue').click()
3352- >>> print user_browser.url
3353+ >>> print(user_browser.url)
3354 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/2/+translate
3355
3356 The needs review flag is unset when we go back to the previous message.
3357@@ -55,9 +55,9 @@
3358 But a new suggestion is provided for this message.
3359
3360 >>> import re
3361- >>> print extract_text(find_tag_by_id(
3362+ >>> print(extract_text(find_tag_by_id(
3363 ... user_browser.contents,
3364- ... re.compile(r'^msgset_130_es_suggestion_\d+_0$')))
3365+ ... re.compile(r'^msgset_130_es_suggestion_\d+_0$'))))
3366 New suggestion
3367
3368
3369@@ -82,8 +82,8 @@
3370 ... name='msgset_166_es_translation_0_new')
3371 >>> inputfield.value = 'New test translation'
3372 >>> admin_browser.getControl('Save & Continue').click()
3373- >>> print extract_text(find_tag_by_id(admin_browser.contents,
3374- ... 'messages_to_translate'))
3375+ >>> print(extract_text(find_tag_by_id(admin_browser.contents,
3376+ ... 'messages_to_translate')))
3377 1. English: test man page
3378 Current Spanish: New test translation Translated and reviewed ...
3379 New translation:
3380@@ -101,8 +101,8 @@
3381 ... name='msgset_166_es_translation_0_radiobutton')
3382 >>> inputradio.value = ['msgset_166_es_translation_0_new']
3383 >>> admin_browser.getControl('Save & Continue').click()
3384- >>> print extract_text(find_tag_by_id(admin_browser.contents,
3385- ... 'messages_to_translate'))
3386+ >>> print(extract_text(find_tag_by_id(admin_browser.contents,
3387+ ... 'messages_to_translate')))
3388 1. English: test man page
3389 Current Spanish: (no translation yet)
3390 Suggestions:
3391
3392=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt'
3393--- lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt 2012-12-11 02:19:13 +0000
3394+++ lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt 2018-06-03 00:41:33 +0000
3395@@ -12,7 +12,7 @@
3396 ... """Find and print [tags] in browser.contents. End each with '--'."""
3397 ... soup = find_main_content(browser.contents)
3398 ... for tag in soup.findAll(attrs={'id': tags}):
3399- ... print "%s\n--\n" % tag.renderContents()
3400+ ... print("%s\n--\n" % tag.renderContents(encoding=None))
3401
3402 >>> browser = setupBrowser(auth='Basic carlos@canonical.com:test')
3403 >>> browser.open(
3404@@ -40,9 +40,10 @@
3405 >>> browser.getControl(
3406 ... name='msgset_149_es_translation_0_new').value = '\r\nfoo\r\n\r\n'
3407 >>> browser.getControl(name='submit_translations').click()
3408- >>> print browser.url
3409+ >>> print(browser.url)
3410 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1
3411- >>> print find_tag_by_id(browser.contents, 'msgset_149_es_translation_0_new')
3412+ >>> print(find_tag_by_id(
3413+ ... browser.contents, 'msgset_149_es_translation_0_new'))
3414 <textarea ... name="msgset_149_es_translation_0_new"...>
3415
3416 foo
3417@@ -58,11 +59,11 @@
3418 ... 'msgset_149_es_translation_0_new']
3419 >>> browser.getControl(name='msgset_149_es_translation_0_new').value = 'foo'
3420 >>> browser.getControl(name='submit_translations').click()
3421- >>> print browser.url
3422+ >>> print(browser.url)
3423 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1
3424- >>> print find_tag_by_id(
3425+ >>> print(find_tag_by_id(
3426 ... browser.contents,
3427- ... 'msgset_149_es_translation_0_new') #doctest: -NORMALIZE_WHITESPACE
3428+ ... 'msgset_149_es_translation_0_new')) #doctest: -NORMALIZE_WHITESPACE
3429 <textarea ... name="msgset_149_es_translation_0_new"...>
3430 foo</textarea>
3431
3432@@ -76,12 +77,12 @@
3433 ... name='msgset_165_es_translation_0_radiobutton').value = [
3434 ... 'msgset_165_es_translation_0_new']
3435 >>> browser.getControl(name='msgset_165_es_translation_0_new').value = (
3436- ... '%s: la opcion \xc2\xab%s\xc2\xbb es ambigua')
3437+ ... b'%s: la opcion \xc2\xab%s\xc2\xbb es ambigua')
3438 >>> browser.getControl(name='submit_translations').click()
3439
3440 We were redirected to the next form, the translation was accepted.
3441
3442- >>> print browser.url
3443+ >>> print(browser.url)
3444 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate?batch=1
3445
3446 Get previous page to check that the save translation is the right one.
3447@@ -106,12 +107,12 @@
3448 ... name='msgset_165_es_translation_0_radiobutton').value = [
3449 ... 'msgset_165_es_translation_0_new']
3450 >>> browser.getControl(name='msgset_165_es_translation_0_new').value = (
3451- ... '%s: la opcion \xc2\xab%s\xc2\xbb es ambigua\r\n')
3452+ ... b'%s: la opcion \xc2\xab%s\xc2\xbb es ambigua\r\n')
3453 >>> browser.getControl(name='submit_translations').click()
3454
3455 We were redirected to the next form, the translation was accepted.
3456
3457- >>> print browser.url
3458+ >>> print(browser.url)
3459 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate?batch=1
3460
3461 Get previous page to check that the save translation is the right one.
3462@@ -136,12 +137,12 @@
3463 ... name='msgset_165_es_translation_0_radiobutton').value = [
3464 ... 'msgset_165_es_translation_0_new']
3465 >>> browser.getControl(name='msgset_165_es_translation_0_new').value = (
3466- ... '%s: la opcion \xc2\xab%s\xc2\xbb es ambigua\r\n\r\n')
3467+ ... b'%s: la opcion \xc2\xab%s\xc2\xbb es ambigua\r\n\r\n')
3468 >>> browser.getControl(name='submit_translations').click()
3469
3470 We were redirected to the next form, the translation was accepted.
3471
3472- >>> print browser.url
3473+ >>> print(browser.url)
3474 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2/es/+translate?batch=1
3475
3476 Get previous page to check that the save translation is the right one.
3477
3478=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt'
3479--- lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt 2015-09-29 01:38:34 +0000
3480+++ lib/lp/translations/stories/standalone/xx-pofile-translate-performance.txt 2018-06-03 00:41:33 +0000
3481@@ -20,7 +20,7 @@
3482 ... '+pots/evolution-2.2/es/+translate')
3483 >>> anon_browser.url
3484 'http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate'
3485- >>> print anon_browser.contents
3486+ >>> print(anon_browser.contents)
3487 <...
3488 >>> statement_count = query_counter.count
3489 >>> 0 < statement_count < 120
3490@@ -47,4 +47,3 @@
3491
3492 >>> # Cleanup.
3493 >>> query_counter.unregister()
3494-
3495
3496=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-private-issues.txt'
3497--- lib/lp/translations/stories/standalone/xx-pofile-translate-private-issues.txt 2009-07-01 20:45:39 +0000
3498+++ lib/lp/translations/stories/standalone/xx-pofile-translate-private-issues.txt 2018-06-03 00:41:33 +0000
3499@@ -10,12 +10,12 @@
3500 The GNOME standard string for credits is well handled.
3501
3502 >>> msgid = find_tag_by_id(browser.contents, 'msgset_199_singular')
3503- >>> print msgid.renderContents()
3504+ >>> print(msgid.renderContents())
3505 translation-credits
3506
3507 >>> translation = find_tag_by_id(
3508 ... browser.contents, 'msgset_199_es_translation_0')
3509- >>> print translation.renderContents()
3510+ >>> print(translation.renderContents())
3511 To prevent privacy issues, this translation is not available to anonymous
3512 users,<br /> if you want to see it, please, <a href="+login">log in</a>
3513 first.
3514@@ -23,13 +23,13 @@
3515 And the same for KDE one.
3516
3517 >>> msgid = find_tag_by_id(browser.contents, 'msgset_200_singular')
3518- >>> print msgid.renderContents()
3519+ >>> print(msgid.renderContents())
3520 _: EMAIL OF TRANSLATORS<img alt="" src="/@@/translation-newline" /><br />
3521 Your emails
3522
3523 >>> translation = find_tag_by_id(
3524 ... browser.contents, 'msgset_200_es_translation_0')
3525- >>> print translation.renderContents()
3526+ >>> print(translation.renderContents())
3527 To prevent privacy issues, this translation is not available to anonymous
3528 users,<br /> if you want to see it, please, <a href="+login">log in</a>
3529 first.
3530@@ -50,30 +50,30 @@
3531 The GNOME standard string for credits is now available:
3532
3533 >>> msgid = find_tag_by_id(user_browser.contents, 'msgset_199_singular')
3534- >>> print msgid.renderContents()
3535+ >>> print(msgid.renderContents())
3536 translation-credits
3537
3538 >>> translation = find_tag_by_id(
3539 ... user_browser.contents, 'msgset_199_es_translation_0')
3540- >>> print extract_text(translation.renderContents())
3541+ >>> print(extract_text(translation.renderContents()))
3542 Launchpad Contributions:
3543 Carlos ... http://translations.launchpad.dev/~carlos
3544
3545 And the same for KDE one.
3546
3547 >>> msgid = find_tag_by_id(user_browser.contents, 'msgset_200_singular')
3548- >>> print msgid.renderContents()
3549+ >>> print(msgid.renderContents())
3550 _: EMAIL OF TRANSLATORS<img alt="" src="/@@/translation-newline" /><br />
3551 Your emails
3552
3553 >>> translation = find_tag_by_id(
3554 ... user_browser.contents, 'msgset_200_es_translation_0')
3555- >>> print translation.renderContents()
3556+ >>> print(translation.renderContents())
3557 ,,carlos@canonical.com
3558
3559 Also, suggestions should not appear.
3560
3561 >>> suggestion = find_tag_by_id(
3562 ... user_browser.contents, 'msgset_199_es_suggestion_709_0')
3563- >>> print suggestion
3564+ >>> print(suggestion)
3565 None
3566
3567=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt'
3568--- lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt 2009-07-01 20:45:39 +0000
3569+++ lib/lp/translations/stories/standalone/xx-pofile-translate-search.txt 2018-06-03 00:41:33 +0000
3570@@ -30,7 +30,7 @@
3571 A warning is displayed.
3572
3573 >>> tags = find_tags_by_class(user_browser.contents, 'warning message')
3574- >>> print extract_text(tags[0])
3575+ >>> print(extract_text(tags[0]))
3576 Please try searching for a longer string.
3577
3578 And no filtering is applied: all messages are shown.
3579
3580=== modified file 'lib/lp/translations/stories/standalone/xx-pofile-translate.txt'
3581--- lib/lp/translations/stories/standalone/xx-pofile-translate.txt 2016-01-26 15:47:37 +0000
3582+++ lib/lp/translations/stories/standalone/xx-pofile-translate.txt 2018-06-03 00:41:33 +0000
3583@@ -39,12 +39,12 @@
3584 >>> main_content = find_tag_by_id(
3585 ... browser.contents, 'messages_to_translate')
3586 >>> for textarea in main_content.findAll('textarea'):
3587- ... print 'Found textarea:\n%s' % textarea
3588+ ... print('Found textarea:\n%s' % textarea)
3589
3590 In fact, no input widgets at all are displayed.
3591
3592 >>> for input in main_content.findAll('input'):
3593- ... print 'Found input:\n%s' % input
3594+ ... print('Found input:\n%s' % input)
3595
3596 As an anynoymous user you will have access to the download and details
3597 pages for the pofile this message belongs to. The link to upload page
3598@@ -52,15 +52,15 @@
3599 translator and reviewer working mode.
3600
3601 >>> nav = find_tag_by_id(browser.contents, 'nav-pofile-subpages')
3602- >>> print extract_text(nav)
3603+ >>> print(extract_text(nav))
3604 Download translation Translation details
3605
3606 Download translations and Translation details should linked to the proper
3607 pages
3608
3609- >> print nav.getLink("Download translation").url
3610+ >> print(nav.getLink("Download translation").url)
3611 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+export
3612- >> print nav.getLink("Translation details").url
3613+ >> print(nav.getLink("Translation details").url)
3614 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+details
3615
3616 Rendering the form in read-only mode does not actually stop an anonymous
3617@@ -84,17 +84,17 @@
3618 working mode
3619
3620 >>> nav = find_tag_by_id(admin_browser.contents, 'nav-pofile-subpages')
3621- >>> print extract_text(nav)
3622+ >>> print(extract_text(nav))
3623 Download translation Upload translation Translation details
3624 Reviewer mode (What's this?)
3625
3626 All those links should linked the proper pages
3627
3628- >> print nav.getLink("Download translation").url
3629+ >> print(nav.getLink("Download translation").url)
3630 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+export
3631- >> print nav.getLink("Upload translation").url
3632+ >> print(nav.getLink("Upload translation").url)
3633 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+upload
3634- >> print nav.getLink("Translation details").url
3635+ >> print(nav.getLink("Translation details").url)
3636 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+details
3637
3638
3639@@ -154,7 +154,7 @@
3640
3641 >>> msgset_130 = get_tags(browser, 'id', 'msgset_130')
3642 >>> for id in msgset_130:
3643- ... print id
3644+ ... print(id)
3645 msgset_130
3646 ...
3647 msgset_130_singular...
3648@@ -170,7 +170,7 @@
3649 * optional suffix describing the element, such as 'radiobutton.'
3650
3651 >>> for id in msgset_130:
3652- ... print id
3653+ ... print(id)
3654 msgset_130
3655 msgset_130_en_AU_translation_0
3656 msgset_130_en_AU_translation_0_new
3657@@ -196,7 +196,7 @@
3658 ... '+pots/alsa-utils/es/+translate')
3659 >>> msgset_198 = get_tags(browser, 'name', 'msgset_198')
3660 >>> for name in msgset_198:
3661- ... print name
3662+ ... print(name)
3663 msgset_198
3664 msgset_198_es_needsreview
3665 msgset_198_es_translation_0_new
3666@@ -212,8 +212,8 @@
3667 >>> browser.open(
3668 ... 'http://translations.launchpad.dev/ubuntu/hoary/+source/'
3669 ... 'evolution/+pots/evolution-2.2/es/5/+translate')
3670- >>> print extract_text(find_tag_by_id(
3671- ... browser.contents, 'msgset_134_es_suggestion_694_0'))
3672+ >>> print(extract_text(find_tag_by_id(
3673+ ... browser.contents, 'msgset_134_es_suggestion_694_0')))
3674 tarjetas
3675
3676
3677@@ -236,4 +236,3 @@
3678 ... '+source/evolution/+pots/evolution-2.2/ab/5/+translate')
3679 >>> print_feedback_messages(browser.contents)
3680 Launchpad can&#8217;t handle the plural items ...
3681-
3682
3683=== modified file 'lib/lp/translations/stories/standalone/xx-potemplate-admin.txt'
3684--- lib/lp/translations/stories/standalone/xx-potemplate-admin.txt 2016-06-21 17:01:35 +0000
3685+++ lib/lp/translations/stories/standalone/xx-potemplate-admin.txt 2018-06-03 00:41:33 +0000
3686@@ -23,7 +23,7 @@
3687 >>> browser.open(
3688 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
3689 ... 'evolution-2.2/+admin')
3690- >>> print browser.url
3691+ >>> print(browser.url)
3692 http://translations...dev/evolution/trunk/+pots/evolution-2.2/+admin
3693
3694 Now, we should be sure that the admin form gets all required fields to allow
3695@@ -35,7 +35,7 @@
3696 'evolution-2.2'
3697 >>> browser.getControl(name='field.description').value
3698 'Template for evolution in hoary'
3699- >>> print browser.getControl(name='field.header').value
3700+ >>> print(browser.getControl(name='field.header').value)
3701 Project-Id-Version: PACKAGE VERSION
3702 Report-Msgid-Bugs-To:
3703 POT-Creation-Date: 2005-08-25 14:56+0200
3704@@ -69,7 +69,7 @@
3705 >>> admin_browser.open(
3706 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
3707 ... 'evolution-2.2/+admin')
3708- >>> print admin_browser.url
3709+ >>> print(admin_browser.url)
3710 http://translations...dev/evolution/trunk/+pots/evolution-2.2/+admin
3711
3712 Now, we should be sure that the admin form gets all required fields to allow
3713@@ -81,7 +81,7 @@
3714 'evolution-2.2'
3715 >>> admin_browser.getControl(name='field.description').value
3716 'Template for evolution in hoary'
3717- >>> print admin_browser.getControl(name='field.header').value
3718+ >>> print(admin_browser.getControl(name='field.header').value)
3719 Project-Id-Version: PACKAGE VERSION
3720 Report-Msgid-Bugs-To:
3721 POT-Creation-Date: 2005-08-25 14:56+0200
3722@@ -119,7 +119,7 @@
3723
3724 >>> admin_browser.getControl('Translation domain').value = 'foo'
3725 >>> admin_browser.getControl('Change').click()
3726- >>> print admin_browser.url
3727+ >>> print(admin_browser.url)
3728 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2
3729
3730 Going back to the form we can see that the changes are saved and also,
3731@@ -156,7 +156,7 @@
3732 >>> admin_browser.getControl(name='field.name').value = (
3733 ... 'evolution-renamed')
3734 >>> admin_browser.getControl('Change').click()
3735- >>> print admin_browser.url
3736+ >>> print(admin_browser.url)
3737 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-renamed
3738
3739 Administrators can disable and then make changes to a disabled template.
3740@@ -166,7 +166,7 @@
3741 ... 'evolution-renamed/+admin')
3742 >>> admin_browser.getControl(name='field.iscurrent').value = False
3743 >>> admin_browser.getControl('Change').click()
3744- >>> print admin_browser.url
3745+ >>> print(admin_browser.url)
3746 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-renamed
3747
3748 Now we will reenable the template.
3749@@ -176,7 +176,7 @@
3750 ... 'evolution-renamed/+admin')
3751 >>> admin_browser.getControl(name='field.iscurrent').value = True
3752 >>> admin_browser.getControl('Change').click()
3753- >>> print admin_browser.url
3754+ >>> print(admin_browser.url)
3755 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-renamed
3756
3757
3758@@ -220,7 +220,7 @@
3759 >>> distro_owner_browser.getControl(name='field.path').value = 'bar.pot'
3760 >>> distro_owner_browser.getControl('Change').click()
3761
3762- >>> print template.path
3763+ >>> print(template.path)
3764 bar.pot
3765
3766 This privilege also extends to items that require "edit" permissions.
3767@@ -238,7 +238,7 @@
3768 >>> group_owner_browser.getControl(name='field.priority').value = '543'
3769 >>> group_owner_browser.getControl('Change').click()
3770
3771- >>> print template.path
3772+ >>> print(template.path)
3773 splat.pot
3774
3775 Distribution translation coordinators can disable and manage disabled
3776
3777=== modified file 'lib/lp/translations/stories/standalone/xx-potemplate-edit.txt'
3778--- lib/lp/translations/stories/standalone/xx-potemplate-edit.txt 2016-06-09 20:13:17 +0000
3779+++ lib/lp/translations/stories/standalone/xx-potemplate-edit.txt 2018-06-03 00:41:33 +0000
3780@@ -33,7 +33,7 @@
3781 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
3782 ... 'evolution-2.2/')
3783 >>> browser.getLink('Change details').click()
3784- >>> print browser.url
3785+ >>> print(browser.url)
3786 http://translations.../evolution/trunk/+pots/evolution-2.2/+edit
3787
3788 The owner of a product has access to edit page for PO templates.
3789@@ -42,7 +42,7 @@
3790 >>> browser.open(
3791 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
3792 ... 'evolution-2.2/+edit')
3793- >>> print browser.url
3794+ >>> print(browser.url)
3795 http://translations.../evolution/trunk/+pots/evolution-2.2/+edit
3796
3797 Owner will not see admin fields, only those fields designated for the
3798@@ -121,7 +121,7 @@
3799 >>> browser.getControl(name='field.owner').value = u'name12'
3800 >>> browser.getControl(name='field.description').value = u'foo'
3801 >>> browser.getControl('Change').click()
3802- >>> print browser.url
3803+ >>> print(browser.url)
3804 http://translations.launchpad.dev/evolution/trunk/+pots/evo
3805
3806 The changed values will be stored and visible by accesing again the edit
3807@@ -172,7 +172,7 @@
3808 ... 'evolution-2.2/+edit')
3809 >>> admin_browser.getControl(name='field.priority').value = '-1'
3810 >>> admin_browser.getControl('Change').click()
3811- >>> print admin_browser.url
3812+ >>> print(admin_browser.url)
3813 http://translations.../evolution/trunk/+pots/evolution-2.2/+edit
3814
3815 >>> print_feedback_messages(admin_browser.contents)
3816@@ -184,7 +184,7 @@
3817 ... 'evolution-2.2/+edit')
3818 >>> admin_browser.getControl(name='field.priority').value = '100001'
3819 >>> admin_browser.getControl('Change').click()
3820- >>> print admin_browser.url
3821+ >>> print(admin_browser.url)
3822 http://translations.../evolution/trunk/+pots/evolution-2.2/+edit
3823
3824 >>> print_feedback_messages(admin_browser.contents)
3825@@ -216,7 +216,5 @@
3826 ... 'http://translations.launchpad.dev/evolution/trunk/+pots/'
3827 ... 'evolution-2.2/+edit')
3828 >>> admin_browser.getLink('Cancel').click()
3829- >>> print admin_browser.url
3830+ >>> print(admin_browser.url)
3831 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2
3832-
3833-
3834
3835=== modified file 'lib/lp/translations/stories/standalone/xx-potemplate-export.txt'
3836--- lib/lp/translations/stories/standalone/xx-potemplate-export.txt 2013-09-27 04:13:23 +0000
3837+++ lib/lp/translations/stories/standalone/xx-potemplate-export.txt 2018-06-03 00:41:33 +0000
3838@@ -47,7 +47,7 @@
3839 >>> browser.getControl('Everything').selected = True
3840 >>> browser.getControl('Format:').value = ['PO']
3841 >>> browser.getControl('Request Download').click()
3842- >>> print browser.url
3843+ >>> print(browser.url)
3844 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2
3845
3846 >>> print_feedback_messages(browser.contents)
3847@@ -62,9 +62,8 @@
3848 >>> browser.getControl('The PO template').selected = True
3849 >>> browser.getControl('Format:').value = ['PO']
3850 >>> browser.getControl('Request Download').click()
3851- >>> print browser.url
3852+ >>> print(browser.url)
3853 http://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2
3854
3855 >>> print_feedback_messages(browser.contents)
3856 Your request has been received. Expect to receive an email shortly.
3857-
3858
3859=== modified file 'lib/lp/translations/stories/standalone/xx-potemplate-index.txt'
3860--- lib/lp/translations/stories/standalone/xx-potemplate-index.txt 2014-11-27 22:13:36 +0000
3861+++ lib/lp/translations/stories/standalone/xx-potemplate-index.txt 2018-06-03 00:41:33 +0000
3862@@ -11,7 +11,7 @@
3863
3864 >>> anon_browser.open("http://translations.launchpad.dev/"
3865 ... "ubuntu/hoary/+source/evolution/+pots/evolution-2.2/")
3866- >>> print anon_browser.title
3867+ >>> print(anon_browser.title)
3868 Template ...evolution-2.2... : Hoary (5.04) :
3869 Translations : evolution package : Ubuntu
3870
3871@@ -19,7 +19,7 @@
3872
3873 >>> owner_display = find_tag_by_id(anon_browser.contents,
3874 ... 'potemplate-owner')
3875- >>> print extract_text(owner_display)
3876+ >>> print(extract_text(owner_display))
3877 Owner: Rosetta Administrators
3878
3879 The page lists the status of all the translations. It merges the
3880@@ -30,12 +30,12 @@
3881 that represents, when the translation was updated, and by whom.
3882
3883 >>> content = find_main_content(anon_browser.contents)
3884- >>> print extract_text(content.findAll('h1')[0])
3885+ >>> print(extract_text(content.findAll('h1')[0]))
3886 Translation status
3887
3888 >>> table = content.findAll('table')[0]
3889 >>> for row in table.findAll('tr'):
3890- ... print extract_text(row).encode('us-ascii', 'backslashreplace')
3891+ ... print(extract_text(row).encode('us-ascii', 'backslashreplace'))
3892 Language Status Untranslated Need review Changed Last Edited By
3893 Afrikaans 22 ... ... &mdash; &mdash;
3894 Japanese 21 ... ... ... Carlos...
3895@@ -54,7 +54,7 @@
3896 ... '+source/mozilla/+pots/pkgconf-mozilla')
3897 >>> table = find_tag_by_id(anon_browser.contents, 'language-chart')
3898 >>> for row in table.findAll('tr')[0:6]:
3899- ... print extract_text(row).encode('us-ascii', 'backslashreplace')
3900+ ... print(extract_text(row).encode('us-ascii', 'backslashreplace'))
3901 Language Status Untranslated Need review Changed Last Edited By
3902 Afrikaans 9 ... ... ... &mdash;
3903 Czech ... ... ... ... Miroslav Kure
3904@@ -73,12 +73,12 @@
3905 ... '/trunk/+pots/evolution-2.2')
3906 >>> sharing_info = find_tag_by_id(
3907 ... anon_browser.contents, 'sharing-information')
3908- >>> print extract_text(sharing_info)
3909+ >>> print(extract_text(sharing_info))
3910 Sharing Information
3911 This template is sharing translations with
3912 evolution in Ubuntu Hoary template evolution-2.2.
3913 View sharing details
3914- >>> print sharing_info
3915+ >>> print(sharing_info)
3916 <div...<a href="/ubuntu/hoary/+source/evolution/+pots/evolution-2.2"...
3917
3918 Likewise, the Ubuntu template gives information about how it is sharing
3919@@ -88,12 +88,12 @@
3920 ... '/hoary/+source/evolution/+pots/evolution-2.2')
3921 >>> sharing_info = find_tag_by_id(
3922 ... anon_browser.contents, 'sharing-information')
3923- >>> print extract_text(sharing_info)
3924+ >>> print(extract_text(sharing_info))
3925 Sharing Information
3926 This template is sharing translations with
3927 Evolution trunk series template evolution-2.2.
3928 View sharing details
3929- >>> print sharing_info
3930+ >>> print(sharing_info)
3931 <div...<a href="/evolution/trunk/+pots/evolution-2.2"...
3932
3933 If the user has the right permissions, they are offered to edit the sharing
3934@@ -103,9 +103,9 @@
3935 ... '/trunk/+pots/evolution-2.2')
3936 >>> sharing_details = find_tag_by_id(
3937 ... admin_browser.contents, 'sharing-details')
3938- >>> print extract_text(sharing_details)
3939+ >>> print(extract_text(sharing_details))
3940 Edit sharing details
3941- >>> print sharing_details['href']
3942+ >>> print(sharing_details['href'])
3943 http://.../ubuntu/hoary/+source/evolution/+sharing-details
3944
3945
3946@@ -120,12 +120,12 @@
3947 ... "evolution/trunk/+pots/evolution-2.2-test")
3948 >>> alternate_notice = find_tag_by_id(anon_browser.contents,
3949 ... 'potemplate-relatives')
3950- >>> print extract_text(alternate_notice)
3951+ >>> print(extract_text(alternate_notice))
3952 Other templates here: evolution-2.2.
3953
3954 The notice links to the alternate template.
3955
3956- >>> print alternate_notice
3957+ >>> print(alternate_notice)
3958 <p...>
3959 <span>Other templates here:</span>
3960 <a href="/evolution/trunk/+pots/evolution-2.2">evolution-2.2</a>...
3961@@ -170,7 +170,7 @@
3962 ... package.name, template.name))
3963 >>> relatives = find_tag_by_id(
3964 ... browser.contents, 'potemplate-relatives')
3965- >>> print extract_text(relatives)
3966+ >>> print(extract_text(relatives))
3967 Other templates here: first, forth, second, third.
3968
3969 For five templates, the page displays the first four templates in
3970@@ -190,7 +190,7 @@
3971 ... package.name, template.name))
3972 >>> relatives = find_tag_by_id(
3973 ... browser.contents, 'potemplate-relatives')
3974- >>> print extract_text(relatives)
3975+ >>> print(extract_text(relatives))
3976 Other templates here: fifth, first, forth, second
3977 and one other template.
3978
3979@@ -214,7 +214,7 @@
3980 ... package.name, template.name))
3981 >>> relatives = find_tag_by_id(
3982 ... browser.contents, 'potemplate-relatives')
3983- >>> print extract_text(relatives)
3984+ >>> print(extract_text(relatives))
3985 Other templates here: fifth, first, forth, second
3986 and 2 other templates.
3987
3988@@ -256,7 +256,7 @@
3989 ... "fusa/trunk/+pots/%s") % template.name)
3990 >>> relatives = find_tag_by_id(
3991 ... browser.contents, 'potemplate-relatives')
3992- >>> print extract_text(relatives)
3993+ >>> print(extract_text(relatives))
3994 Other templates here: fifth, first, forth, second
3995 and 2 other templates.
3996
3997@@ -298,7 +298,7 @@
3998 LinkNotFoundError
3999
4000 >>> user_browser.getLink('download').click()
4001- >>> print user_browser.url
4002+ >>> print(user_browser.url)
4003 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+export
4004
4005 Translation administrators will see both download and upload links.
4006@@ -309,28 +309,26 @@
4007 ... 'http://translations.launchpad.dev/'
4008 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')
4009 >>> admin_browser.getLink('upload').click()
4010- >>> print admin_browser.url
4011+ >>> print(admin_browser.url)
4012 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+upload
4013
4014 >>> admin_browser.open(
4015 ... 'http://translations.launchpad.dev/'
4016 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')
4017 >>> admin_browser.getLink('download').click()
4018- >>> print admin_browser.url
4019+ >>> print(admin_browser.url)
4020 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+export
4021
4022 >>> admin_browser.open(
4023 ... 'http://translations.launchpad.dev/'
4024 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')
4025 >>> admin_browser.getLink('Administer this template').click()
4026- >>> print admin_browser.url
4027+ >>> print(admin_browser.url)
4028 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+admin
4029
4030 >>> admin_browser.open(
4031 ... 'http://translations.launchpad.dev/'
4032 ... 'ubuntu/hoary/+source/evolution/+pots/evolution-2.2')
4033 >>> admin_browser.getLink('Change details').click()
4034- >>> print admin_browser.url
4035+ >>> print(admin_browser.url)
4036 http://trans.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+edit
4037-
4038-
4039
4040=== modified file 'lib/lp/translations/stories/standalone/xx-product-export.txt'
4041--- lib/lp/translations/stories/standalone/xx-product-export.txt 2014-11-24 09:16:35 +0000
4042+++ lib/lp/translations/stories/standalone/xx-product-export.txt 2018-06-03 00:41:33 +0000
4043@@ -25,7 +25,7 @@
4044 The translations export is implemented by the same machinery that does
4045 it for source packages (tested and documented separately).
4046
4047- >>> print user_browser.title
4048+ >>> print(user_browser.title)
4049 Download : Series trunk : Translations...
4050
4051 >>> user_browser.getControl('Request Download').click()
4052@@ -80,7 +80,7 @@
4053 >>> anon_browser.open('http://translations.launchpad.dev/evolution/')
4054 >>> for tag in find_tags_by_class(
4055 ... anon_browser.contents, 'menu-link-translationdownload'):
4056- ... print tag.renderContents()
4057+ ... print(tag.renderContents())
4058
4059 # Reset global configuration...
4060 >>> config.devmode = True
4061
4062=== modified file 'lib/lp/translations/stories/standalone/xx-product-translations.txt'
4063--- lib/lp/translations/stories/standalone/xx-product-translations.txt 2015-06-15 08:35:10 +0000
4064+++ lib/lp/translations/stories/standalone/xx-product-translations.txt 2018-06-03 00:41:33 +0000
4065@@ -4,9 +4,9 @@
4066 Each product in Launchpad has a Translations page.
4067
4068 >>> anon_browser.open('http://translations.launchpad.dev/evolution')
4069- >>> print anon_browser.title
4070+ >>> print(anon_browser.title)
4071 Translations : Evolution
4072- >>> print extract_text(find_main_content(anon_browser.contents))
4073+ >>> print(extract_text(find_main_content(anon_browser.contents)))
4074 Translation overview
4075 ...
4076
4077@@ -15,18 +15,18 @@
4078 >>> def print_language_stats(browser):
4079 ... table = find_tag_by_id(browser.contents, 'languagestats')
4080 ... if table is None:
4081- ... print "No translations."
4082+ ... print("No translations.")
4083 ... return
4084 ... language_rows = find_tags_by_class(str(table), 'stats')
4085- ... print "%-25s %13s %13s" % (
4086- ... "Language", "Untranslated", "Unreviewed")
4087+ ... print("%-25s %13s %13s" % (
4088+ ... "Language", "Untranslated", "Unreviewed"))
4089 ... for row in language_rows:
4090 ... cols = row.findAll('td')
4091 ... language = extract_text(cols[0])
4092 ... untranslated = extract_text(cols[2])
4093 ... unreviewed = extract_text(cols[3])
4094- ... print "%-25s %13d %13d" % (
4095- ... language, int(untranslated), int(unreviewed))
4096+ ... print("%-25s %13d %13d" % (
4097+ ... language, int(untranslated), int(unreviewed)))
4098
4099 We even have a language chart table.
4100
4101@@ -42,14 +42,14 @@
4102 >>> registrant = setupBrowser(auth='Basic mark@example.com:test')
4103 >>> registrant.open(
4104 ... 'http://translations.launchpad.dev/gnomebaker')
4105- >>> print extract_text(
4106+ >>> print(extract_text(
4107 ... find_tag_by_id(
4108- ... registrant.contents, 'not-translated-in-launchpad'))
4109+ ... registrant.contents, 'not-translated-in-launchpad')))
4110 Launchpad does not know where gnomebaker translates its messages.
4111
4112- >>> print extract_text(
4113+ >>> print(extract_text(
4114 ... find_tag_by_id(
4115- ... registrant.contents, 'translations-explanation'))
4116+ ... registrant.contents, 'translations-explanation')))
4117 Launchpad allows communities to translate projects using imports or a
4118 branch.
4119 Getting started with translating your project in Launchpad
4120@@ -65,7 +65,7 @@
4121 Launchpad for translations if desired.
4122
4123 >>> registrant.getLink('Translations').click()
4124- >>> print registrant.url
4125+ >>> print(registrant.url)
4126 http://.../gnomebaker/+configure-translations
4127
4128 (The template upload process is tested in xx-translation-import-queue.txt.)
4129@@ -76,7 +76,7 @@
4130
4131 >>> unprivileged = setupBrowser(auth='Basic no-priv@canonical.com:test')
4132 >>> unprivileged.open('http://translations.launchpad.dev/gnomebaker')
4133- >>> print extract_text(find_main_content(unprivileged.contents))
4134+ >>> print(extract_text(find_main_content(unprivileged.contents)))
4135 Translation overview
4136 Help for translations
4137 Launchpad does not know where
4138@@ -107,7 +107,7 @@
4139 options, either.
4140
4141 >>> anon_browser.open('http://translations.launchpad.dev/gnomebaker')
4142- >>> print extract_text(find_main_content(anon_browser.contents))
4143+ >>> print(extract_text(find_main_content(anon_browser.contents)))
4144 Translation overview
4145 Help for translations
4146 Launchpad does not know where
4147@@ -118,16 +118,16 @@
4148
4149 >>> anon_browser.open('http://launchpad.dev/netapplet')
4150 >>> anon_browser.getLink('Translations').click()
4151- >>> print anon_browser.title
4152+ >>> print(anon_browser.title)
4153 Translations : NetApplet
4154- >>> print find_main_content(anon_browser.contents)
4155+ >>> print(find_main_content(anon_browser.contents))
4156 <...
4157 ...Translation overview...
4158
4159 And since the Network Applet isn't currently using Launchpad for
4160 Translations, there is no language chart shown.
4161
4162- >>> print find_tag_by_id(anon_browser.contents, 'language-chart')
4163+ >>> print(find_tag_by_id(anon_browser.contents, 'language-chart'))
4164 None
4165
4166 If the netapplet project is updated to use Launchpad for translations...
4167@@ -145,16 +145,16 @@
4168 ...there are no longer any obsolete entries.
4169
4170 >>> admin_browser.getLink('Translations', index=1).click()
4171- >>> print admin_browser.title
4172+ >>> print(admin_browser.title)
4173 Configure translations : Translations : NetApplet
4174- >>> print find_tag_by_id(admin_browser.contents,
4175- ... 'portlet-obsolete-translatable-series')
4176+ >>> print(find_tag_by_id(admin_browser.contents,
4177+ ... 'portlet-obsolete-translatable-series'))
4178 None
4179
4180 Also, we will get some translation status for network applet.
4181
4182 >>> anon_browser.open('http://translations.launchpad.dev/netapplet')
4183- >>> print find_main_content(anon_browser.contents)
4184+ >>> print(find_main_content(anon_browser.contents))
4185 <...
4186 ...Translation overview...
4187 >>> print_language_stats(anon_browser)
4188@@ -179,13 +179,13 @@
4189 That's all an anonymous user will see.
4190
4191 >>> anon_browser.open(product_url)
4192- >>> print find_translation_recommendation(anon_browser)
4193+ >>> print(find_translation_recommendation(anon_browser))
4194 Launchpad currently recommends translating Evolution trunk series.
4195
4196 A logged-in user is also invited to download translations.
4197
4198 >>> user_browser.open(product_url)
4199- >>> print find_translation_recommendation(user_browser)
4200+ >>> print(find_translation_recommendation(user_browser))
4201 Launchpad currently recommends translating Evolution trunk series.
4202 You can also download translations for trunk.
4203
4204@@ -193,7 +193,7 @@
4205 to upload as well.
4206
4207 >>> admin_browser.open(product_url)
4208- >>> print find_translation_recommendation(admin_browser)
4209+ >>> print(find_translation_recommendation(admin_browser))
4210 Launchpad currently recommends translating Evolution trunk series.
4211 You can also download or upload translations for trunk.
4212
4213@@ -213,7 +213,7 @@
4214 ... potemplate.iscurrent = False
4215 >>> logout()
4216 >>> admin_browser.open(product_url)
4217- >>> print find_translation_recommendation(admin_browser)
4218+ >>> print(find_translation_recommendation(admin_browser))
4219 None
4220
4221 At the moment, translatable source packages are not recommended, although
4222@@ -221,14 +221,14 @@
4223
4224 >>> source_package = find_tag_by_id(
4225 ... admin_browser.contents, 'portlet-translatable-packages')
4226- >>> print extract_text(source_package)
4227+ >>> print(extract_text(source_package))
4228 All translatable distribution packages
4229 evolution source package in Hoary
4230
4231 Instead a notice is displayed that the product has no translations.
4232
4233 >>> notice = first_tag_by_class(admin_browser.contents, 'notice')
4234- >>> print extract_text(notice)
4235+ >>> print(extract_text(notice))
4236 Getting started with translating your project in Launchpad
4237 Configure Translations
4238 There are no translations for this project.
4239
4240=== modified file 'lib/lp/translations/stories/standalone/xx-products-with-translations.txt'
4241--- lib/lp/translations/stories/standalone/xx-products-with-translations.txt 2015-06-26 12:57:00 +0000
4242+++ lib/lp/translations/stories/standalone/xx-products-with-translations.txt 2018-06-03 00:41:33 +0000
4243@@ -24,9 +24,8 @@
4244 ... 'http://translations.launchpad.dev/'
4245 ... 'translations/+products-with-translations')
4246
4247- >>> print find_main_content(browser.contents).renderContents()
4248+ >>> print(find_main_content(browser.contents).renderContents())
4249 <...>
4250 ... of 2 results
4251 ...Evolution...
4252 ...alsa-utils...
4253-
4254
4255=== modified file 'lib/lp/translations/stories/standalone/xx-rosetta-distributionsourcepackage-list.txt'
4256--- lib/lp/translations/stories/standalone/xx-rosetta-distributionsourcepackage-list.txt 2014-11-25 05:54:32 +0000
4257+++ lib/lp/translations/stories/standalone/xx-rosetta-distributionsourcepackage-list.txt 2018-06-03 00:41:33 +0000
4258@@ -8,14 +8,14 @@
4259 'Translations : ...evolution...package : Ubuntu'
4260
4261 >>> content = find_main_content(anon_browser.contents)
4262- >>> print extract_text(content.find(attrs='top-portlet'))
4263+ >>> print(extract_text(content.find(attrs='top-portlet')))
4264 Launchpad currently recommends translating evolution in Ubuntu Hoary.
4265
4266 The focus' two templates are shown.
4267
4268 >>> template_names = content.findAll('h2')
4269 >>> for name in template_names:
4270- ... print extract_text(name)
4271+ ... print(extract_text(name))
4272 Template "evolution-2.2" in Ubuntu Hoary package "evolution"
4273 Template "man" in Ubuntu Hoary package "evolution"
4274 Other versions of evolution in Ubuntu
4275@@ -23,7 +23,7 @@
4276 Other series are also listed.
4277
4278 >>> for other in content.find(id='distroseries-list').findAll('li'):
4279- ... print extract_text(other)
4280+ ... print(extract_text(other))
4281 Breezy Badger Autotest (6.6.6)
4282 Grumpy (5.10)
4283 Warty (4.10)
4284
4285=== modified file 'lib/lp/translations/stories/standalone/xx-rosetta-homepage.txt'
4286--- lib/lp/translations/stories/standalone/xx-rosetta-homepage.txt 2011-12-08 18:47:23 +0000
4287+++ lib/lp/translations/stories/standalone/xx-rosetta-homepage.txt 2018-06-03 00:41:33 +0000
4288@@ -18,7 +18,7 @@
4289 --------------
4290
4291 >>> browser.open('http://translations.launchpad.dev/')
4292- >>> print browser.title
4293+ >>> print(browser.title)
4294 Launchpad Translations
4295
4296 The page includes a list of translatable distribution series
4297@@ -26,7 +26,7 @@
4298
4299 >>> left_column = find_tags_by_class(
4300 ... browser.contents, 'three column left')[0]
4301- >>> print extract_text(left_column)
4302+ >>> print(extract_text(left_column))
4303 Translatable operating systems
4304 Ubuntu Hoary (5.04)
4305
4306@@ -36,12 +36,12 @@
4307 >>> middle_column = find_tags_by_class(
4308 ... browser.contents, 'three column middle')[0]
4309 >>> heading = middle_column.findAll('h2')[0]
4310- >>> print extract_text(heading)
4311+ >>> print(extract_text(heading))
4312 Translatable projects
4313 >>> for project in middle_column.findAll('span'):
4314- ... print extract_text(project)
4315+ ... print(extract_text(project))
4316 Evolution
4317- >>> print extract_text(middle_column.findAll('div')[0])
4318+ >>> print(extract_text(middle_column.findAll('div')[0]))
4319 &raquo; List all translatable projects...
4320
4321 The translation front page list of the user's translatable languages.
4322@@ -49,7 +49,7 @@
4323
4324 >>> right_column = find_tags_by_class(
4325 ... browser.contents, 'three column right')[0]
4326- >>> print extract_text(right_column)
4327+ >>> print(extract_text(right_column))
4328 Your preferred languages
4329 Afrikaans
4330 Sotho, Southern
4331
4332=== modified file 'lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt'
4333--- lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt 2012-02-20 00:45:53 +0000
4334+++ lib/lp/translations/stories/standalone/xx-rosetta-source-package-redirects.txt 2018-06-03 00:41:33 +0000
4335@@ -1,10 +1,10 @@
4336 Checks that the '+pots/' page redirects always to the '+translations' one.
4337
4338- >>> print http(r"""
4339+ >>> print(http(r"""
4340 ... GET /ubuntu/hoary/+source/evolution/+pots/ HTTP/1.1
4341 ... Accept-Language: en-gb,en;q=0.5
4342 ... Host: translations.launchpad.dev
4343- ... """)
4344+ ... """))
4345 HTTP/1.1 303 See Other
4346 Content-Length: 0
4347 Content-Type: text/plain;charset=utf-8
4348@@ -13,11 +13,11 @@
4349
4350 Checks that the '+pots' page redirects always to the '+translations' one.
4351
4352- >>> print http(r"""
4353+ >>> print(http(r"""
4354 ... GET /ubuntu/hoary/+source/evolution/+pots HTTP/1.1
4355 ... Accept-Language: en-gb,en;q=0.5
4356 ... Host: translations.launchpad.dev
4357- ... """)
4358+ ... """))
4359 HTTP/1.1 303 See Other
4360 ...
4361 Location: .../ubuntu/hoary/+source/evolution/+pots...
4362@@ -30,14 +30,13 @@
4363 Hardy, which is 2013-04. Please consult with the Ubuntu Desktop team before
4364 removing.
4365
4366- >>> print http(r"""
4367+ >>> print(http(r"""
4368 ... GET /ubuntu/hoary/+sources/evolution/+translate HTTP/1.1
4369 ... Accept-Language: en-gb,en;q=0.5
4370 ... Host: translations.launchpad.dev
4371- ... """)
4372+ ... """))
4373 HTTP/1.1 301 Moved Permanently
4374 Content-Length: 0
4375 Content-Type: text/plain;charset=utf-8
4376 Location: .../+source/evolution/+translations
4377 ...
4378-
4379
4380=== modified file 'lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt'
4381--- lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt 2014-11-24 09:16:35 +0000
4382+++ lib/lp/translations/stories/standalone/xx-rosetta-sourcepackage-list.txt 2018-06-03 00:41:33 +0000
4383@@ -11,15 +11,15 @@
4384 'Hoary (5.04) : Translations : ...evolution...package : Ubuntu'
4385
4386 >>> content = find_main_content(anon_browser.contents)
4387- >>> print extract_text(content.findAll('h1')[0]).encode(
4388- ... 'ascii','backslashreplace')
4389+ >>> print(extract_text(content.findAll('h1')[0]).encode(
4390+ ... 'ascii','backslashreplace'))
4391 Translations for evolution in Ubuntu Hoary
4392
4393 There are two templates for evolution in Ubuntu Hoary
4394
4395 >>> template_names = content.findAll('h2')
4396 >>> for name in template_names:
4397- ... print extract_text(name)
4398+ ... print(extract_text(name))
4399 Template "evolution-2.2" in Ubuntu Hoary package "evolution"
4400 Template "man" in Ubuntu Hoary package "evolution"
4401
4402@@ -32,7 +32,7 @@
4403
4404 >>> table = content.findAll('table')[0]
4405 >>> for row in table.findAll('tr'):
4406- ... print extract_text(row)
4407+ ... print(extract_text(row))
4408 Language Status Untranslated Need review Changed Last Edited By
4409 Afrikaans 22 ... ... &mdash; &mdash;
4410 Sotho, Southern 22 ... ... &mdash; &mdash;
4411
4412=== modified file 'lib/lp/translations/stories/standalone/xx-series-templates.txt'
4413--- lib/lp/translations/stories/standalone/xx-series-templates.txt 2012-06-16 14:07:41 +0000
4414+++ lib/lp/translations/stories/standalone/xx-series-templates.txt 2018-06-03 00:41:33 +0000
4415@@ -19,7 +19,7 @@
4416 >>> user_browser.open(
4417 ... 'http://translations.launchpad.dev/ubuntu/hoary')
4418 >>> user_browser.getLink('full list of templates').click()
4419- >>> print user_browser.url
4420+ >>> print(user_browser.url)
4421 http://translations.launchpad.dev/ubuntu/hoary/+templates
4422
4423
4424@@ -37,7 +37,7 @@
4425 length, languages and the date of last update for this distribution series.
4426
4427 >>> table = find_tag_by_id(anon_browser.contents, 'templates_table')
4428- >>> print extract_text(table)
4429+ >>> print(extract_text(table))
4430 Priority Source package Template name Shared with Length Updated
4431 0 evolution man ...not shared 1 2006-08-14
4432 100 evolution evolution-2.2 ...evolution/trunk 22 2005-05-06
4433@@ -53,7 +53,7 @@
4434 the active templates.
4435
4436 >>> table = find_tag_by_id(user_browser.contents, 'templates_table')
4437- >>> print extract_text(table)
4438+ >>> print(extract_text(table))
4439 Priority Source package Template name ... Updated Actions...
4440 100 evolution evolution-2.2 ... 2005-05-06 Download...
4441 0 mozilla pkgconf-mozilla ... 2005-05-06 Download...
4442@@ -67,7 +67,7 @@
4443 The page shows a table of all templates and links to their subpages.
4444
4445 >>> table = find_tag_by_id(admin_browser.contents, 'templates_table')
4446- >>> print extract_text(table)
4447+ >>> print(extract_text(table))
4448 Priority Source package ... Updated Actions
4449 0 evolution ... 2007-01-05 Edit Upload Download Administer
4450 ...
4451@@ -87,7 +87,7 @@
4452 ... 'http://translations.launchpad.dev/ubuntu/hoary/+templates')
4453 >>> utc_browser.getLink(
4454 ... url='+source/evolution/+pots/evolution-2.2/+edit').click()
4455- >>> print utc_browser.url
4456+ >>> print(utc_browser.url)
4457 http://.../ubuntu/hoary/+source/evolution/+pots/evolution-2.2/+edit
4458
4459 Administration page is inaccessible.
4460@@ -106,7 +106,7 @@
4461 ... 'http://translations.launchpad.dev/ubuntu/hoary/+templates')
4462 >>> utc_browser.getLink(
4463 ... url='+source/evolution/+pots/disabled-template/+edit').click()
4464- >>> print utc_browser.url
4465+ >>> print(utc_browser.url)
4466 http://.../ubuntu/hoary/+source/evolution/+pots/disabled-template/+edit
4467
4468 Administration page is inaccessible.
4469@@ -127,7 +127,7 @@
4470 page.
4471
4472 >>> admin_browser.getLink('pmount').click()
4473- >>> print admin_browser.url
4474+ >>> print(admin_browser.url)
4475 http://translations.launchpad.dev/ubuntu/hoary/+source/pmount/+pots/pmount
4476
4477 Clicking on 'Edit' will take the user to the page to edit the template
4478@@ -136,7 +136,7 @@
4479 >>> admin_browser.open(
4480 ... 'http://translations.launchpad.dev/ubuntu/hoary/+templates')
4481 >>> admin_browser.getLink('Edit', index=1).click()
4482- >>> print admin_browser.url
4483+ >>> print(admin_browser.url)
4484 http://translations.../evolution/+pots/disabled-template/+edit
4485
4486
4487@@ -173,7 +173,7 @@
4488 >>> user_browser.open(
4489 ... 'http://translations.launchpad.dev/evolution/trunk')
4490 >>> user_browser.getLink('full list of templates').click()
4491- >>> print user_browser.url
4492+ >>> print(user_browser.url)
4493 http://translations.launchpad.dev/evolution/trunk/+templates
4494
4495
4496@@ -183,7 +183,7 @@
4497 The page shows a table of all templates and links to their subpages.
4498
4499 >>> table = find_tag_by_id(user_browser.contents, 'templates_table')
4500- >>> print extract_text(table)
4501+ >>> print(extract_text(table))
4502 Priority Template name Length Updated Actions
4503 0 at-the-top 0 ... Download
4504 0 evolution-2.2 22 2005-08-25 Download
4505@@ -195,7 +195,7 @@
4506 >>> admin_browser.open(
4507 ... 'http://translations.launchpad.dev/evolution/trunk/+templates')
4508 >>> table = find_tag_by_id(admin_browser.contents, 'templates_table')
4509- >>> print extract_text(table)
4510+ >>> print(extract_text(table))
4511 Priority Template name ... Updated Actions
4512 0 at-the-top ... ... Edit Upload Download Administer
4513 0 evolution-2.2 ... 2005-08-25 Edit Upload Download Administer
4514@@ -209,7 +209,7 @@
4515 page.
4516
4517 >>> admin_browser.getLink('evolution-2.2').click()
4518- >>> print admin_browser.url
4519+ >>> print(admin_browser.url)
4520 http://translations.launchpad.dev/evolution/trunk/+pots/evolution-2.2
4521
4522 Clicking on 'Edit' will take the user to the page to edit the template
4523@@ -218,5 +218,5 @@
4524 >>> admin_browser.open(
4525 ... 'http://translations.launchpad.dev/evolution/trunk/+templates')
4526 >>> admin_browser.getLink('Edit').click()
4527- >>> print admin_browser.url
4528+ >>> print(admin_browser.url)
4529 http://translations.launchpad.dev/evolution/trunk/+pots/at-the-top/+edit
4530
4531=== modified file 'lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt'
4532--- lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt 2014-11-24 09:16:35 +0000
4533+++ lib/lp/translations/stories/standalone/xx-serieslanguage-index.txt 2018-06-03 00:41:33 +0000
4534@@ -10,26 +10,26 @@
4535
4536 >>> browser.open('http://translations.launchpad.dev/evolution/trunk/')
4537 >>> browser.getLink('Portuguese (Brazil)').click()
4538- >>> print browser.url
4539+ >>> print(browser.url)
4540 http://translations.launchpad.dev/evolution/trunk/+lang/pt_BR
4541
4542- >>> print browser.title
4543+ >>> print(browser.title)
4544 Portuguese (Brazil) (pt_BR) : Series trunk : Translations : Evolution
4545
4546 Since there is no translation team to manage Portuguese (Brazil) language
4547 in the Evolution's translation group, all users will be informed about it
4548 and pointed to the translation group owner.
4549
4550- >>> print extract_text(find_tag_by_id(
4551- ... browser.contents, 'group-team-info'))
4552+ >>> print(extract_text(find_tag_by_id(
4553+ ... browser.contents, 'group-team-info')))
4554 There is no team to manage Evolution translations to ...
4555 To set one up, please get in touch with Carlos Perelló Marín.
4556
4557 Anonymous users are informed that in order to make translations they
4558 need to login first.
4559
4560- >>> print extract_text(
4561- ... find_tag_by_id(browser.contents, 'translation-access-level'))
4562+ >>> print(extract_text(
4563+ ... find_tag_by_id(browser.contents, 'translation-access-level')))
4564 You are not logged in. Please log in to work on translations...
4565
4566 Authenticated users will see information about what they can do in
4567@@ -42,8 +42,8 @@
4568
4569 >>> user_browser.open(
4570 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/es')
4571- >>> print extract_text(
4572- ... find_tag_by_id(user_browser.contents, 'group-team-info'))
4573+ >>> print(extract_text(
4574+ ... find_tag_by_id(user_browser.contents, 'group-team-info')))
4575 There is no translation group to manage Ubuntu translations.
4576
4577 Create a translation group for Ubuntu, together with a translation
4578@@ -81,27 +81,26 @@
4579 >>> user_browser.open(
4580 ... 'http://translations.launchpad.dev/ubuntu/hoary/')
4581 >>> user_browser.getLink('Spanish').click()
4582- >>> print user_browser.url
4583+ >>> print(user_browser.url)
4584 http://translations.launchpad.dev/ubuntu/hoary/+lang/es
4585
4586- >>> print extract_text(
4587- ... find_tag_by_id(user_browser.contents, 'group-team-info'))
4588+ >>> print(extract_text(
4589+ ... find_tag_by_id(user_browser.contents, 'group-team-info')))
4590 These Ubuntu translations are managed by Ubuntu Spanish Translators.
4591
4592 Authenticated users can add suggestion but will be held for review by
4593 the members of Spanish translations team.
4594
4595- >>> print extract_text(
4596+ >>> print(extract_text(
4597 ... find_tag_by_id(
4598- ... user_browser.contents, 'translation-access-level'))
4599+ ... user_browser.contents, 'translation-access-level')))
4600 Your suggestions will be held for review by
4601 Ubuntu Spanish Translator...
4602 please get in touch with Ubuntu Spanish Translators...
4603
4604 Users will see three references to the team managing these translations.
4605
4606- >>> print user_browser.getLink(
4607- ... 'Ubuntu Spanish Translator').url
4608+ >>> print(user_browser.getLink('Ubuntu Spanish Translator').url)
4609 http://launchpad.dev/~ubuntu-l10n-es
4610
4611 Catalan has no translation team for managing translations and since
4612@@ -111,22 +110,21 @@
4613 >>> user_browser.open(
4614 ... 'http://translations.launchpad.dev/ubuntu/hoary/')
4615 >>> user_browser.getLink('Catalan').click()
4616- >>> print user_browser.url
4617+ >>> print(user_browser.url)
4618 http://translations.launchpad.dev/ubuntu/hoary/+lang/ca
4619
4620- >>> print extract_text(
4621- ... find_tag_by_id(user_browser.contents, 'group-team-info'))
4622+ >>> print(extract_text(
4623+ ... find_tag_by_id(user_browser.contents, 'group-team-info')))
4624 There is no team to manage ... To set one up, please get in touch
4625 with Ubuntu Translation Coordinators.
4626
4627- >>> print extract_text(find_tag_by_id(
4628- ... user_browser.contents, 'translation-access-level'))
4629+ >>> print(extract_text(find_tag_by_id(
4630+ ... user_browser.contents, 'translation-access-level')))
4631 Since there is nobody to manage translation ...
4632 you cannot add new suggestions. If you are interested in making
4633 translations, please contact Ubuntu Translation Coordinators...
4634
4635- >>> print user_browser.getLink(
4636- ... 'Ubuntu Translation Coordinators').url
4637+ >>> print(user_browser.getLink('Ubuntu Translation Coordinators').url)
4638 http://launchpad.dev/~utc-team
4639
4640 Members of translation team and translations admins have full access to
4641@@ -134,8 +132,8 @@
4642
4643 >>> admin_browser.open(
4644 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/ro')
4645- >>> print extract_text(find_tag_by_id(
4646- ... admin_browser.contents, 'translation-access-level'))
4647+ >>> print(extract_text(find_tag_by_id(
4648+ ... admin_browser.contents, 'translation-access-level')))
4649 You can add and review translations...
4650
4651 For projects using closed translations policy, a translator that is not
4652@@ -148,8 +146,8 @@
4653
4654 >>> user_browser.open(
4655 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/ro')
4656- >>> print extract_text(find_tag_by_id(
4657- ... user_browser.contents, 'translation-access-level'))
4658+ >>> print(extract_text(find_tag_by_id(
4659+ ... user_browser.contents, 'translation-access-level')))
4660 These templates can be translated only by their managers...
4661
4662 Translation policy is rolled back to not affect other tests.
4663@@ -165,13 +163,12 @@
4664 ... auth='Basic dude@ex.com:test')
4665 >>> no_license_browser.open(
4666 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/ro')
4667- >>> print extract_text(find_tag_by_id(
4668- ... no_license_browser.contents, 'translation-access-level'))
4669+ >>> print(extract_text(find_tag_by_id(
4670+ ... no_license_browser.contents, 'translation-access-level')))
4671 To make translations in Launchpad you need to agree with
4672 the Translations licensing...
4673
4674- >>> print no_license_browser.getLink(
4675- ... 'Translations licensing').url
4676+ >>> print(no_license_browser.getLink('Translations licensing').url)
4677 http://translations.launchpad.dev/~dude/+licensing
4678
4679 For projects with no translation group, translators see a note stating
4680@@ -183,12 +180,12 @@
4681
4682 >>> user_browser.open(
4683 ... 'http://translations.launchpad.dev/ubuntu/hoary/+lang/ro')
4684- >>> print extract_text(
4685- ... find_tag_by_id(user_browser.contents, 'group-team-info'))
4686+ >>> print(extract_text(
4687+ ... find_tag_by_id(user_browser.contents, 'group-team-info')))
4688 There is no translation group to manage Ubuntu translations.
4689
4690- >>> print extract_text(find_tag_by_id(
4691- ... user_browser.contents, 'translation-access-level'))
4692+ >>> print(extract_text(find_tag_by_id(
4693+ ... user_browser.contents, 'translation-access-level')))
4694 Templates which are more important to translate are listed first.
4695
4696 Translation group configuration is rolled back to not affect other tests.
4697
4698=== modified file 'lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt'
4699--- lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt 2014-11-27 22:13:36 +0000
4700+++ lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt 2018-06-03 00:41:33 +0000
4701@@ -20,7 +20,7 @@
4702 >>> download = browser.getLink('download a full tarball')
4703 >>> download_url = download.url
4704 >>> download.click()
4705- >>> print browser.url
4706+ >>> print(browser.url)
4707 http://translations.launchpad.dev/ubuntu/hoary/+source/mozilla/+export
4708
4709
4710@@ -170,7 +170,7 @@
4711
4712 >>> browser.getControl('Request Download').click()
4713
4714- >>> print browser.url
4715+ >>> print(browser.url)
4716 http://translations.launchpad.dev/ubuntu/hoary/+source/mozilla
4717
4718 >>> print_feedback_messages(browser.contents)
4719
4720=== modified file 'lib/lp/translations/stories/standalone/xx-template-description-escaping.txt'
4721--- lib/lp/translations/stories/standalone/xx-template-description-escaping.txt 2010-08-31 18:10:51 +0000
4722+++ lib/lp/translations/stories/standalone/xx-template-description-escaping.txt 2018-06-03 00:41:33 +0000
4723@@ -26,7 +26,7 @@
4724 >>> description = find_description(template_url)
4725 >>> len(description)
4726 1
4727- >>> print description[0]
4728+ >>> print(description[0])
4729 See <a ... href="http://example.com/">...</a> for an example!
4730
4731 The same description also shows up on the +translate page for the
4732@@ -35,7 +35,5 @@
4733 >>> description = find_description(package_url + '/+translations')
4734 >>> len(description)
4735 1
4736- >>> print description[0]
4737+ >>> print(description[0])
4738 See <a ... href="http://example.com/">...</a> for an example!
4739-
4740-
4741
4742=== modified file 'lib/lp/translations/stories/standalone/xx-test-potlists.txt'
4743--- lib/lp/translations/stories/standalone/xx-test-potlists.txt 2009-09-09 12:41:48 +0000
4744+++ lib/lp/translations/stories/standalone/xx-test-potlists.txt 2018-06-03 00:41:33 +0000
4745@@ -1,9 +1,9 @@
4746 Check that we can get a potlist for a source pacakge that has potemplates:
4747
4748- >>> print http(r"""
4749+ >>> print(http(br"""
4750 ... GET /ubuntu/hoary/+source/evolution/+potlist HTTP/1.1
4751 ... Host: translations.launchpad.dev
4752- ... """)
4753+ ... """))
4754 HTTP/1.1 200 Ok
4755 Content-Length: ...
4756 Content-Type: text/html;charset=utf-8
4757
4758=== modified file 'lib/lp/translations/stories/standalone/xx-translation-access-display.txt'
4759--- lib/lp/translations/stories/standalone/xx-translation-access-display.txt 2015-01-29 18:43:52 +0000
4760+++ lib/lp/translations/stories/standalone/xx-translation-access-display.txt 2018-06-03 00:41:33 +0000
4761@@ -8,9 +8,9 @@
4762 ... """Find and print tag with given id."""
4763 ... tag = find_tag_by_id(page, id)
4764 ... if tag is None:
4765- ... print 'None'
4766+ ... print('None')
4767 ... else:
4768- ... print tag.renderContents()
4769+ ... print(tag.renderContents())
4770
4771 >>> admin_browser.open(
4772 ... 'http://translations.launchpad.dev/'
4773@@ -69,7 +69,7 @@
4774 ... 'evolution/trunk/+pots/evolution-2.2/es/+translate')
4775 >>> managers_tag = find_tag_by_id(
4776 ... admin_browser.contents, 'translation-managers').renderContents()
4777- >>> print re.search(',\s+and', managers_tag)
4778+ >>> print(re.search(',\s+and', managers_tag))
4779 None
4780
4781 If no translation group is assigned, the page also mentions that.
4782
4783=== modified file 'lib/lp/translations/stories/standalone/xx-translation-credits.txt'
4784--- lib/lp/translations/stories/standalone/xx-translation-credits.txt 2009-07-01 20:45:39 +0000
4785+++ lib/lp/translations/stories/standalone/xx-translation-credits.txt 2018-06-03 00:41:33 +0000
4786@@ -25,8 +25,8 @@
4787
4788 And there is no input field allowing changing this message.
4789
4790- >>> print find_tag_by_id(browser.contents,
4791- ... 'msgset_199_sr_translation_0_new')
4792+ >>> print(find_tag_by_id(browser.contents,
4793+ ... 'msgset_199_sr_translation_0_new'))
4794 None
4795
4796 KDE-style translation credits are split into two messages, with emails
4797@@ -39,11 +39,11 @@
4798
4799 These are locked as well:
4800
4801- >>> print find_tag_by_id(browser.contents,
4802- ... 'msgset_200_sr_translation_0_new')
4803+ >>> print(find_tag_by_id(browser.contents,
4804+ ... 'msgset_200_sr_translation_0_new'))
4805 None
4806- >>> print find_tag_by_id(browser.contents,
4807- ... 'msgset_201_sr_translation_0_new')
4808+ >>> print(find_tag_by_id(browser.contents,
4809+ ... 'msgset_201_sr_translation_0_new'))
4810 None
4811
4812 We can translate a non-translator credits message, which will update
4813@@ -55,7 +55,7 @@
4814 >>> inputfield = browser.getControl(name='msgset_198_sr_translation_0_new')
4815 >>> inputfield.value = 'Test translation'
4816 >>> browser.getControl('Save & Continue').click()
4817- >>> print browser.url
4818+ >>> print(browser.url)
4819 http://translations.launchpad.dev/alsa-utils/trunk/+pots/alsa-utils/sr/+translate
4820
4821 Translation has been updated.
4822
4823=== modified file 'lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt'
4824--- lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt 2015-10-05 08:36:52 +0000
4825+++ lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt 2018-06-03 00:41:33 +0000
4826@@ -43,15 +43,15 @@
4827 will not be displayed in that list.
4828
4829 >>> nav = find_tag_by_id(browser.contents, 'nav-pofile-subpages')
4830- >>> print extract_text(nav)
4831+ >>> print(extract_text(nav))
4832 Download translation Translation details
4833
4834 Download translations and Translation details should linked to the
4835 proper pages
4836
4837- >> print nav.getLink("Download translation").url
4838+ >> print(nav.getLink("Download translation").url)
4839 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+export
4840- >> print nav.getLink("Translation details").url
4841+ >> print(nav.getLink("Translation details").url)
4842 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+details
4843
4844 Let's log in.
4845@@ -86,48 +86,48 @@
4846 LinkNotFoundError
4847
4848 >>> next = browser.getLink('Next')
4849- >>> print next.url
4850+ >>> print(next.url)
4851 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/2/+translate
4852
4853- >>> print browser.getLink('Last').url
4854+ >>> print(browser.getLink('Last').url)
4855 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/22/+translate
4856
4857 And the link to the IPOFile view should be there too:
4858
4859 >>> zoom_link = browser.getLink(id="zoom-out")
4860- >>> print zoom_link.url
4861+ >>> print(zoom_link.url)
4862 http://.../+source/evolution/+pots/evolution-2.2/es/+translate?start=0
4863
4864 when we choose the next entry, all links should appear.
4865
4866 >>> next.click()
4867- >>> print browser.getLink('First').url
4868- http://.../hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
4869-
4870- >>> print browser.getLink('Previous').url
4871- http://.../hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
4872-
4873- >>> print browser.getLink('Next').url
4874+ >>> print(browser.getLink('First').url)
4875+ http://.../hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
4876+
4877+ >>> print(browser.getLink('Previous').url)
4878+ http://.../hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
4879+
4880+ >>> print(browser.getLink('Next').url)
4881 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/3/+translate
4882
4883 >>> last = browser.getLink('Last')
4884- >>> print last.url
4885+ >>> print(last.url)
4886 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/22/+translate
4887
4888 And the link to the IPOFile view should be there too:
4889
4890 >>> zoom_link = browser.getLink(id="zoom-out")
4891- >>> print zoom_link.url
4892+ >>> print(zoom_link.url)
4893 http://.../+source/evolution/+pots/evolution-2.2/es/+translate?start=1
4894
4895 And the last one.
4896
4897 >>> last.click()
4898- >>> print browser.getLink('First').url
4899+ >>> print(browser.getLink('First').url)
4900 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
4901
4902 >>> prev = browser.getLink('Previous')
4903- >>> print prev.url
4904+ >>> print(prev.url)
4905 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/21/+translate
4906
4907 >>> browser.getLink('Next')
4908@@ -143,22 +143,22 @@
4909 And the link to the IPOFile view should be there too:
4910
4911 >>> zoom_link = browser.getLink(id="zoom-out")
4912- >>> print zoom_link.url
4913+ >>> print(zoom_link.url)
4914 http://.../+source/evolution/+pots/evolution-2.2/es/+translate?start=21
4915
4916 Let's test the ones at the end of the form.
4917
4918 >>> prev.click()
4919- >>> print browser.getLink('First').url
4920+ >>> print(browser.getLink('First').url)
4921 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/1/+translate
4922
4923- >>> print browser.getLink('Previous').url
4924+ >>> print(browser.getLink('Previous').url)
4925 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/20/+translate
4926
4927- >>> print browser.getLink('Next').url
4928+ >>> print(browser.getLink('Next').url)
4929 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/22/+translate
4930
4931- >>> print browser.getLink('Last').url
4932+ >>> print(browser.getLink('Last').url)
4933 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/22/+translate
4934
4935 As a translation admin you will have access to the download and details
4936@@ -167,17 +167,17 @@
4937 mode
4938
4939 >>> nav = find_tag_by_id(browser.contents, 'nav-pofile-subpages')
4940- >>> print extract_text(nav)
4941+ >>> print(extract_text(nav))
4942 Download translation Translation details
4943 Reviewer mode (What's this?)
4944
4945 All those links should linked the proper pages
4946
4947- >> print nav.getLink("Download translation").url
4948+ >> print(nav.getLink("Download translation").url)
4949 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+export
4950- >> print nav.getLink("Upload translation").url
4951+ >> print(nav.getLink("Upload translation").url)
4952 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+upload
4953- >> print nav.getLink("Translation details").url
4954+ >> print(nav.getLink("Translation details").url)
4955 https://.../hoary/+source/evolution/+pots/evolution-2.2/es/+details
4956
4957 Now, we are going to check a message submission.
4958@@ -190,16 +190,16 @@
4959
4960 First what we represent in the form when there is no translation:
4961
4962- >>> print find_tag_by_id(browser.contents, 'msgset_142').renderContents()
4963+ >>> print(find_tag_by_id(browser.contents, 'msgset_142').renderContents())
4964 13.
4965 <input type="hidden" name="msgset_142" />
4966
4967- >>> print find_tag_by_id(
4968- ... browser.contents, 'msgset_142_singular').renderContents()
4969+ >>> print(find_tag_by_id(
4970+ ... browser.contents, 'msgset_142_singular').renderContents())
4971 Migrating `<code>%s</code>&#x27;:
4972
4973- >>> print find_tag_by_id(
4974- ... browser.contents, 'msgset_142_es_translation_0').renderContents()
4975+ >>> print(find_tag_by_id(
4976+ ... browser.contents, 'msgset_142_es_translation_0').renderContents())
4977 (no translation yet)
4978
4979 And also, we don't get anyone as the Last translator because there is no
4980@@ -222,11 +222,11 @@
4981 >>> browser.getControl(
4982 ... name='msgset_142_es_translation_0_new').value = 'foo %i'
4983 >>> browser.getControl(name='submit_translations').click()
4984- >>> print browser.url
4985+ >>> print(browser.url)
4986 http://.../hoary/+source/evolution/+pots/evolution-2.2/es/13/+translate
4987
4988 >>> for tag in find_tags_by_class(browser.contents, 'error'):
4989- ... print tag
4990+ ... print(tag)
4991 <div class="error message">There is an error in the translation you
4992 provided. Please correct it before continuing.</div>
4993 <tr class="error translation">
4994@@ -244,16 +244,16 @@
4995
4996 The message is still without translation:
4997
4998- >>> print find_tag_by_id(browser.contents, 'msgset_142').renderContents()
4999+ >>> print(find_tag_by_id(browser.contents, 'msgset_142').renderContents())
5000 13.
The diff has been truncated for viewing.