O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating the XML translation files

Since translation files do not exist yet, we should tell lupdate to create them for us the first time we run the tool. To do so, we can add the following to cmmonitor.pro:

// cmmonitor.pro...TRANSLATIONS = \    cmmonitor_en_US.ts \    cmmonitor_it_IT.tsOTHER_FILES += $${TRANSLATIONS}

TRANSLATIONS is a special QMake directive that is used by lupdate on the first and subsequent runs to identify the output translation files and supported locales. On the first run of lupdate, the tool scans the filenames and identifies any known locale suffixes ( en_US and it_IT, in the example). The rest of the filename is arbitrary, while the .ts suffix identifies XML translation files. The OTHER_FILES directive serves only the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required