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

Unable to load external translation file

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Sprint:
      Qt Installer Sprint 60

      Description

      Hello, I'm trying to add additional language support to an installer built by QtIFW, and I'm running out of ideas on what to try.
      I've got sample (unfinished translation to Czech), and I've tried following:
      a) Adding to config.xml

      <Translations>
        <Translation>qt_cs.qm</Translation>
        <Translation>ifw_cs.qm</Translation>
      </Translations>

      (That doesn't seem to work at all.)

      b) Using extra resource file and passing it to the binarycreator with -r
      Used command:

      /C/Qt/Tools/QtInstallerFramework/4.2/bin/binarycreator.exe -c win64/config/config.xml -p win64/packages -t /C/Qt/Tools/QtInstallerFramework/4.2/bin/installerbase.exe -r win64/config/translations.qrc installer.exe

      Content of translations.qrc:

      <RCC>
      <qresource prefix="/translations">
      <file>qt_cs.qm</file>
      <file>ifw_cs.qm</file>
      <file>qt_en.qm</file>
      <file>ifw_en.qm</file>
      </qresource>
      <qresource prefix="/translations_new">
      <file>qt_cs.qm</file>
      <file>ifw_cs.qm</file>
      <file>qt_en.qm</file>
      <file>ifw_en.qm</file>
      </qresource>
      </RCC>

      In this case, if I view created installer with binary editor, I can see the occurences of translated strings, but the translation won't load.
      Additionaly, when I view output of installer with -d -d

      ./installer.exe -d -d:

      $ ./installer.exe -d -d
      IFW Version: 4.2.0, built with Qt 5.12.11.
      Build date: Nov 5 2021
      Installer Framework SHA1: e0b1a21917d052919bfda6f49980a6a7afd3998b
      [0] Arguments: C:\Users\Roman\Desktop\installer.exe, -d, -d
      [0] Resource tree:
      [0] :/translations
      [0] :/translations/ifw_zh_CN.qm
      [0] :/translations/ifw_pt_BR.qm
      [0] :/translations/qt_ar.qm
      [0] :/translations/qt_ca.qm
      [0] :/translations/qt_da.qm
      [0] :/translations/qt_de.qm
      [0] :/translations/qt_en.qm
      [0] :/translations/qt_es.qm
      [0] :/translations/qt_fr.qm
      [0] :/translations/qt_ja.qm
      [0] :/translations/qt_it.qm
      [0] :/translations/qt_pl.qm
      [0] :/translations/qt_pt.qm
      [0] :/translations/qt_ru.qm
      [0] :/translations/qt_pt_BR.qm
      [0] :/translations/ifw_ar.qm
      [0] :/translations/ifw_ca.qm
      [0] :/translations/ifw_de.qm
      [0] :/translations/ifw_da.qm
      [0] :/translations/ifw_es.qm
      [0] :/translations/ifw_en.qm
      [0] :/translations/ifw_fr.qm
      [0] :/translations/ifw_it.qm
      [0] :/translations/ifw_ja.qm
      [0] :/translations/ifw_pl.qm
      [0] :/translations/ifw_pt.qm
      [0] :/translations/ifw_ru.qm
      [0] :/translations/qt_zh_CN.qm
      [0] :/uninstall.png
      [0] :/installer.png
      [0] :/installer.ico
      [0] :/keepinstalled.png
      [0] :/installer.icns
      [0] :/install.png
      [0] :/keepuninstalled.png
      [1] :/qgradient
      [1] :/qgradient/webgradients.binaryjson
      [14] Operations sanity check succeeded.
      [20] Language: cs-CZ
      [322] Received install command:
      [323] AvailableVersion: 0.7.11
      [324] Package already installed, but integrity check failed..uninstalling old package first..
      [324] Shutting down the application
      [338] Using maintenance tool located at:
      [338] Waiting for uninstall..
      [339] Loaded control script ":/metadata/installer-config/controlscript_qs.qs"
      [339] Using control script: ":/metadata/installer-config/controlscript_qs.qs"
      [349] Control script callback "IntroductionPageCallback" does not exist.

       

      The bundled resources are missing in the output.
      Are there any other requirements for loading translation?

        Attachments

        1. ifw_cs.qm
          0.6 kB
        2. qt_cs.qm
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            arttu.tarkiainen Arttu Tarkiainen
            Reporter:
            formatsh Roman Došek
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes