3
The translation focus of a project is the series chosen as the preferred
4
one to be translated. It's optional. When not set, Launchpad suggests
5
the development focus as the preferred series to translate, which is
6
outside the scope of this test.
8
>>> evolution = webservice.get('/evolution').jsonBody()
9
>>> print evolution['development_focus_link']
10
http://.../evolution/trunk
11
>>> print evolution['translation_focus_link']
14
It's possible to set the translation focus through the API
15
if you're an admin. The translation focus should be a project series.
17
>>> from simplejson import dumps
18
>>> print webservice.patch(
19
... evolution['self_link'], 'application/json',
20
... dumps({'translation_focus_link' :
21
... evolution['development_focus_link']}))
22
HTTP/1.1 209 Content Returned
25
>>> print webservice.get('/evolution').jsonBody()['translation_focus_link']
26
http://.../evolution/trunk
28
Unprivileged users cannot set the translation focus.
30
>>> print user_webservice.patch(
31
... evolution['self_link'], 'application/json',
32
... dumps({'translation_focus_link': None}))
33
HTTP... 401 Unauthorized