Merge lp:~henninge/launchpad/bug-720673-import-origin into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Henning Eggers |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12407 |
Proposed branch: | lp:~henninge/launchpad/bug-720673-import-origin |
Merge into: | lp:launchpad |
Diff against target: |
124 lines (+40/-9) 5 files modified
lib/lp/translations/doc/rosetta-karma.txt (+1/-4) lib/lp/translations/interfaces/potmsgset.py (+5/-1) lib/lp/translations/model/potmsgset.py (+9/-3) lib/lp/translations/tests/test_potmsgset.py (+23/-0) lib/lp/translations/utilities/translation_import.py (+2/-1) |
To merge this branch: | bzr merge lp:~henninge/launchpad/bug-720673-import-origin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+50157@code.launchpad.net |
Commit message
[r=abentley][bug=720673] Set origin correctly on imported TranslationMess
Description of the change
= Summary =
We had this great idea to simplify things in the import script by adding
translations first as a suggestion and then approving them if it verifies ok.
We missed the fact, though, that the suggest-approve mechanism was designed
for translations entered through the UI. So there behavior does not match
what the old import code did. I fixed a big part of that in the last branch
by introducing the "accept" methods as opposed to "approve". This branch now
deals with a little leftover in what submitSuggestion does differently. In
this case the difference is so little, though that I did not introduce a new
method but just added a parameter.
== Proposed fix ==
Add a parameter from_import to submitSuggestion to change it behavior as is
appropriate for imports, namely:
- set the origin to SCM (source code management)
- do not assign karma to the uploader.
We may have to rethink the karma story for uploads, maybe create its own
category.
== Pre-implementation notes ==
This is pretty obvious. ;-)
== Implementation details ==
Do you really need more detail?
== Tests ==
bin/test -vvcm lp.translations
== Demo and Q/A ==
Do an import and verify through a database query that the origin is set
correctly. It is not exposed in the UI.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/