Repository navigation
Translating
Heronite speaks English, Portuguese (Brazil), Spanish, and German. Fixes to these and new languages are welcome.
The English text in the code is the key. Each language has a folder with JSON files, one per part of the app:
crates/i18n/locales/
├── pt-BR/
│ ├── common.json
│ ├── settings_panel.json
│ └── …
├── es/
└── de/
Each file is a flat object from the English text to the translation:
{
"Add a game": "Adicionar um jogo",
"verb|Play": "Jogar",
"{n} games": "{n} jogos"
}- A
context|in front of a key tells apart the same English word used in different ways (like "Play" the verb). Only translate the part after|. - Placeholders like
{n}must stay the same in the translation. - Plurals have a separate key for the singular and the plural.
Edit the JSON file and open a pull request. No code is needed.
HERONITE_I18N_MISSING=1 cargo test -p heronite-i18n --test coverage -- --nocaptureThis lists missing and extra keys, and placeholders that do not match.
To see your language in the app, choose it in Settings → General → Language.
Copy one of the folders to a new one named after the language code (like fr or it) and translate its files. A new language also needs a few lines of code in crates/i18n/src/lib.rs (its name and code). If you are not comfortable with Rust, open the pull request with the translation and ask for help there.
See CONTRIBUTING.md for building Heronite.
Heronite · Releases · Issues · Discussions · If Heronite is useful to you, a ⭐ on GitHub helps others find it.
Start
Guides
Reference
- Keyboard Shortcuts
- Command Line and Links
- Files and Folders
- Environment Variables
- Console Theme Format
Contribute