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

Allow to embed translated .qm file dynamically in resources

    XMLWordPrintable

Details

    Description

      Support embedding translations (.qm files) into binaries.

      This is possible with qmake:

      CONFIG += embed_translations
      
      TRANSLATIONS += app_de.ts
      

      We should allow the same functionality with CMake.

      Following snippet comes close:

      set(TS_FILES tra_de.ts)
      // [...]
      qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
      qt6_add_resources(mytarget "mytarget" PREFIX "i18n" FILES ${QM_FILES})
      

      Anyhow, the $QM_FILES contain an absolute path, which seems to be embedded as file name in the generated resource file.

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              kkohne Kai Köhne
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes