This issue has been created
 
 
XWiki Infrastructure / cid:jira-generated-image-avatar-292a90ec-c46a-42a4-860f-bb6012ea320d XINFRA-438 Open

Modifying a source translation automatically creates translation with old source in languages

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-99fd6c08-b552-4dc7-aa33-1d60a805d8b8 Simon Urli created this issue on 03/Oct/25 15:45
 
Summary: Modifying a source translation automatically creates translation with old source in languages
Issue Type: cid:jira-generated-image-avatar-292a90ec-c46a-42a4-860f-bb6012ea320d Bug
Assignee: Unassigned
Components: l10n.xwiki.org
Created: 03/Oct/25 15:45
Priority: cid:jira-generated-image-static-major-9302a326-ad05-4ed3-a177-e45e32276460 Major
Reporter: Simon Urli
Description:

Let's take the following scenario:
a source translation contains the following key/value: foo=My source translation. The component is translated in multiple languages in weblate, but this key/value is not translated, so it appears like this in the translation files:

### Missing: foo=My source translation

In the wiki, when using those languages, if foo needs to be displayed then My source translation appears, using the fallback on the source translation.

Later on, someone edits the source translation and transforms the key/value like this: foo=My new source translation.

What's expected here, is that the translation file should either not be modified at all, or should be modified to contain:

### Missing: foo=My new source translation

And when using those languages, if foo needs to be displayed then My new source translation should be displayed, still using the fallback.

What's happening right now, is that when the new source is added, Weblate serialize the translation files and it's comparing the translation values with the source translation value to know whether it should serialize as missing or not, and the problem is that it uses the old source translation value for it. So it considers that 1. the translation files are using a translation, 2. this translation is the old source translation value. As a result, the output in translation file is:

 foo=My source translation

So exactly what was in the old source translation. The problem is that the fallback is now incorrect and for the maintainer it gives a wrong feeling that the key is badly translated where it's just never been translated.