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

lupdate's -extension option doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.7.1
    • Tools: Linguist
    • None
    • Windows
    • a0b6f2429 (dev), 50e6b4a61 (6.8), c60792eb1 (6.7)

    Description

      Issue: Running lupdate with -extension doesn't properly output .ts file.

      Below is first showing the project structure with dir /S and then runing the lupdate with -extension being qml, which results in not outputting a proper .ts file. The output test.ts is attached.

      C:\Users\81808\Downloads\UntitledProject1>dir /S
       Volume in drive C is Windows
       Volume Serial Number is 4071-65DA Directory of C:\Users\81808\Downloads\UntitledProject12024/07/19  15:49    <DIR>          .
      2024/07/19  15:48    <DIR>          ..
      2024/07/19  15:48    <DIR>          Generated
      2024/07/19  15:48               216 qtquickcontrols2.conf
      2024/07/19  15:49                78 test.ts
      2024/07/19  15:48            77,824 translations.db
      2024/07/19  15:48            32,768 translations.db-shm
      2024/07/19  15:48                 0 translations.db-wal
      2024/07/19  15:48    <DIR>          UntitledProject1
      2024/07/19  15:48             2,755 UntitledProject1.qmlproject
      2024/07/19  15:48    <DIR>          UntitledProject1Content
                     6 File(s)        113,641 bytes Directory of C:\Users\81808\Downloads\UntitledProject1\Generated2024/07/19  15:48    <DIR>          .
      2024/07/19  15:49    <DIR>          ..
      2024/07/19  15:48                89 Quick3DAssets.txt
                     1 File(s)             89 bytes Directory of C:\Users\81808\Downloads\UntitledProject1\UntitledProject12024/07/19  15:48    <DIR>          .
      2024/07/19  15:49    <DIR>          ..
      2024/07/19  15:48             1,044 Constants.qml
      2024/07/19  15:48    <DIR>          designer
      2024/07/19  15:48             1,101 DirectoryFontLoader.qml
      2024/07/19  15:48               363 EventListModel.qml
      2024/07/19  15:48               603 EventListSimulator.qml
      2024/07/19  15:48               199 qmldir
                     5 File(s)          3,310 bytes Directory of C:\Users\81808\Downloads\UntitledProject1\UntitledProject1\designer2024/07/19  15:48    <DIR>          .
      2024/07/19  15:48    <DIR>          ..
      2024/07/19  15:48               340 plugin.metainfo
                     1 File(s)            340 bytes Directory of C:\Users\81808\Downloads\UntitledProject1\UntitledProject1Content2024/07/19  15:48    <DIR>          .
      2024/07/19  15:49    <DIR>          ..
      2024/07/19  15:48               340 App.qml
      2024/07/19  15:48    <DIR>          fonts
      2024/07/19  15:48             1,933 Screen01.ui.qml
                     2 File(s)          2,273 bytes Directory of C:\Users\81808\Downloads\UntitledProject1\UntitledProject1Content\fonts2024/07/19  15:48    <DIR>          .
      2024/07/19  15:48    <DIR>          ..
      2024/07/19  15:48                48 fonts.txt
                     1 File(s)             48 bytes     Total Files Listed:
                    16 File(s)        119,701 bytes
                    17 Dir(s)  24,472,510,464 bytes free
      
      
      C:\Users\81808\Downloads\UntitledProject1>C:\Qt\6.7.1\msvc2019_64\bin\lupdate.exe -extensions qml -ts test.ts
      Updating 'test.ts'...
          Found 0 source text(s) (0 new and 0 already existing)C:\Users\81808\Downloads\UntitledProject1> 
      
      
      

      The target project is the default project made in Qt 4.51, which has Screen01.ui.qml containing some qsTrs. lupdate should've picked them up and put them into the generated .ts. The project is attached.

       

      Attachments

        1. image-2024-07-23-16-23-03-492.png
          image-2024-07-23-16-23-03-492.png
          11 kB
        2. test.ts
          0.1 kB
        3. test-1.ts
          1 kB
        4. UntitledProject1.zip
          9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkohne Kai Köhne
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes