yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
Internationalization

Yaze's desktop UI uses a lightweight runtime translation layer in src/util/i18n/. User-facing text should stay in source as English and be wrapped with tr("English text"). English is the identity locale, so missing translations fall back to the source string.

Runtime catalogs

Translation catalogs live in assets/i18n/<locale>.json as flat JSON maps:

{
"Open ROM": "Ouvrir une ROM"
}

The app discovers available locales from this directory and exposes them from Help → Language. The selected locale is persisted in user settings as language_locale.

Adding or updating translations

  1. Add or edit assets/i18n/<locale>.json.
  2. Validate the catalog:
    python3 scripts/i18n/check_catalog.py assets/i18n/<locale>.json
  3. Review coverage:
    python3 scripts/i18n/check_msgids.py

Wrapping new UI text

For small edits, wrap strings manually with tr("...") and include util/i18n/tr.h. For broader UI updates, run the codemod on the touched files:

python3 scripts/i18n/wrap.py --apply src/app/editor/path/to/file.cc

wrap.py writes ambiguous candidates to assets/i18n/wrap.review.txt; inspect that file before deciding whether any remaining literals should be wrapped by hand.