mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-20 18:08:55 +00:00
- Add extract and merge modes to manage missing translations - Implement functions to extract missing keys and merge WIP files - Create usage documentation for the translation management script
1.3 KiB
1.3 KiB
Translation Guide
Super Productivity uses JSON files for translations, located in src/assets/i18n/.
How to Contribute
- Find your language file in
src/assets/i18n/(e.g.,de.jsonfor German) - Edit the JSON file directly
- 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.
{
"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
{
"G": {
"CANCEL": "Abbrechen",
"SAVE": "Speichern"
}
}
Tips
- Use
en.jsonas reference for context - Keep translations concise (UI space is limited)
- Test your translations locally if possible (
ng serve)
Translation Management Script
For managing missing translations and maintaining consistency, use the tools/add-missing-i18n-variables.js script. See i18n-script-usage.md for detailed instructions.