Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.48 KB

File metadata and controls

55 lines (35 loc) · 1.48 KB

Internationalization

Translations live as .ts files under i18n/ (Qt's translation source format). The build pipeline compiles them to .qm binaries that ship with the application. Editing happens in Qt Linguist. Everything else is a just recipe.

For setup, see development.md.

Adding a language

  1. Create the translation file:

    just add-translation <locale>  # e.g. just add-translation fr-FR

    A <locale>.ts file appears under i18n/.

  2. Translate the strings using Qt Linguist:

    pyside6-linguist i18n/<locale>.ts
  3. Add the new language to the LANGUAGES list in mpvqc/datamodels.py so it appears in the application's language menu. List the translator(s) on the same entry to credit them in the About dialog.

  4. Recompile resources and test:

    just build-develop

    Start the application, switch to the new locale through the application's settings, and verify the strings render correctly.

Updating existing translations

When translatable strings in the source code change, refresh every .ts file from current sources:

just update-translations

This scans Python and QML for translatable strings and merges new entries into the existing .ts files.

See also