Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Linguist not showing ID in ID-based mode
Qt 6.11 is out! See what's new in the release blog

Linguist not showing ID in ID-based mode

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 5 Posters 1.2k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DialecticusD Offline
    DialecticusD Offline
    Dialecticus
    wrote on last edited by
    #1

    I want to used ID-based localization in my CMAKE project. If I just call qtTrId("id-example") the Linguist will show a rather useless line "? ? <header file>". If there are ten such lines I can't figure out what am I translating (unless I edit the file in some text editor). So I am forced to repeat the ID in the code:

    //: id-example
    QString e = qtTrId("id-example");
    

    Is there a way to make the Linguist show the ID? Why would Linguist hide this essential information? Qt is in version 6.6.3.

    1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • DialecticusD Offline
      DialecticusD Offline
      Dialecticus
      wrote on last edited by
      #2

      Two weeks passed without a response. Is this a known issue that gets asked all the time? Is there no way to see the ID in the Linguist?

      S 1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        A simple main.cpp with a qtTrId() works fine here.
        Please provide a minimal, compilable example of your problem.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • DialecticusD Dialecticus

          Two weeks passed without a response. Is this a known issue that gets asked all the time? Is there no way to see the ID in the Linguist?

          S Offline
          S Offline
          SimonSchroeder
          wrote on last edited by
          #4

          @Dialecticus said in Linguist not showing ID in ID-based mode:

          Two weeks passed without a response.

          I guess that a lot of people are not using id-based translations (I personally don't). Therefore, there are not many who can speak from experience.

          1 Reply Last reply
          0
          • DialecticusD Offline
            DialecticusD Offline
            Dialecticus
            wrote on last edited by
            #5

            So, I investigated the matter. I have LUPDATE_OPTIONS -locations none in CMakeLists.txt. I have to have it. The Linguist freezes if I click on any visual context. This is a known issue in Windows. But my question is not why I don't see the location of the resource. I don't care for location, hence the LUPDATE_OPTIONS option. The question is why I don't see the identifier of the resource.

            1 Reply Last reply
            0
            • joborJ Offline
              joborJ Offline
              jobor
              wrote on last edited by
              #6

              The translation ID is indeed not visible if locations are disabled. I've created https://bugreports.qt.io/browse/QTBUG-129392 to track this.

              The "Linguist hangs on Windows issue" (https://bugreports.qt.io/browse/QTBUG-127139) is fixed for 6.8.0, which will be released soon.

              Two workarounds for QTBUG-127139 come to mind:
              Remove the QtWebView via the installer or install a separate Qt build without this plugin (e.g., a MinGW build of Qt).

              Use Linguist from that QtWebView-less Qt and remove the -locations none option. Then you should see translation IDs in all their glory.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gongotar
                wrote on last edited by
                #7

                A fix for the visibility of translation IDs in Linguist is pushed to the version 6.8. If you upgrade your Linguist to 6.8, you should be able to see the translation IDs in Linguist.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved