This branch fixes bug 422056, adding a way to set translation focus of a product, as we can do with distributions.
== Proposed fix ==
Adding a field with all series of a project on its +changetranslators page.
== Implementation details ==
The implementation is simple: I've added the translation_focus field in product model and interface, and changed the primary_translatable to choose translation_focus if available (and translatable).
A) Choosing non-translatable series as translation focus:
1) Go to the translations page of the project, https://translations.launchpad.dev/alsa-utils
2) As an admin user, you'll see the Change permissions option, choose it: https://translations.launchpad.dev/alsa-utils/+changetranslators
3) Choose the series you just added, and save it
Result: You should notice the message in the project translations page saying "Launchpad currently recommends translating alsa-utils trunk series", which means that it chose the development focus series because the one chosen as translation focus isn't translatable.
B) Choosing translatable series as translation focus:
1) Add information to the series you added so it becomes translatable
Result: You should notice the message in the project translations page saying "Launchpad currently recommends translating <the series you added>", which means that it chose the translation focus now that it's a translatable series.
C) Choosing no translation focus at all:
1) Choose no series as translation focus
Result: You should notice that it will recommend to translate the development focus.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
= Summary =
This branch fixes bug 422056, adding a way to set translation focus of a product, as we can do with distributions.
== Proposed fix ==
Adding a field with all series of a project on its +changetranslators page.
== Implementation details ==
The implementation is simple: I've added the translation_focus field in product model and interface, and changed the primary_ translatable to choose translation_focus if available (and translatable).
== Tests ==
./bin/test -vvt lp.translations.*
./bin/test -vvt lp.registry.*
== Demo and Q/A ==
Preparing: /launchpad. dev/alsa- utils
1) Go to a project page, such as https:/
2) Add another series to the project
A) Choosing non-translatable series as translation focus: /translations. launchpad. dev/alsa- utils /translations. launchpad. dev/alsa- utils/+ changetranslato rs
1) Go to the translations page of the project, https:/
2) As an admin user, you'll see the Change permissions option, choose it: https:/
3) Choose the series you just added, and save it
Result: You should notice the message in the project translations page saying "Launchpad currently recommends translating alsa-utils trunk series", which means that it chose the development focus series because the one chosen as translation focus isn't translatable.
B) Choosing translatable series as translation focus:
1) Add information to the series you added so it becomes translatable
Result: You should notice the message in the project translations page saying "Launchpad currently recommends translating <the series you added>", which means that it chose the translation focus now that it's a translatable series.
C) Choosing no translation focus at all:
1) Choose no series as translation focus
Result: You should notice that it will recommend to translate the development focus.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ configure. zcml registry/ interfaces/ product. py registry/ stories/ webservice/ xx-project- registry. txt translations/ browser/ product. py registry/ model/product. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ interfaces/ product. py fields' (No module named restful) interface' (No module named restful) declarations' (No module named restful) createProduct] Operator not preceded by a space oject=' freshmeat_ project' , wikiurl='wiki_url', ='download_ url', project= 'sourceforge_ project' , lang='programmi ng_lang' ) factory_ operation( eproject' , 'programminglang', reviewed' , 'licenses', 'license_info', operation_ as('new_ project' ) owner, name, displayname, title, summary, =None, project=None, homepageurl=None, url=None, wikiurl=None, =None, freshmeatprojec t=None, project= None, programminglang =None, reviewed= False, mugshot=None, logo=None, None):
593: [C0301] Line too long (83/78)
34: [F0401] Unable to import 'lazr.enum' (No module named enum)
72: [F0401] Unable to import 'lazr.restful.
73: [F0401] Unable to import 'lazr.restful.
74: [F0401] Unable to import 'lazr.restful.
778: [C0322, IProductSet.
freshmeatpr
^
downloadurl
sourceforge
programming
@export_
IProduct, ['name', 'displayname', 'title', 'summary', 'description',
'project', 'homepageurl', 'screenshotsurl',
'downloadurl', 'freshmeatproject', 'wikiurl',
'sourceforg
'license_
'registrant'])
@export_
def createProduct(
description
screenshots
downloadurl
sourceforge
license_
icon=None, licenses=None, license_info=None,
registrant=
lib/lp/ registry/ model/product. py
28: [F0401] Unable to import 'lazr.delegates' (No module named delegates)