"qt_add_lupdate" dublicate lines
-
Hey!
Now it's a bit strange again!
In Qt Creator:
I have checked "programmname_lupdate" in "Project settings" , "Build steps", "Details",lupdate is running every time the program is compiled.
Updating '../code/i18n/_streamcapture2_it_IT.ts'... Found 432 source text(s) (0 new and 432 already existing) Updating '../code/i18n/_streamcapture2_sv_SE.ts'... Found 432 source text(s) (0 new and 432 already existing) Updating '../code/i18n/_streamcapture2_template_xx_XX.ts'... Found 432 source text(s) (0 new and 432 already existing)
The problem is (in the ts file)
<message> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <location filename="../downloadlistdialog.cpp" line="108"/> <source>Save as text file</source> <translation>Spara som textfil</translation> </message>
A new edentical row is created every time!
I CMakeLists.tex
In CMakeLists.txt set(TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/i18n/_streamcapture2_it_IT.ts ${CMAKE_CURRENT_SOURCE_DIR}/i18n/_streamcapture2_sv_SE.ts ${CMAKE_CURRENT_SOURCE_DIR}/i18n/_streamcapture2_template_xx_XX.ts ) qt_add_lupdate(streamcapture2 TS_FILES ${TS_FILES})
-
-
This is no cmake problem but lupdate - sometimes it's not as intelligent as it should be.
-
This indeed looks like a bug in lupdate. Which Qt version are you testing with, on which platform?
Would be great if you could file a bug wiht the details at https://bugreports.qt.io/projects/QTBUG , component 'Tools: Linguist'.
-
I will file a bug report.
Tested with
lupdate 6.4.1 on Ubuntu 20.04 and 22.04 (Qt Creator 9.0.0)
lupdate 6.4.1 on Windows 10 (Qt Creator 9.0.0)I'll check how it works with Qt5.15.7, I haven't done that yet.
-
I will file a bug report.
Tested with
lupdate 6.4.1 on Ubuntu 20.04 and 22.04 (Qt Creator 9.0.0)
lupdate 6.4.1 on Windows 10 (Qt Creator 9.0.0)I'll check how it works with Qt5.15.7, I haven't done that yet.
@posktomten
If I configure the same program with qmake and runlupdate progname.pro
Then everything works as it should.
-