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

Automatically merge translation files at build time

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • None

    Description

      Support automatic merging of .qm files at build time.

      Often translations of an application is split up in multiple .ts files . For instance the Qt libraries themselves do support translations for their user visible strings in a modular fashion.

      The traditional way to load these .qm files is by loading and registering multiple QTranslator objects, at runtime. Anyhow, this has some challenges:

      • You typically do want to load a consistent set of translations. Custom code is needed to handle situations where , for some language, only some .qm files exist.
      • Conflicting translations between .ts files are not detected.
      • macOS expects a list of supported languages as part of the app bundle metadata.

      It would be therefore better to semi-automatically merge translations at build time, for instance with the lconvert tool. Such a synthesized .qm file could then also be named so that the logic in QQmlApplication will automatically load it.

       

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              kkohne Kai Köhne
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes