Merge lp:~abentley/launchpad/fix-undiverging into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 12390 |
Proposed branch: | lp:~abentley/launchpad/fix-undiverging |
Merge into: | lp:launchpad |
Diff against target: |
41 lines (+17/-3) 2 files modified
lib/lp/translations/model/potmsgset.py (+3/-3) lib/lp/translations/tests/test_potmsgset.py (+14/-0) |
To merge this branch: | bzr merge lp:~abentley/launchpad/fix-undiverging |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | code | Approve | |
Review via email: mp+49718@code.launchpad.net |
Commit message
[r=jtv][ui=none][bug=716586] Allow converging diverged translation
Description of the change
= Summary =
Fix bug #716586: Diverged translation cannot be converged again.
== Proposed fix ==
Fix faulty check for whether the specified translation is already current for the template.
== Pre-implementation notes ==
None
== Implementation details ==
Instead of checking the is_current_
== Tests ==
bin/test -v test_potmsgset -t approveExisting
== Demo and Q/A ==
Go to a translatable project, e.g. https:/
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
Thanks for fixing that—the mistake was mine!
A note about the test: there's a factory. makeDivergedTra nslationMessage for creating diverged messages.
About the fix itself: approveSuggestion could be used very intensively, so for performance it may be worth shortcutting the getCurrentTrans lation call (which queries the database) in cases where the message is diverged. In those cases, there's no chance of it being shadowed by another diverged message.