lupdate errors
-
Hi all,
My project file is 'Procedures4XP.pro'.
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ airportwindow.cpp \ approchwindow.cpp \ avertissdialog.cpp \ fixwindow.cpp \ main.cpp \ navaidwindow.cpp \ sidstarwindow.cpp \ varglobales.cpp HEADERS += \ airportwindow.h \ approchwindow.h \ avertissdialog.h \ fixwindow.h \ navaidwindow.h \ sidstarwindow.h \ varglobales.h FORMS += \ airportwindow.ui \ approchwindow.ui \ avertissdialog.ui \ fixwindow.ui \ navaidwindow.ui \ sidstarwindow.ui TRANSLATIONS += \ Procedures4XP_en_GB.ts CONFIG += lrelease CONFIG += embed_translations RESOURCES += resources.qrc # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target DISTFILES += ICON = Proc4XP.icns
When I run 'lupdate', I get two types of errors :
-
When I run 'lupdate -project Procedures4XP.pro', I get the message:
lupdate error: value not allowed in Procedures4XP.pro at offset 1. -
And when I run 'lupdate -ts Procedures4XP_en_GB.ts', I get:
Updating 'Procedures4XP_en_GB.ts'...
0 source code found.
What's wrong?
Thanks for your help.PS: I specify that the parts of the code to be translated are indeed 'QString' and that I apply the tr() function to them.
-
-
Hi,
Isn't the empty DISTFILES line the culprit ?
-
-project <filename> Name of a file containing the project's description in JSON format. Such a file may be generated from a .pro file using the lprodump tool.
You should use the correct command line arguments - see
lupdate --help
-
Thank you @SGaist and @Christian-Ehrlicher for your help
The --help option is indeed very instructive, particularly with regard to deprecated options.
I'm now using the 'lupdate -pro Procedures4XP.pro' command, which is helping me make progress.I now 'just' need to discover and master the 'Linguist' tool, which doesn't look so simple at first glance and which generated 591 lines for me ...
I think I'll have a few more questions for you before long...
-
Don't worry for Linguist, it's not that complex of a tool.
It essentially shows you what there is to translate and you can jump from one to the other and do you work.