Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. cmake: "cannot find *.ts file"
Forum Updated to NodeBB v4.3 + New Features

cmake: "cannot find *.ts file"

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 1.6k Views 2 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.
  • P Offline
    P Offline
    posktomten
    wrote on 5 Dec 2022, 17:46 last edited by
    #1

    Hey! I want to be able to update the *.ts files from Qt Creator.

    find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS LinguistTools Gui Network Xml)
    
    qt_add_lupdate(streamcapture2 TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/_streamcapture2_template_xx_XX.ts)
    

    lupdate starts (from qt creator) but can't find the language file.

    Starting external tool "/opt/Qt/6.4.1/gcc_64/bin/lupdate /home/ingemar/PROGRAMMERING/streamcapture2/code/CMakeLists.txt"
    lupdate warning: no TS files specified. Only diagnostics will be produced.
    

    I've gotten most things to work with cmake, but the translations are awkward. Been working with qmake since version Qt3!

    posktomten

    K 1 Reply Last reply 6 Dec 2022, 09:07
    0
    • P posktomten
      5 Dec 2022, 17:46

      Hey! I want to be able to update the *.ts files from Qt Creator.

      find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS LinguistTools Gui Network Xml)
      
      qt_add_lupdate(streamcapture2 TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/_streamcapture2_template_xx_XX.ts)
      

      lupdate starts (from qt creator) but can't find the language file.

      Starting external tool "/opt/Qt/6.4.1/gcc_64/bin/lupdate /home/ingemar/PROGRAMMERING/streamcapture2/code/CMakeLists.txt"
      lupdate warning: no TS files specified. Only diagnostics will be produced.
      

      I've gotten most things to work with cmake, but the translations are awkward. Been working with qmake since version Qt3!

      K Offline
      K Offline
      kkoehne
      Moderators
      wrote on 6 Dec 2022, 09:07 last edited by
      #3

      @posktomten said in cmake: "cannot find *.ts file":

      lupdate starts (from qt creator) but can't find the language file.

      Don't run lupdate as an external tool, from Qt Creator menu. Instead, run the 'update_translations' build system target. See also https://bugreports.qt.io/browse/QTCREATORBUG-28467

      Director R&D, The Qt Company

      P 1 Reply Last reply 6 Dec 2022, 09:31
      3
      • P Offline
        P Offline
        posktomten
        wrote on 5 Dec 2022, 19:38 last edited by posktomten 12 May 2022, 19:58
        #2

        I've been checking online all day. There seem to be a lot of divided opinions. Handling translations feels infinitely better with qmake!

        Printing from bash

        opt/Qt/6.4.1/gcc_64/bin/lupdate CMakeLists.txt 
        lupdate warning: no TS files specified. Only diagnostics will be produced.
        

        If you create a new project with Qt Creator (with the option to translate), it still doesn't work. Strange...
        Works with qmake.
        lupdate can't find files...
        Must be something I don't understand.

        posktomten

        1 Reply Last reply
        0
        • P posktomten
          5 Dec 2022, 17:46

          Hey! I want to be able to update the *.ts files from Qt Creator.

          find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS LinguistTools Gui Network Xml)
          
          qt_add_lupdate(streamcapture2 TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/_streamcapture2_template_xx_XX.ts)
          

          lupdate starts (from qt creator) but can't find the language file.

          Starting external tool "/opt/Qt/6.4.1/gcc_64/bin/lupdate /home/ingemar/PROGRAMMERING/streamcapture2/code/CMakeLists.txt"
          lupdate warning: no TS files specified. Only diagnostics will be produced.
          

          I've gotten most things to work with cmake, but the translations are awkward. Been working with qmake since version Qt3!

          K Offline
          K Offline
          kkoehne
          Moderators
          wrote on 6 Dec 2022, 09:07 last edited by
          #3

          @posktomten said in cmake: "cannot find *.ts file":

          lupdate starts (from qt creator) but can't find the language file.

          Don't run lupdate as an external tool, from Qt Creator menu. Instead, run the 'update_translations' build system target. See also https://bugreports.qt.io/browse/QTCREATORBUG-28467

          Director R&D, The Qt Company

          P 1 Reply Last reply 6 Dec 2022, 09:31
          3
          • K kkoehne
            6 Dec 2022, 09:07

            @posktomten said in cmake: "cannot find *.ts file":

            lupdate starts (from qt creator) but can't find the language file.

            Don't run lupdate as an external tool, from Qt Creator menu. Instead, run the 'update_translations' build system target. See also https://bugreports.qt.io/browse/QTCREATORBUG-28467

            P Offline
            P Offline
            posktomten
            wrote on 6 Dec 2022, 09:31 last edited by
            #4

            @kkoehne said in cmake: "cannot find *.ts file":

            update_translations' build system target

            Thank you very much!
            I'll test tonight.

            posktomten

            1 Reply Last reply
            0
            • P Offline
              P Offline
              posktomten
              wrote on 6 Dec 2022, 22:16 last edited by
              #5

              @kkoehne Many thanks! Works with Linux terminal!

              cmake --build . --target update_translations
              

              posktomten

              J 1 Reply Last reply 7 Dec 2022, 02:52
              0
              • P posktomten
                6 Dec 2022, 22:16

                @kkoehne Many thanks! Works with Linux terminal!

                cmake --build . --target update_translations
                
                J Offline
                J Offline
                JKSH
                Moderators
                wrote on 7 Dec 2022, 02:52 last edited by
                #6

                @posktomten said in cmake: "cannot find *.ts file":

                Works with Linux terminal!

                You can also select the target in Qt Creator: Go to your Build Settings, expand Build Steps > Details, tick the "update_translations" target, then build.

                See https://doc.qt.io/qtcreator/creator-build-settings.html

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                P 1 Reply Last reply 7 Dec 2022, 09:30
                0
                • J JKSH
                  7 Dec 2022, 02:52

                  @posktomten said in cmake: "cannot find *.ts file":

                  Works with Linux terminal!

                  You can also select the target in Qt Creator: Go to your Build Settings, expand Build Steps > Details, tick the "update_translations" target, then build.

                  See https://doc.qt.io/qtcreator/creator-build-settings.html

                  P Offline
                  P Offline
                  posktomten
                  wrote on 7 Dec 2022, 09:30 last edited by
                  #7

                  Thanks @JKSH !

                  posktomten

                  1 Reply Last reply
                  0

                  1/7

                  5 Dec 2022, 17:46

                  • Login

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