Add translation guide and link from main pages

- Add Translation.md with simplified 3-step process for translators
- No build/test required - just download, translate, and submit
- Link from Home.md (Development section)
- Link from Contributing.md (new Translations section)
Pavel Baksy 2026-01-13 17:42:28 +01:00
parent 1f404d433f
commit 1e2978a99e
3 changed files with 45 additions and 68 deletions

@ -49,7 +49,15 @@ Help improve documentation by:
- Fixing typos or unclear explanations - Fixing typos or unclear explanations
- Adding examples - Adding examples
- Updating outdated information - Updating outdated information
- Translating to other languages
## Translations
Help make Roster available in your language! See [[Translation]] for a simple guide on how to:
- Download the translation template
- Translate using Poedit or another editor
- Submit your translation via pull request
No programming or building required - just translate and submit!
## Questions ## Questions

@ -33,6 +33,7 @@ Roster is a native GNOME application for testing and debugging HTTP APIs with su
### Development ### Development
- [[Contributing]] - How to contribute to Roster - [[Contributing]] - How to contribute to Roster
- [[Translation]] - Help translate Roster to your language
- [[Development]] - Developer documentation - [[Development]] - Developer documentation
- [[Architecture]] - Technical overview - [[Architecture]] - Technical overview

@ -1,87 +1,55 @@
# Translation Guide # Translation Guide
Roster uses standard GNOME gettext infrastructure for internationalization (i18n). Help translate Roster to your language! The process is simple.
## Quick Start for Translators ## For Translators
### 1. Generate the Translation Template ### 1. Download the Translation Template
From the project root, after setting up the build: Get the latest template file from the repository:
- File location: `po/roster.pot`
- Direct link: https://git.bugsy.cz/beval/roster/-/raw/master/po/roster.pot
```bash ### 2. Create Your Translation
meson setup builddir
ninja -C builddir roster-pot
```
This creates `po/roster.pot` with all translatable strings. Open the `.pot` file with any translation editor:
- **Poedit** (recommended for beginners) - https://poedit.net
### 2. Create Your Language Translation - **GNOME Translation Editor** (gtranslator)
```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) - **Lokalize** (KDE)
- Any text editor
### 4. Register Your Translation The editor will ask for your language - choose it and start translating!
Add your language code to `po/LINGUAS` (keep alphabetically sorted): ### 3. Submit Your Translation
``` Once finished, submit your `.po` file:
cs_CZ
de
fr
```
### 5. Test Your Translation **Option A: Pull Request** (preferred)
1. Fork the repository
2. Add your `LANGUAGE.po` file to the `po/` folder
3. Add your language code to `po/LINGUAS` (one per line, alphabetically sorted)
4. Create a pull request
```bash **Option B: Issue Attachment**
ninja -C builddir - Create an issue at https://git.bugsy.cz/beval/roster/issues
ninja -C builddir install - Attach your `.po` file
LANG=your_LANG_CODE.UTF-8 roster - Mention your language code (e.g., `cs`, `de`, `fr`)
```
## What Gets Translated That's it! No need to build or test - the maintainer will handle the rest.
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 ## Language Codes
Use standard locale codes: Use standard codes:
- Two-letter: `de`, `fr`, `es`, `it` - Two letters: `cs`, `de`, `fr`, `es`, `it`, `pl`
- With country: `pt_BR`, `zh_CN`, `en_GB` - With region: `pt_BR`, `zh_CN`, `en_GB`
## Contributing ## What Gets Translated
Submit translations via: Your translation covers:
1. Pull request to the repository - Application interface and menus
2. Issue on GitHub/GitLab with attached `.po` file - Button labels and tooltips
3. Email to maintainer - Error messages
- Application name and description (in app stores)
See [Contributing](Contributing.md) for more details. ## Questions?
See [[Contributing]] or open an issue if you need help!