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

lconvert do not keep beginning or ending spaces on plural form

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.6.0
    • 5.15, 6.4.2
    • Tools: Linguist
    • None
    • d8dad5d13 (dev)

    Description

      This is a edge case but I haven't found any workaround so I'm raising an issue.
      In my use case, we have the following sentence to translate: "Place %n boy(s) and %n girl(s) in the center. Then split %n pieces of candy equally between them."
      To handle correctly the plural forms, I have three separate strings:

      //~ singular Place %n boy 
      //~ plural Place %n boys 
      qsTr("Place %n boy(s) ", "First part of Place %n boy(s) and %n girl(s) in the center. Then split %n pieces of candy equally between them.", items.totalBoys)
      //~ singular and %n girl in the center. 
      //~ plural and %n girls in the center. 
      qsTr("and %n girl(s) in the center. ", "Second part of Place %n boy(s) and %n girl(s) in the center. Then split %n pieces of candy equally between them.", items.totalGirls)
      

      Note that there are spaces at the end of each sentence and in the singular/plural forms too.
      If I generate a ts file using lupdate -silent file.js -ts test.ts (test.js just being the lines above), the spaces are not written in the extra-plural and extra-singular values.

      Is there a way to fix it to allow an extra space at the end? I tried quoting the line but the quotes are also reported to the extra-plural and extra-singular values. The issue is the same if I try to put one more space at the beginning.

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            petitlapin Johnny Jazeix
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes