sec_interp.core.utils.i18n module

Internationalization (i18n) utilities for SecInterp.

Core classes use an injectable translator so this package stays QGIS-agnostic. The Qt adapter is installed by the plugin composition root at startup.

class sec_interp.core.utils.i18n.TranslatableMixin

Bases: object

Mixin providing a standardized tr() using the class name as context.

tr(message: str) → str

Translate a message with the class name as translation context.

sec_interp.core.utils.i18n.set_translator(translator: Callable[[str, str], str] | None) → None

Install the translation backend (None restores identity).

sec_interp.core.utils.i18n.translate(context: str, message: str) → str

Translate a message using the injected backend, or return it unchanged.