Merge lp://qastaging/~danilo/launchpad/bug-669831 into lp://qastaging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gavin Panella | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11953 | ||||
Proposed branch: | lp://qastaging/~danilo/launchpad/bug-669831 | ||||
Merge into: | lp://qastaging/launchpad | ||||
Prerequisite: | lp://qastaging/~danilo/launchpad/bzr-export-pofile-gathering | ||||
Diff against target: |
53 lines (+22/-1) 3 files modified
lib/lp/translations/doc/translations-export-to-branch.txt (+2/-0) lib/lp/translations/scripts/tests/test_translations_to_branch.py (+18/-0) lib/lp/translations/scripts/translations_to_branch.py (+2/-1) |
||||
To merge this branch: | bzr merge lp://qastaging/~danilo/launchpad/bug-669831 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+41228@code.qastaging.launchpad.net |
Commit message
[r=allenap]
Description of the change
= Bug 669831 =
In our export translations to bzr branches feature, we optimize the export so as not to repeatedly export translation files (POFile objects) if they have not changed. However, it's possible that a PO file is changed (or at least needs to be re-exported) even if it was not directly changed: this happens if a new template has been imported (in i18n terminology, this is called "merging PO file with the template": Launchpad does this transparently and cheaply without having to change any data structures, but other tools depend on it happening explicitely, thus bug 669831 was filed).
When a new template is imported, POTemplate's date_last_updated attribute is updated. So, let's use that in addition to checking if POFile is directly changed to decide if a POFile needs exporting.
= Tests =
bin/test -cvvt translations_
= Demo & QA =
We'll have to set-up a translation for a project with translation export to bzr and then simply re-import the POTemplate and then do another translation export seeing how all PO files for the template are exported. Basically, just try it out.