Merge lp:~jtv/launchpad/bug-664327 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gavin Panella | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11780 | ||||
Proposed branch: | lp:~jtv/launchpad/bug-664327 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
178 lines (+67/-13) 4 files modified
lib/canonical/launchpad/interfaces/_schema_circular_imports.py (+9/-0) lib/lp/translations/interfaces/translationimportqueue.py (+18/-4) lib/lp/translations/model/translationimportqueue.py (+4/-4) lib/lp/translations/stories/webservice/xx-translationimportqueue.txt (+36/-5) |
||||
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-664327 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | code | Approve | |
Review via email: mp+39036@code.launchpad.net |
Commit message
API: IHasTranslation
Description of the change
= Bug 664327 =
David, the Ubuntu translations man, has asked us for this new bit of functionality on the web service API: "get the translations import queue for a specific distribution, distroseries, or source package." This will allow him to get more done without bothering us developers, and without us developers bothering the LOSAs. So it's all in a good cause.
We were already exporting a method that could do this: ITranslationsIm
Instead, we chose to export a method that's already on the distribution, distroseries, source package etc. (and in an interface that's already exported for other reasons) called IHasTranslation
A quick test verifies its presence on the API. To run it:
{{{
./bin/test -vvc lp.translations -t "webservice.
}}}
For Q/A, it will be fun to explore some import queues for existing translation targets.
No lint,
Jeroen
Looks good, +1
[1]
+ @operation_ parameters( status= Choice( RosettaImportSt atus.items,
+ import_
+ title=_("Status"),
+ description=_("Show only entries with this status"),
+ values=
+ required=False),
I think you can use vocabulary= RosettaImportSt atus instead of values.
[2]
+ >>> print target_ queue[' entries' ][0]['path' ]
+ matching-entry.pot
Unless it's done elsewhere, it would be nice to document what is
returned by this method, rather than just a the path property of the
first entry.