CopperSpice API
1.9.2
|
Running the lupdate application creates a new translation file or updates existing translation files. The changes to a TS file are based on the strings which are marked for translation in the source code.
The lupdate program scans all of your source code for calls to QObject::tr(), QCoreApplication::translate, and the functions cs_mark_tr(), cs_mark_string_tr(), and qtTrId(). The strings which are used in these calls will be stored in the translation file along with a blank entry for the eventual translation text.
For more information refer to Using tr() to Mark Translations
The lupdate application is a command line program which extracts the marked translatable strings from your source code, header files and UI designer files. It produces or updates the TS translation file which is a simple readable XML format.
There are multiple parameters which can be passed to lupdate. To see a complete list of supported options pass -help
.
The command shown below is a typical example for running lupdate. The last parameter will create new TS files if none exist or update existing TS files if they are present. The TS files will be located in the resources folder.
The other options will modify what lupdate adds to the TS file output.