CMake translation source files generation
MR Goal
Having a translation source files (.ts) generation system integrated to the build system (first step of the localization workflow).
This MR is the first step to a complete PV and PV-based applications localization workflow, from ts generation to translations loading.
Dev
The build system create all ts files in the specified directory.
Qt5's lupdate
utility can find translatable strings in Cpp files and .ui.
To translate XML files, we need the utility in Utilities/Localization/
to generate translatable Cpp headers from it, so lupdate
can translate ts files from it.
Intended workflow
The translation workflow is made of four steps:
- Generating translation source files from PV sources (this MR)
- Filling the translation source files with translations (with Qt Linguist, or a CMS,...)
- Merging the ts files into translation binary files (.qm) per language
- Loading the desired qm file into PV (see !6005 (merged))
The first step is made with CMake, the second and third outside of the PV/PV-based repository, and the last is done in the client initialization.
Options
-
PARAVIEW_BUILD_TRANSLATIONS
(bool) that generates translation TS file to be filled with translation. -
PARAVIEW_TRANSLATIONS_DIRECTORY
(path) that indicate the desired path for the ts files.