Skip to content

Translation loading system and translation test plugin

NicolasB requested to merge nicolasB/paraview:cmake-use-qm into master

This MR is the continuation of MR !5971 (merged) .

MR Goals

  1. Having a translation setting for loading translation binary files at startup in ParaView.
  2. 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.


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:

  1. Generating translation source files from PV sources (see !5971 (merged))
  2. Filling the translation source files with translations (with Qt Linguist, or a CMS,...)
  3. Merging the ts files into translation binary files (.qm) per language
  4. 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.

Edited by NicolasB

Merge request reports