Merge lp:~danilo/launchpad/bug-669831 into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Gavin Panella on 2010-11-18 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 11953 | ||||
| Proposed branch: | lp:~danilo/launchpad/bug-669831 | ||||
| Merge into: | lp:launchpad | ||||
| Prerequisite: | lp:~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:~danilo/launchpad/bug-669831 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gavin Panella (community) | 2010-11-18 | Approve on 2010-11-18 | |
|
Review via email:
|
|||
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.
