Exports and diverged messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Jeroen T. Vermeulen |
Bug Description
It looks to me as if we may be including diverged TranslationMessages in translation exports where they shouldn't be included.
The POExport view joins a TranslationMessage to all POTemplates that use its POTMsgSet. It keeps a separate "diverged" FK to TranslationMess
Next, POFile._getMessages (which processes the rows from POExport) properly gives precedence to diverged messages over shared ones—but doesn't check that they are diverged to the current POTemplate rather than to some other POTemplate that it shares with.
We could solve this in at least three ways:
1. In the view: "WHERE diverged IS NULL OR diverged = potemplate." May make the SQL slower but will also return fewer rows, which is good.
2. In POFile.
if row.diverged == row.potemplate:
elif row.diverged is None:
# This message is shared.
if msg_key in diverged_messages:
else:
# This diverged message belongs to a different template.
continue
3. In VPOExport: replace get_pofile_rows and get_pofile_
I'd prefer solution 3 in the end, but 1 or 2 are easier short-term fixes.
description: | updated |
description: | updated |
summary: |
- Language packs and diverged messages + Exports and diverged messages |
description: | updated |
Changed in rosetta: | |
importance: | Undecided → High |
milestone: | none → 2.2.7 |
status: | New → Triaged |
tags: | added: message-sharing |
Changed in rosetta: | |
status: | Triaged → In Progress |
assignee: | nobody → Jeroen T. Vermeulen (jtv) |
Changed in rosetta: | |
status: | Fix Committed → Fix Released |
(When fixing this, have a look at bug 393765 also).