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

qt_add_translations: TS_FILE_DIR is ignored when PLURALS_TS_FILE set

    XMLWordPrintable

Details

    • 31e87f085 (dev), 4d4b4cdc0 (6.8), 0da163a56 (6.7)

    Description

      By default, the qt_add_translations command creates the .ts files in the CMAKE_CURRENT_SOURCE_DIR, i.e. the project's source directory. This location can be changed by passing a different directory to the TS_FILE_DIR argument.

      When specifying the plurals-only .ts file for the source language with PLURALS_TS_FILE, if the TS_FILE_DIR argument is set, then the qt_add_translations() command ignores the specified directory and generates the plurals .ts file in the project's source directory. For example,

      qt_add_translations(
        apptranslations_plurals
        TS_FILE_DIR
        translations
        PLURALS_TS_FILE # Ignores the set TS_FILE_DIR directory
        translations_plurals_en.ts)
      

      In order to generate the plurals .ts file in the same directory set by TS_FILE_DIR, the directory needs to be specified explicitly in the PLURALS_TS_FILE argument. For example,

      qt_add_translations(
        apptranslations_plurals
        TS_FILE_DIR
        translations
        PLURALS_TS_FILE  
        translations/translations_plurals_en.ts)
      

      To reproduce issue, build attached project with update_translations.

      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
              lysandra.sola Lysandra Sola
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes