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.
  • posktomtenP Offline
    posktomtenP Offline
    posktomten
    wrote on 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

    kkoehneK 1 Reply Last reply
    0
    • posktomtenP posktomten

      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!

      kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on 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

      posktomtenP 1 Reply Last reply
      3
      • posktomtenP Offline
        posktomtenP Offline
        posktomten
        wrote on last edited by posktomten
        #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
        • posktomtenP posktomten

          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!

          kkoehneK Offline
          kkoehneK Offline
          kkoehne
          Moderators
          wrote on 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

          posktomtenP 1 Reply Last reply
          3
          • kkoehneK kkoehne

            @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

            posktomtenP Offline
            posktomtenP Offline
            posktomten
            wrote on 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
            • posktomtenP Offline
              posktomtenP Offline
              posktomten
              wrote on last edited by
              #5

              @kkoehne Many thanks! Works with Linux terminal!

              cmake --build . --target update_translations
              

              posktomten

              JKSHJ 1 Reply Last reply
              0
              • posktomtenP posktomten

                @kkoehne Many thanks! Works with Linux terminal!

                cmake --build . --target update_translations
                
                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on 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

                posktomtenP 1 Reply Last reply
                0
                • JKSHJ JKSH

                  @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

                  posktomtenP Offline
                  posktomtenP Offline
                  posktomten
                  wrote on last edited by
                  #7

                  Thanks @JKSH !

                  posktomten

                  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