Skip to content

Translation

Pier edited this page Dec 26, 2025 · 10 revisions

SysD Manager internationalization and localization (i18n and l10n) system

Purpose

This page is to explain how to handle SysD Manager translations.

Translation appraoch

SysD Manager uses gettext for its i18n and l10n. It has a the message-as-key approach which has its pros and cons.

Transtools

A tool have been created to help with translation. The following shows the most important ones to help translators

All options are explained in the helpj

cargo run -p transtools -- -h

Extract translation keys

To extract translation keys form source code and generate a Portable Object Template (POT) file. This command can be executed after any code changes. The command also generates the POTFILES file that contains the list of input files to look for to extract translatable strings.

cargo run -p transtools -- extract

The POT file serves as templates for creating new PO files.

Generate missing po files or update them

After changes in the source code it's needed to update a po languages file. The following command helps you to perform that.

Update all languages

To update all language keys, context and comments, use this command:

cargo run -p transtools -- po --lang all

Specific language

Same as above, but for on language only. Also useful for adding a new translated language.

cargo run -p transtools -- po --lang <LANG>

Notes

  • To add a new translated language, first add the new language code, respecting ll or ll_LL format, in the ./po/LINGUAS files.
  • To test any translated languages, just set the environment variable like this: export LANGUAGE=<language code>

Clone this wiki locally