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

lupdate fail to parse custom tr function alias

XMLWordPrintable

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

      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)
      
      

        For Gerrit Dashboard: QTBUG-67278
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes