Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. IFW translations in controller.qs
Qt 6.11 is out! See what's new in the release blog

IFW translations in controller.qs

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 1 Posters 288 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gargamel
    wrote on last edited by gargamel
    #1

    What is the correct way to make translations work in controller script?

    I am trying to translate custom abort text:

    Controller.prototype.TargetDirectoryPageCallback = function() {
         if (!checkOS()) {
            var msg = qsTr("Installation on %1 is not supported.");
            cancelInstaller(msg.replace("%1", systemInfo.prettyProductName));
            return;
        }
    }
    

    I have my .ts and .qm file in config directory, but it doesn't work.
    I've already tried to add qm file to <Translations> and resource.qrc file (as prefix="/translations_new" and prefix="/translations") without success..
    I didn't see it loaded using setup.exe -d -d command.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gargamel
      wrote on last edited by
      #2

      I've downloaded sources and now I know that it is not possible to add additional translations to ControlScript (via config.xml).
      Dev can only provide full translation files qt_lang.qm or ifw_lang.qm.

      I've moved my code to Component's script and handle it there, but it would be nice to set installer status to failed instead using custom variable through installer.setValue().

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved