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

Qt Linguist requires to be restarted to correctly display the updated source code information

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.1
    • Tools: Linguist
    • None
    • Windows

    Description

      <Issue>

      This issue is related to https://bugreports.qt.io/browse/QTBUG-128603.

      In QTBUG-128603, it was revealed that opening the updated .ts file while the previous version of it is being opened in Qt Linguist doesn't update the content in the Qt Linguist UI.

      To workaround this, I tried closing the currently-opened .ts file and open the updated .ts there.

      However, although the "source text" area was updated, the "source and form" area wasn't updated. 

      To correctly update the "source and form" area, a user has to close Qt Linguist, reopen it, then open the updated .ts file there.

       

      <Reproduction Step>
      *The steps from (1) to (6) are the same as the steps in QTBUG-128603.

      (1) Clone https://git.qt.io/mikio_hirai/multi-language-blog/-/tree/master?ref_type=heads

      C:\work\i18n_test\repro>git clone git@git.qt.io:mikio_hirai/multi-language-blog.git

      (2) Checkout to 1d71cfa 

      C:\work\i18n_test\repro\multi-language-blog>git checkout 1d71cfa 

      (3) Run lupdate

      C:\work\i18n_test\repro\multi-language-blog>C:\Qt\6.7.1\msvc2019_64\bin\lupdate.exe . -extensions qml -ts i18n/qml_initial_ja_JP.ts
      Scanning directory '.'...
      Updating 'i18n/qml_initial_ja_JP.ts'...
          Found 2 source text(s) (2 new and 0 already existing) 

      (4) Open the generated qml_initial_ja_JP.ts in Qt Linguist (Qt 6.7.1 msvc2019)
      (5) Update the Main.qml with the attached Main.qml

      (6) Run lupdate again to update the qml_initial_ja_JP.ts.

      C:\work\i18n_test\repro\multi-language-blog>C:\Qt\6.7.1\msvc2019_64\bin\lupdate.exe . -extensions qml -ts i18n/qml_initial_ja_JP.ts
      Scanning directory '.'...
      Updating 'i18n/qml_initial_ja_JP.ts'...
          Found 4 source text(s) (2 new and 2 already existing) 

      (7) In Qt Linguist, close the currently opened .ts file.

      (8) Then, open the updated .ts file in Qt Linguist.

      <Expected Result>
      Source and Form area also gets updated to the latest QML source code.

      <Actual Result>

      The Source and Form area doesn't get updated to the latest QML source code, although the Source Text area does.

       

      <Workaround>
      Close Qt Linguist and reopen it. Then, open the updated .ts file in Qt Linguist.

      Attachments

        1. image-2024-09-04-11-48-01-309.png
          166 kB
          Mikio Hirai
        2. image-2024-09-04-11-51-32-059.png
          142 kB
          Mikio Hirai
        3. Main.qml
          0.7 kB
          Mikio Hirai

        Issue Links

          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:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes