Skip to content

Translations for Developers

Michael Calmer edited this page Jan 18, 2022 · 3 revisions

Translations for Developers

This page has information how to handle translations in the code and how to add or change strings which should be translated.

Uyuni uses weblate for translation. Have a look at Translating Uyuni to your language to find out how to translate Uyuni.

Code

Uyuni uses 2 different translation formats due to historical reasons:

  1. Java and JSP packages uses XLIFF Format
  2. React Pages, backend and client tools uses PO Format

XLIFF Format

The XLIFF translations are read from XML files. When you add a new string or want to change an existing string, please adapt only the en_US file. US english is our reference for all translations.

All uyuni XLIFF translation files can be found in java/code/src/com/redhat/rhn/frontend/strings/ in 5 different subdirectories:

  • database
  • java
  • jsp
  • nav
  • template

The translation files are named StringResource_<lang>.xml .

PO Format

The very well known PO format uses strings specially marked in the source code. Adding or changing strings is just an operation inside of the code directly.

The keyword which is typically used is _() or N_()

Do not change .po or .pot files manually. There are tools which do it and together with weblate special procedures must be used. This will be done by the uyuni development team.

Clone this wiki locally