Translation loading system and translation test plugin
This MR is the continuation of MR !5971 (merged) .
MR Goals
- Having a translation setting for loading translation binary files at startup in ParaView.
- Having a test plugin that check most UI strings are translatable.
This MR is a step to a complete PV and PV-based applications localization workflow, from ts generation to translations loading.
Dev
Translations loading
The translation loading is done at startup, when loading which language to load in the settings.
The language selection is done through the settings menu (General
tab, Interface Language
section) with a ComboBox of languages. The selected language is saved in the settings. Changing language require a restart.
Translations testing plugin
The test itself load a specific translation files where all strings are translated by a single word. The plugin is then recursively check from the client main window that all widgets, actions, and their childrens's displayed texts are translated (Text, ToolTip, QLabel, WindowTitle, PlaceholderText are tested).
Intended workflow
The translation workflow is made of four steps:
- Generating translation source files from PV sources (see !5971 (merged))
- 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 (this MR)
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.