Bug #7859

Fixed translations are discarded

Added by frosch over 3 years ago. Updated over 3 years ago.

Status:NewStart date:2015-12-13
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Example:

Base language 1 (ancient): Foo {STRING}
Base language 2 (old): Foo
Base language 3 (current): Foo {STRING}

Translation 1 (ancient): Bar {STRING}
Translation 2 (current): Bar
Translation 3 (newly entered): Bar {STRING}

Translation 3 "Bar {STRING}" is ignored on submission, because it matches the latest translation for base "Foo {STRING}".
Translation 2 "Bar" remains latest translations.

Replacing

case_chgs = data.get_all_changes(lng.changes.get(sname), lng.case, bchg)

with

case_chgs = data.get_all_changes(lng.changes.get(sname), lng.case, None)

in string_edit.py seems to fix it.

History

#1 Updated by frosch over 3 years ago

Apparently this fix opens a codepath to updating outdated strings, which seems to have been unreachable before.

However, the stuff around

if state == data.OUT_OF_DATE:

does not actually save the update. It misses at least a
lng.set_modified()

However, the

if trl_chg.base_text == bchg.base_text: # And also the latest base language!

looks weird as well.

Also available in: Atom PDF