bzr should do smarter merging of .po files
Bug #884270 reported by
Steve Langasek
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Vincent Ladeuil |
Bug Description
Today, if there are local Ubuntu translations or new UI strings added in an Ubuntu package, and updates happen to the translations in Debian, bzr merge-package does a very bad job of merging them. Fundamentally the reason for this is that .pot and .po files are stanza-based files, and bzr is using naive line-based merges of the files. This gives inferior results compared to an intelligent msgmerge for some things (such as fuzzy translations), and pathological results for others (such as modification date fields).
It would be splendid if bzr could intelligently merge .po files using msgmerge.
Related branches
lp:~vila/bzr/884270-merge-po
- Jelmer Vernooij (community): Approve
-
Diff: 826 lines (+750/-6)8 files modifiedbzrlib/merge.py (+9/-5)
bzrlib/plugins/po_merge/README (+7/-0)
bzrlib/plugins/po_merge/__init__.py (+113/-0)
bzrlib/plugins/po_merge/po_merge.py (+141/-0)
bzrlib/plugins/po_merge/tests/__init__.py (+23/-0)
bzrlib/plugins/po_merge/tests/test_po_merge.py (+451/-0)
bzrlib/tests/features.py (+2/-1)
doc/en/release-notes/bzr-2.5.txt (+4/-0)
affects: | udd → bzr |
Changed in bzr: | |
milestone: | none → 2.5b4 |
status: | In Progress → Fix Released |
To post a comment you must log in.
Attached is the horrible script I currently use locally to resolve .po and .pot file conflicts when doing package merges. It should be noted that 'make' is a very poor heuristic for handling the .pot file regeneration; in particular, any debian/ po/templates. pot files should be regenerated instead using debconf-updatepo with appropriate options. And making bzr merge call 'make' is in general fairly horrid. :)