From 1f404d433fa7c16c1dcfeb656fe2ae84f9284816 Mon Sep 17 00:00:00 2001 From: Pavel Baksy Date: Tue, 13 Jan 2026 17:35:11 +0100 Subject: [PATCH] Add translations documentation --- Translation.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Translation.md diff --git a/Translation.md b/Translation.md new file mode 100644 index 0000000..55d57c5 --- /dev/null +++ b/Translation.md @@ -0,0 +1,87 @@ +# Translation Guide + +Roster uses standard GNOME gettext infrastructure for internationalization (i18n). + +## Quick Start for Translators + +### 1. Generate the Translation Template + +From the project root, after setting up the build: + +```bash +meson setup builddir +ninja -C builddir roster-pot +``` + +This creates `po/roster.pot` with all translatable strings. + +### 2. Create Your Language Translation + +```bash +cd po +msginit -l LANG_CODE -o LANG_CODE.po -i roster.pot +``` + +Replace `LANG_CODE` with your language code (e.g., `cs_CZ` for Czech, `de` for German, `fr` for French). + +### 3. Translate the Strings + +Edit the `.po` file with a translation editor: +- **GNOME Translation Editor** (gtranslator) - recommended +- **Poedit** +- **Lokalize** (KDE) +- Any text editor + +### 4. Register Your Translation + +Add your language code to `po/LINGUAS` (keep alphabetically sorted): + +``` +cs_CZ +de +fr +``` + +### 5. Test Your Translation + +```bash +ninja -C builddir +ninja -C builddir install +LANG=your_LANG_CODE.UTF-8 roster +``` + +## What Gets Translated + +The translation system covers: + +- Application UI (window.ui, dialogs) +- Menu items and labels +- Desktop file (application name, description, keywords) +- AppStream metadata (for software centers) +- GSettings schema (settings descriptions) +- Python source strings (error messages, notifications) + +## Updating Translations + +When the application changes: + +```bash +ninja -C builddir roster-update-po +``` + +This updates all `.po` files with new/changed strings. + +## Language Codes + +Use standard locale codes: +- Two-letter: `de`, `fr`, `es`, `it` +- With country: `pt_BR`, `zh_CN`, `en_GB` + +## Contributing + +Submit translations via: +1. Pull request to the repository +2. Issue on GitHub/GitLab with attached `.po` file +3. Email to maintainer + +See [Contributing](Contributing.md) for more details.