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

Two runs of lupdate are required if -pluralonly is used for the native language

    XMLWordPrintable

Details

    • All
    • 685037c07 (dev), ce6ed5a73 (dev), 3d691abe7 (6.6), dfd9939ad (6.6)

    Description

      This is more a conceptional problem than a bug.

      Qt's i18n documentation suggests to create a plural-only translation of the project's native language, see https://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals

      This requires to run lupdate with the -pluralonly argument for the native language and without that argument for all other languages:

      lupdate -pluralonly -ts myproject_en.ts ...
      lupdate -ts myproject_de.ts myproject_da.ts myproject_pl.ts ...
      

      That means the project's sources are scanned twice, doubling the time that's needed to update the .ts files.

      Possible solution:

      • specify plural-only .ts files on the command line with -pluralonly-ts myproject_en.ts
      • or somehow post-process an updated .ts file by removing the non-plural messages from there

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes