cmake: "cannot find *.ts file"
-
wrote on 5 Dec 2022, 17:46 last edited by
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!
-
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 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
-
wrote on 5 Dec 2022, 19:38 last edited by posktomten 12 May 2022, 19:58
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. -
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 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
-
@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
wrote on 6 Dec 2022, 09:31 last edited by@kkoehne said in cmake: "cannot find *.ts file":
update_translations' build system target
Thank you very much!
I'll test tonight. -
wrote on 6 Dec 2022, 22:16 last edited by
@kkoehne Many thanks! Works with Linux terminal!
cmake --build . --target update_translations
-
@kkoehne Many thanks! Works with Linux terminal!
cmake --build . --target update_translations
@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.
-
@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.
wrote on 7 Dec 2022, 09:30 last edited byThanks @JKSH !
1/7