Make remove_translations side aware.
Bug #705652 reported by
Henning Eggers
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Abel Deuring |
Bug Description
The script in lib/lp/
Related branches
lp:~adeuring/launchpad/bug-705652
- Jeroen T. Vermeulen (community): Approve (code)
-
Diff: 162 lines (+74/-11)3 files modifiedlib/lp/translations/doc/remove-translations-by.txt (+6/-0)
lib/lp/translations/scripts/remove_translations.py (+43/-4)
lib/lp/translations/scripts/tests/test_remove_translations.py (+25/-7)
Changed in launchpad: | |
assignee: | nobody → Abel Deuring (adeuring) |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I discussed this with Danilo yesterday. Our conclusion:
In its current state, the script "substitutes" a deleted message if deleted_ message. is_current_ ubuntu == True, and if another message exists for the same potemplate and same language where other_message. is_current_ upstream == True. (Where "same potemplate" means that both message.potemplate IS NULL for both messages or deleted_ message. potemplate= =replacement_ message. potemplate) .
If such a message exists, its is_current_ubuntu flag will be set to True.
For all other cases, like deleting a message where is_current_upstream == True, or deleting a diverged message which is current in Ubuntu and where a shared message being current in Ubuntu exists, are not handled.
This _could_ probably be extended so that the deletion of a current message works more like an "undo" feature (based on the date_reviewed value of other translation messages for the same POTMsgSet and language).
But since the srcipt is used so rarely, it is not worth the implementation effort.
It might make sense though to report in the script which of the deleted messages had the flags is_current_ (ubuntu| upstream) set. After all, this means that some POTMsgSets are suddenly untranslated.