docs: add info about how to translate stuff #5893

This commit is contained in:
Johannes Millan 2026-01-05 18:05:45 +01:00
parent 24d3fb6fab
commit 08971fce47
2 changed files with 51 additions and 1 deletions

View file

@ -27,7 +27,7 @@ In case you want to contribute, but you wouldn't know how, here are some suggest
7. **[Make a feature or improvement request](https://github.com/super-productivity/super-productivity/issues/new)**: Something can be done better? Something essential missing? Let us know!
8. **[Translations](https://github.com/super-productivity/super-productivity/tree/master/src/assets/i18n), Icons, etc.**: You don't have to be programmer to help. Some of the icons really need improvement and many of the translations could use some love.
8. **[Translations](docs/TRANSLATING.md)**: You don't have to be programmer to help. See our [translation guide](docs/TRANSLATING.md) for details on how to contribute translations.
9. **[Sponsor the project](https://github.com/sponsors/johannesjo)**

50
docs/TRANSLATING.md Normal file
View file

@ -0,0 +1,50 @@
# Translation Guide
Super Productivity uses JSON files for translations, located in `src/assets/i18n/`.
## How to Contribute
1. Find your language file in `src/assets/i18n/` (e.g., `de.json` for German)
2. Edit the JSON file directly
3. Submit a pull request
## Important Notes
### Fallback Language
**English (`en.json`) is the fallback language.** If a translation is missing or empty, the app automatically displays the English text.
### Empty Values Are Intentional
When you see empty strings (`""`), this is **intentional** - it triggers the English fallback. Do not copy the English text into empty fields unless you're providing an actual translation.
```json
{
"SOME_KEY": ""
}
```
The above will display the English text for `SOME_KEY`.
### File Format
- Nested JSON structure
- Keys use SCREAMING_SNAKE_CASE
- Keep the structure intact - only change the string values
### Example
```json
{
"G": {
"CANCEL": "Abbrechen",
"SAVE": "Speichern"
}
}
```
## Tips
- Use `en.json` as reference for context
- Keep translations concise (UI space is limited)
- Test your translations locally if possible (`ng serve`)