Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44362

Translator does not find strings with empty context if qm file was created with lrelease -compress

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.4.0
    • Core: Locales (i18n)
    • None

    Description

      Steps to reproduce:

      1. Build the attached test case.
      2. Create a .qm file from the .ts file contained in the test case with the command: lrelease -compress translate-test-case.ts -qm translate-test-case.qm
      3. Run the attached test case.

      Expected results:
      The translation is found and "xxStringxx" is shown in a message box.

      Actual results:
      The translation is not found and "" is shown in a message box.

      More information:

      Translation is found correctly if the .qm file is produced without the -compress switch. Also if one converts (using lconvert) the .qm file produced with the -compress switch back to a .ts file, the converted .ts file is equivalent to the original .ts file. That is, the translation is in the compressed .ts file, but for some reason translator cannot find it.

      This bug seems to be connected to an empty context because I could reproduce this with different sourceText and disambiguation values as long as the context parameter was empty.

      Attachments

        1. qtbug44362.zip
          1 kB
          Lasse Liehu

        Issue Links

          Activity

            People

              kkohne Kai Köhne
              lliehu Lasse Liehu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: