Skip to content

Draft: CMake localization

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

Goal

Having a UI translation system, from translation files generation to translation binary bundling.

Dev

Qt's CMake macros are used to generate translation source files from cxx and ui files. Another Qt Macro then generate translation binary files in the build directory. QTranslators in Paraview Client's main and ParaViewMainWindow's constructor load the binary file.

Macros

  • PARAVIEW_ENABLE_LOCALIZATION that make ParaView Client load a translation file at start.

  • PARAVIEW_GENERATE_TRANSLATIONS that generates translation TS file to be filled with translation, compile them and merge them into a single qm (Qt translation binary file) at the build root.

  • PARAVIEW_TRANSLATIONS_DIRECTORY that indicate the desired path for the ts files.

Edited by NicolasB

Merge request reports