1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
When editing translation group details, we could rename the translation
group.
>>> admin_browser.open(
... 'http://translations.launchpad.dev/+groups')
>>> print admin_browser.url
http://translations.launchpad.dev/+groups
We can see that the translation group that we are going to duplicate
exists already:
>>> print admin_browser.getLink('The PolyGlot Translation Group').url
http://translations.launchpad.dev/+groups/polyglot
Navigate to the one we are going to rename.
>>> admin_browser.getLink('Just a testing team').click()
>>> print admin_browser.url
http://translations.launchpad.dev/+groups/testing-translation-team
And select to edit its details.
>>> admin_browser.getLink('Change details').click()
>>> print admin_browser.url
http://translations.launchpad.dev/+groups/testing-translation-team/+edit
Change the name.
>>> admin_browser.getControl('Name').value = u'polyglot'
>>> admin_browser.getControl('Change').click()
The system detected that we tried to use an already existing name, so we
didn't move away from this form.
>>> print admin_browser.url
http://translations.launchpad.dev/+groups/testing-translation-team/+edit
>>> for tag in find_tags_by_class(admin_browser.contents, 'message'):
... print tag.renderContents()
There is 1 error.
There is already a translation group with this name
Choosing another name should work though.
>>> admin_browser.getControl('Name').value = u'renamed-group'
>>> admin_browser.getControl('Change').click()
>>> print admin_browser.url
http://translations.launchpad.dev/+groups/renamed-group
>>> for tag in find_tags_by_class(admin_browser.contents, 'message'):
... print tag.renderContents()
You can also edit the generic translation instructions for the team
>>> admin_browser.getLink('Change details').click()
>>> admin_browser.getControl('Translation instructions').value = (
... u'https://help.launchpad.net/Translations/RenamedGroup')
>>> admin_browser.getControl('Change').click()
|