Files
PortProtonQt/documentation/localization_guide/README.md
Boris Yumankulov b5090813f7
All checks were successful
Check Translations / check-translations (pull_request) Successful in 16s
Build Check - AppImage, Arch, Fedora / changes (pull_request) Successful in 32s
Code check / Check code (pull_request) Successful in 1m5s
Build Check - AppImage, Arch, Fedora / Build AppImage (pull_request) Successful in 5m44s
Build Check - AppImage, Arch, Fedora / Build Fedora RPM (41) (pull_request) Successful in 2m33s
Build Check - AppImage, Arch, Fedora / Build Fedora RPM (42) (pull_request) Successful in 49s
Build Check - AppImage, Arch, Fedora / Build Fedora RPM (rawhide) (pull_request) Successful in 53s
Build Check - AppImage, Arch, Fedora / Build Arch Package (pull_request) Successful in 1m15s
chore(build): switch from pyproject to meson build system
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-01-18 23:06:32 +05:00

83 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
📘 Эта документация также доступна на [русском.](README.ru.md)
---
## 📋 Contents
- [Overview](#-overview)
- [Adding a New Translation](#-adding-a-new-translation)
- [Updating Existing Translations](#-updating-existing-translations)
- [Compiling Translations](#-compiling-translations)
- [Spell Check](#-spell-check)
---
## 📖 Overview
Localization in `PortProtonQT` is powered by `Babel` using `.po/.mo` files stored under `LC_MESSAGES/portprotonqt.po` for each language.
Current translation status:
<!-- Auto-generated coverage table -->
| Locale | Progress | Translated |
| :----- | -------: | ---------: |
| [de](./de/LC_MESSAGES/portprotonqt.po) | 0% | 0 of 376 |
| [es](./es/LC_MESSAGES/portprotonqt.po) | 0% | 0 of 376 |
| [pt](./pt/LC_MESSAGES/portprotonqt.po) | 0% | 0 of 376 |
| [ru](./ru/LC_MESSAGES/portprotonqt.po) | 100% | 376 of 376 |
---
## 🏁 Adding a New Translation
1. Run:
```bash
uv python install 3.10
uv sync --all-extras --dev
source .venv/bin/activate
python dev-scripts/l10n.py --create-new <locale_code>
```
2. Edit the file `portprotonqt/locales/<locale>/LC_MESSAGES/portprotonqt.po` in Poedit or any text editor.
---
## 🔄 Updating Existing Translations
If youve added new strings to the code:
```bash
uv python install 3.10
uv sync --all-extras --dev
source .venv/bin/activate
python dev-scripts/l10n.py --update-all
```
---
## 🧵 Compiling Translations
```bash
uv python install 3.10
uv sync --all-extras --dev
source .venv/bin/activate
python dev-scripts/l10n.py
```
## 🔍 Spell Check
To check spelling, run the following commands:
```bash
uv python install 3.10
uv sync --all-extras --dev
source .venv/bin/activate
python dev-scripts/l10n.py --spellcheck
```
The script performs parallel spellchecking of strings in `.po` and `.pot` files. For each file, it prints the list of strings being checked and highlights any spelling errors with suggestions. Words listed in `dev-scripts/.spellignore` are ignored and not treated as typos.