Uploaded image for project: 'XWiki Infrastructure'
  1. XWiki Infrastructure
  2. XINFRA-438

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • l10n.xwiki.org
    • None
    • Unknown

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            surli Simon Urli
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: