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

lupdate fail to parse custom tr function alias

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.0 Beta 4
    • 5.10.1
    • Tools: Linguist
    • None

    Description

      I use a custom translate function from a singleton object in qml with the following syntax in the main.qml:

      import Translator 1.0
      
      Text {
      
         text: CustomTranslator.tr("xxx")
      
      }
      
      

      To generate TS files I do :
       

      lupdate main.qml -ts fr.ts -tr-function-alias qsTr=CustomTranslator.tr
      
      

      Unfortunately the parser do not catch any translations.

      The dotted notation seems to be an issue

      Output is:

      Updating 'fr.ts'...
          Found 0 source text(s) (0 new and 0 already existing)
      
      

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            x-krys Christopher Courtois
            Votes:
            9 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes