diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 66f48afd4..2b5ea44a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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)** diff --git a/docs/TRANSLATING.md b/docs/TRANSLATING.md new file mode 100644 index 000000000..2b2238d5f --- /dev/null +++ b/docs/TRANSLATING.md @@ -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`)