Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.3.0
-
None
-
Windows 11
MSVC 2019
Qt 6.3.0
VSCode 1.68.1
VSCode-CMake-Tools 1.12.4
Conan 1.48.1
Description
According to the Documentation, qt_add_lupdate() should automatically create *.ts files if there doesn't exist originally. Am I right?
Add targets to generate or update Qt Linguist .ts files
However, it didn't work as I thought. The *.ts files won't be generated if there doesn't exist.
After some experiments, I found that I have to do the following steps:
- Create some empty *.ts files (zh_TW.ts and zh_CN.ts).
- Configure and Execute the custom target ${target}_lupdate.
It will definitely show errors of parsing. For example:[build] Parse error at D:/Code-Cpp-MyFavorite/Code-CMake-Qt-LiNing/source/15-International/ts/zh_TW.ts:1:0: Premature end of document.
- Delete those empty *.ts files (zh_TW.ts and zh_CN.ts).
- Configure and Execute the custom target ${target}_lupdate.
This time, it works. For example:[build] Updating '../../../../source/15-International/ts/zh_TW.ts'... [build] Found 7 source text(s) (7 new and 0 already existing)
GIF of Experiments