devctrl.gui.app.translations#

Layered application translations for the combined GUI.

Qt allows a QApplication to hold several QTranslator instances, which are searched in reverse install order (last installed wins). This gives a “base catalog + per-module catalogs on top” stacking directly.

Each module package ships its own <pkg>_<lang>.qm catalog covering only its module-specific strings; the base devctrl_<lang>.qm catalog lives in devctrl and covers the shared chrome.

Variant locales (e.g. de_BV) are layered per catalog: the base-language catalog is installed below the variant catalog, so strings the variant does not translate fall back to the base language instead of the English source text.

Module attributes

DEVCTRL_CATALOG_BASE

Package/base name of the shared devctrl translation catalog (without language suffix)

Functions

get_translation_dir

Return the filesystem directory containing a package's translations.

install_catalog_translator

Install the full locale layer chain of one catalog onto an application.

install_translations

Install layered translations.

load_translator

Load a single translation catalog from a package into a translator.

locale_layers

Return the lookup layers for a locale, most specific first.