Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.12.5
-
None
Description
Hi,
I built a library which have translation in .cpp files and in .qml files. As I don't serve .cpp files to application developpers, I use lupdate and lrelease to generate translation for the library and that works fine.
Then in the application, I have a 3rdparty folder which contains header files and .qml files + a .qrc file which group all qml.
In the .pro of the application, I then have
RESOURCES+= path/to/lib/lib.qrc
among other thing for the application to compile.
When doing lupdate on my application project file, it generate again translation for all the qml that are in the lib.qrc file. if I comment the line, the translations are generated correctly (only those of the application), but the files dissapears from the Project tree so it's difficult to find path for qml in library.
I tried with
lupdate_only {
message (1)
} else {
RESOURCES+= path/to/lib/lib.qrc
message (2)
}
when executing Qmake, I get message 2, but when executing lupdate, I don't get message 1 nor message 2, and the traductions are still included in translations files.
I tried to put everything related to the library in a .pri file and lupdate still find the .qrc file and include translation from library.
I tried to append lib folder to TR_EXCLUDE but lupdate still find .qml files and append translation.
TR_EXCLUDE += path/to/lib/*.qml \ path/to/lib/*/.qml \ path/to/lib/*/*/*.qml \ path/to/lib/*/*/*/.qml \ path/to/lib/*/*/*/*/*.qml
I have no solution to exclude this qrc file except by commenting it each time I want to generate translation for my application.
Please provide solution that don't need a manipulation each time.
Best regards.