01-07-2013 12:40 PM - edited 01-07-2013 12:43 PM
It seems cascades and c++ is not very friendly when it comes to localizations.
I have a ton of translations done with my ts files, and my workflow is like this:
1. Add translations to a ts file.
2. build and enjoy 'obsolete' being placed throughout the file.
3. Manually update the pri file because it always self deletes the lupdate_inclusion
4. Open find/replace and go through each ts file, searching <translation type-"unfinished"> and replacing with <translation>
5. Rebuild
Is there anything that can be done to avoid having to do steps 3 & 4 each time?
When it comes to finally uploading the app (soon), I'm concerned that the pri file will be changed and my localized languages won't be part of the final package. Is there anything that can be done to ensure the final upload will contain all the languages?
Solved! Go to Solution.
01-07-2013 01:50 PM
I did it this way:
in my .pro file I added my custom qml-file folders:
include(config.pri)
lupdate_inclusion {
SOURCES += \
$$BASEDIR/../assets/dispatch/*.qml
}
so all my qml files from dispatch subfolder were re-generated.
I'm using QtLinguist to translate - all works well
01-07-2013 03:00 PM
Thank you so much Ekkehard! You just saved me so much frustration!
In case anyone needs the example lupdate content, here's what I use on my Mac:
Note that filename.cpp should be each cpp file in your sources directory to add all the tr() to your ts files.
lupdate_inclusion {
SOURCES += \
$$BASEDIR/../src/Filename.cpp \
$$BASEDIR/../src/main.cpp \
$$BASEDIR/../assets/*.qml
}
01-07-2013 03:02 PM
I'm using QtLinguist to translate - all works well
Is it this version here:
http://qt-apps.org/content/show.php/Qt+Linguist+Do
01-07-2013 03:14 PM
great to hear that it works for you ![]()