Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-392

Translation of custom pages (.ui files) does not work

XMLWordPrintable

    • Qt Installer Sprint 25

      I set up a Qt Installer project and added a custom page and a installer qs script. this part works fine. now I added a translation for the UI file, for example, I have a button with the text "Click me" and I want to add a german translation to "Klicke mich".

      first, i created a TS file:
      lupdate mypage.ui -ts de_de.ts
      I wrote the translations with the linguist and set the fileproperties to "German/Germany". next, I created the qm file:
      lrelease de_de.ts -qm de_de.qm
      the qm file is located in the packages/mypackage/meta directory, in the package.xml file, I added

      <Translations>
      <Translation>de_de.qm</Translation>
      </Translations>

      the binarycreator with -v options shows that the file is copied successful into the installer. If I run the resulting install file, the UI is not translated. Other translations from the xml file are translated correctly, for example:

      <Description>My Application</Description>
      <Description xml:lang="de_de">Mein Programm</Description>

      If I use the UI file in a standard Qt Project and load the qm translation, it works, so the ui and the translation should be correct.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kamartti Katja Marttila
            wojo Markus B
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes