Merge lp:~blr/launchpad/project-configuration-rename into lp:launchpad

Proposed by Kit Randel on 2015-06-14
Status: Merged
Merged at revision: 17563
Proposed branch: lp:~blr/launchpad/project-configuration-rename
Merge into: lp:launchpad
Diff against target: 363 lines (+43/-41)
13 files modified
lib/lp/blueprints/stories/standalone/xx-batching.txt (+1/-1)
lib/lp/bugs/stories/bugs/xx-front-page-info.txt (+1/-1)
lib/lp/code/browser/branchlisting.py (+1/-1)
lib/lp/code/browser/tests/test_branchlisting.py (+2/-2)
lib/lp/code/stories/branches/xx-product-branches.txt (+2/-2)
lib/lp/code/stories/codeimport/xx-create-codeimport.txt (+1/-1)
lib/lp/registry/browser/product.py (+9/-7)
lib/lp/registry/stories/product/xx-product-development-focus.txt (+6/-6)
lib/lp/translations/stories/productseries/xx-productseries-translations.txt (+3/-3)
lib/lp/translations/stories/standalone/xx-product-translations.txt (+6/-6)
lib/lp/translations/stories/translationfocus/xx-product-translationfocus.txt (+1/-1)
lib/lp/translations/stories/translationgroups/xx-change-translation-policy.txt (+3/-3)
lib/lp/translations/stories/translationgroups/xx-translationgroups.txt (+7/-7)
To merge this branch: bzr merge lp:~blr/launchpad/project-configuration-rename
Reviewer Review Type Date Requested Status
William Grant code 2015-06-14 Approve on 2015-06-15
Review via email: mp+261918@code.launchpad.net

Commit Message

Rename project configuration links to be consistent with the top navigation bar.

To post a comment you must log in.
William Grant (wgrant) wrote :

The changes to xx-productseries-translations.txt and xx-product-translations.txt look wrong. Those links aren't in a config section, so they should probably be "Configure Translations" rather than just "Translations". You also have "Configure code" rather than "Configure Code".

What's the purpose of the VCS change in xx-create-codeimport.txt?

review: Approve (code)
Kit Randel (blr) wrote :

> The changes to xx-productseries-translations.txt and xx-product-
> translations.txt look wrong. Those links aren't in a config section, so they
> should probably be "Configure Translations" rather than just "Translations".
> You also have "Configure code" rather than "Configure Code".
>
Ah yes, I had forgotten there was a reason I didn't directly edit the link text in the previous branch - that menu also defines the links for the Answers/Translations/Bugs views etc. I'll revert that and fix those tests, thanks.

> What's the purpose of the VCS change in xx-create-codeimport.txt?
A bad cherry-pick of deprecated code (was used in the other branch for the git/bzr radiobuttons, but no longer needed there now).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/blueprints/stories/standalone/xx-batching.txt'
2--- lib/lp/blueprints/stories/standalone/xx-batching.txt 2010-09-16 16:47:37 +0000
3+++ lib/lp/blueprints/stories/standalone/xx-batching.txt 2015-06-15 05:29:16 +0000
4@@ -28,7 +28,7 @@
5
6 >>> browser.open("http://blueprints.launchpad.dev/big-project")
7 >>> print extract_text(find_main_content(browser.contents))
8- Blueprints...does not know how...Configure blueprints...
9+ Blueprints...does not know how...Configure Blueprints...
10
11 But it's easy to change that.
12
13
14=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-info.txt'
15--- lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2011-12-24 15:18:32 +0000
16+++ lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2015-06-15 05:29:16 +0000
17@@ -34,7 +34,7 @@
18 >>> enable_tracker = find_tag_by_id(
19 ... admin_browser.contents, 'no-malone-edit')
20 >>> print extract_text(enable_tracker)
21- Configure bug tracker
22+ Configure Bugs
23
24 The +bugs page for a project using Launchpad for bug tracking
25 shows controls for setting bug supervisor and states that no
26
27=== modified file 'lib/lp/code/browser/branchlisting.py'
28--- lib/lp/code/browser/branchlisting.py 2015-06-12 07:25:05 +0000
29+++ lib/lp/code/browser/branchlisting.py 2015-06-15 05:29:16 +0000
30@@ -1138,7 +1138,7 @@
31 return None
32 series_menu = MenuAPI(self.context.development_focus).overview
33 set_branch = series_menu['set_branch']
34- set_branch.text = 'Configure code hosting'
35+ set_branch.text = 'Configure Code'
36 return set_branch
37
38
39
40=== modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
41--- lib/lp/code/browser/tests/test_branchlisting.py 2015-06-12 07:25:05 +0000
42+++ lib/lp/code/browser/tests/test_branchlisting.py 2015-06-15 05:29:16 +0000
43@@ -656,7 +656,7 @@
44 product = self.factory.makeProduct()
45 browser = self.getUserBrowser(
46 canonical_url(product, rootsite='code'))
47- self.assertFalse('Configure code hosting' in browser.contents)
48+ self.assertFalse('Configure Code' in browser.contents)
49
50 def test_configure_codehosting_shown(self):
51 # If the user has driver permissions, they are shown the configure
52@@ -664,7 +664,7 @@
53 product = self.factory.makeProduct()
54 browser = self.getUserBrowser(
55 canonical_url(product, rootsite='code'), user=product.owner)
56- self.assertTrue('Configure code hosting' in browser.contents)
57+ self.assertTrue('Configure Code' in browser.contents)
58
59
60 class TestPersonBranchesPage(BrowserTestCase):
61
62=== modified file 'lib/lp/code/stories/branches/xx-product-branches.txt'
63--- lib/lp/code/stories/branches/xx-product-branches.txt 2015-06-02 06:35:38 +0000
64+++ lib/lp/code/stories/branches/xx-product-branches.txt 2015-06-15 05:29:16 +0000
65@@ -216,7 +216,7 @@
66 >>> admin_browser.open('http://code.launchpad.dev/firefox')
67 >>> print_links(admin_browser)
68 Import a branch
69- Configure code hosting
70+ Configure Code
71
72 The owner of the project sees the links for the activities he can
73 perform, everything except defining branch visibility.
74@@ -225,7 +225,7 @@
75 >>> owner_browser.open('http://code.launchpad.dev/firefox')
76 >>> print_links(owner_browser)
77 Import a branch
78- Configure code hosting
79+ Configure Code
80
81 And a regular user can only register and import branches.
82
83
84=== modified file 'lib/lp/code/stories/codeimport/xx-create-codeimport.txt'
85--- lib/lp/code/stories/codeimport/xx-create-codeimport.txt 2015-06-12 14:20:12 +0000
86+++ lib/lp/code/stories/codeimport/xx-create-codeimport.txt 2015-06-15 05:29:16 +0000
87@@ -37,7 +37,7 @@
88
89 >>> owner_browser = setupBrowser(auth="Basic test@canonical.com:test")
90 >>> owner_browser.open('http://code.launchpad.dev/firefox')
91- >>> owner_browser.getLink('Configure code hosting').click()
92+ >>> owner_browser.getLink('Configure Code').click()
93 >>> owner_browser.getControl(
94 ... 'Import a branch').click()
95 >>> owner_browser.getControl('Branch URL').value = (
96
97=== modified file 'lib/lp/registry/browser/product.py'
98--- lib/lp/registry/browser/product.py 2015-06-10 10:19:25 +0000
99+++ lib/lp/registry/browser/product.py 2015-06-15 05:29:16 +0000
100@@ -350,21 +350,23 @@
101 series_menu = MenuAPI(self.context.development_focus).overview
102 configuration_names = [
103 'configure_bugtracker',
104+ 'configure_translations',
105 'configure_answers',
106- 'configure_translations',
107 #'configure_blueprints',
108 ]
109 config_list = []
110 config_statuses = self.configuration_states
111 for key in configuration_names:
112+ overview_menu[key].text = overview_menu[key].text.replace(
113+ 'Configure ', '')
114 config_list.append(dict(link=overview_menu[key],
115 configured=config_statuses[key]))
116
117 # Add the branch configuration in separately.
118 set_branch = series_menu['set_branch']
119- set_branch.text = 'Configure project branch'
120+ set_branch.text = 'Code'
121 set_branch.summary = "Specify the location of this project's code."
122- config_list.append(
123+ config_list.insert(0,
124 dict(link=set_branch,
125 configured=config_statuses['configure_codehosting']))
126 return config_list
127@@ -418,25 +420,25 @@
128
129 @enabled_with_permission('launchpad.BugSupervisor')
130 def configure_bugtracker(self):
131- text = 'Configure bug tracker'
132+ text = 'Configure Bugs'
133 summary = 'Specify where bugs are tracked for this project'
134 return Link('+configure-bugtracker', text, summary, icon='edit')
135
136 @enabled_with_permission('launchpad.TranslationsAdmin')
137 def configure_translations(self):
138- text = 'Configure translations'
139+ text = 'Configure Translations'
140 summary = 'Allow users to submit translations for this project'
141 return Link('+configure-translations', text, summary, icon='edit')
142
143 @enabled_with_permission('launchpad.Edit')
144 def configure_answers(self):
145- text = 'Configure support tracker'
146+ text = 'Configure Answers'
147 summary = 'Allow users to ask questions on this project'
148 return Link('+configure-answers', text, summary, icon='edit')
149
150 @enabled_with_permission('launchpad.Edit')
151 def configure_blueprints(self):
152- text = 'Configure blueprints'
153+ text = 'Configure Blueprints'
154 summary = 'Enable tracking of feature planning.'
155 return Link('+configure-blueprints', text, summary, icon='edit')
156
157
158=== modified file 'lib/lp/registry/stories/product/xx-product-development-focus.txt'
159--- lib/lp/registry/stories/product/xx-product-development-focus.txt 2012-11-08 03:55:11 +0000
160+++ lib/lp/registry/stories/product/xx-product-development-focus.txt 2015-06-15 05:29:16 +0000
161@@ -73,14 +73,14 @@
162 Change details
163 (http://launchpad.dev/fooix/+edit)
164 >>> print_involvement_portlet(owner_browser)
165- Configure bug tracker
166+ Code
167+ http://launchpad.dev/fooix/trunk/+setbranch
168+ Bugs
169 http://launchpad.dev/fooix/+configure-bugtracker
170- Configure support tracker
171+ Translations
172+ http://launchpad.dev/fooix/+configure-translations
173+ Answers
174 http://launchpad.dev/fooix/+configure-answers
175- Configure translations
176- http://launchpad.dev/fooix/+configure-translations
177- Configure project branch
178- http://launchpad.dev/fooix/trunk/+setbranch
179
180 The owner can specify the development focus branch from the overview page.
181
182
183=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations.txt'
184--- lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2014-11-24 09:16:35 +0000
185+++ lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2015-06-15 05:29:16 +0000
186@@ -181,11 +181,11 @@
187 Launchpad allows communities to translate projects using
188 imports or a branch.
189 Getting started with translating your project in Launchpad
190- Configure translations
191+ Configure Translations
192
193 The notice links to the page for configuring translations on the project.
194
195- >>> owner_browser.getLink('Configure translations').click()
196+ >>> owner_browser.getLink('Translations', index=1).click()
197 >>> print owner_browser.url
198 http://.../bazaar/+configure-translations
199
200@@ -204,7 +204,7 @@
201 Launchpad allows communities to translate projects using
202 imports or a branch.
203 Getting started with translating your project in Launchpad
204- Configure translations
205+ Configure Translations
206
207 A Translations admin who is neither a Launchpad admin nor the project
208 owner (and so won't be able to change the project's settings) sees the
209
210=== modified file 'lib/lp/translations/stories/standalone/xx-product-translations.txt'
211--- lib/lp/translations/stories/standalone/xx-product-translations.txt 2014-11-27 22:13:36 +0000
212+++ lib/lp/translations/stories/standalone/xx-product-translations.txt 2015-06-15 05:29:16 +0000
213@@ -53,7 +53,7 @@
214 Launchpad allows communities to translate projects using imports or a
215 branch.
216 Getting started with translating your project in Launchpad
217- Configure translations
218+ Configure Translations
219
220 >>> registrant.getLink(
221 ... url=('/gnomebaker/trunk/'
222@@ -64,7 +64,7 @@
223 configuration page, where they can configure the project to use
224 Launchpad for translations if desired.
225
226- >>> registrant.getLink('Configure translations').click()
227+ >>> registrant.getLink('Translations').click()
228 >>> print registrant.url
229 http://.../gnomebaker/+configure-translations
230
231@@ -133,7 +133,7 @@
232 If the netapplet project is updated to use Launchpad for translations...
233
234 >>> admin_browser.open('http://launchpad.dev/netapplet')
235- >>> admin_browser.getLink('Configure translations').click()
236+ >>> admin_browser.getLink('Translations', index=1).click()
237 >>> print_radio_button_field(admin_browser.contents, "translations_usage")
238 (*) Unknown
239 ( ) Launchpad
240@@ -144,9 +144,9 @@
241
242 ...there are no longer any obsolete entries.
243
244- >>> admin_browser.getLink('Translations').click()
245+ >>> admin_browser.getLink('Translations', index=1).click()
246 >>> print admin_browser.title
247- Translations : NetApplet
248+ Configure translations : Translations : NetApplet
249 >>> print find_tag_by_id(admin_browser.contents,
250 ... 'portlet-obsolete-translatable-series')
251 None
252@@ -230,5 +230,5 @@
253 >>> notice = first_tag_by_class(admin_browser.contents, 'notice')
254 >>> print extract_text(notice)
255 Getting started with translating your project in Launchpad
256- Configure translations
257+ Configure Translations
258 There are no translations for this project.
259
260=== modified file 'lib/lp/translations/stories/translationfocus/xx-product-translationfocus.txt'
261--- lib/lp/translations/stories/translationfocus/xx-product-translationfocus.txt 2011-12-08 18:47:23 +0000
262+++ lib/lp/translations/stories/translationfocus/xx-product-translationfocus.txt 2015-06-15 05:29:16 +0000
263@@ -18,7 +18,7 @@
264 >>> print extract_text(
265 ... find_tags_by_class(admin_browser.contents,
266 ... 'menu-link-configure_translations')[0])
267- Configure translations
268+ Configure Translations
269
270 >>> browser.open(fooproject_url)
271 >>> print extract_text(
272
273=== modified file 'lib/lp/translations/stories/translationgroups/xx-change-translation-policy.txt'
274--- lib/lp/translations/stories/translationgroups/xx-change-translation-policy.txt 2012-01-15 13:32:27 +0000
275+++ lib/lp/translations/stories/translationgroups/xx-change-translation-policy.txt 2015-06-15 05:29:16 +0000
276@@ -23,13 +23,13 @@
277
278 >>> re_browser.open(
279 ... 'http://translations.launchpad.dev/chestii')
280- >>> re_browser.getLink('Configure translations').click()
281+ >>> re_browser.getLink('Configure Translations').click()
282 >>> print re_browser.url
283 http://translations.launchpad.dev/chestii/+configure-translations
284
285 >>> po_browser.open(
286 ... 'http://translations.launchpad.dev/chestii')
287- >>> po_browser.getLink('Configure translations').click()
288+ >>> po_browser.getLink('Configure Translations').click()
289 >>> print po_browser.url
290 http://translations.launchpad.dev/chestii/+configure-translations
291
292@@ -57,7 +57,7 @@
293
294 >>> dtc_browser.open(
295 ... 'http://translations.launchpad.dev/chestii')
296- >>> dtc_browser.getLink('Configure translations')
297+ >>> dtc_browser.getLink('Configure Translations')
298 Traceback (most recent call last):
299 ...
300 LinkNotFoundError...
301
302=== modified file 'lib/lp/translations/stories/translationgroups/xx-translationgroups.txt'
303--- lib/lp/translations/stories/translationgroups/xx-translationgroups.txt 2014-02-19 02:11:16 +0000
304+++ lib/lp/translations/stories/translationgroups/xx-translationgroups.txt 2015-06-15 05:29:16 +0000
305@@ -263,7 +263,7 @@
306 Other users cannot access this page, nor see the menu link to it.
307
308 >>> user_browser.open(anon_browser.url)
309- >>> user_browser.getLink('Configure translations').click()
310+ >>> user_browser.getLink('Configure Translations').click()
311 Traceback (most recent call last):
312 ...
313 LinkNotFoundError
314@@ -315,7 +315,7 @@
315 ... auth='Basic test@canonical.com:test')
316 >>> netapplet_owner_browser.open('http://launchpad.dev/netapplet')
317 >>> netapplet_owner_browser.getLink(
318- ... 'Configure translations').click()
319+ ... 'Translations', index=1).click()
320 >>> print netapplet_owner_browser.title
321 Configure translations : Translations : NetApplet
322
323@@ -341,7 +341,7 @@
324 group and permissions.
325
326 >>> translations_page_url = netapplet_owner_browser.url
327- >>> netapplet_owner_browser.getLink('Configure translations').click()
328+ >>> netapplet_owner_browser.getLink('Configure Translations').click()
329 >>> change_translators_url = netapplet_owner_browser.url
330
331 >>> print netapplet_owner_browser.title
332@@ -356,11 +356,11 @@
333 ... 'Translation group').displayValue
334 ['(nothing selected)']
335
336-Ordinary users cannot see the "Configure translations" link or the page it
337+Ordinary users cannot see the "Configure Translations" link or the page it
338 leads to.
339
340 >>> user_browser.open(translations_page_url)
341- >>> user_browser.getLink('Configure translations').click()
342+ >>> user_browser.getLink('Configure Translations').click()
343 Traceback (most recent call last):
344 ...
345 LinkNotFoundError
346@@ -1001,7 +1001,7 @@
347 First, we verify that netapplet is using Launchpad Translations.
348
349 >>> admin_browser.open('http://launchpad.dev/netapplet')
350- >>> admin_browser.getLink('Configure translations').click()
351+ >>> admin_browser.getLink('Translations', index=1).click()
352 >>> print_radio_button_field(admin_browser.contents, "translations_usage")
353 ( ) Unknown
354 (*) Launchpad
355@@ -1015,7 +1015,7 @@
356 as the translation group for the netapplet product...
357
358 >>> admin_browser.getLink('Translations').click()
359- >>> admin_browser.getLink('Configure translations').click()
360+ >>> admin_browser.getLink('Configure Translations').click()
361 >>> admin_browser.getControl('Translation group').displayOptions
362 ['(nothing selected)', 'Single-language Translators',
363 'The PolyGlot Translation Group', 'Just a testing team']