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

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

      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.

        1. qtbug44362.zip
          1 kB
          Lasse Liehu
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes