
translation-manager
Safely adds new translation keys to both English and French localization files.
by tsiresymila1|Open Source
Translation Manager
Use this skill when the user asks to "add a translation" or "add text".
Process
-
Read Files: Read content of:
assets/translations/en.jsonassets/translations/fr.json
-
Generate Keys:
- If the user provides a key (e.g.,
download_error), use it. - If not, convert the English text to
snake_case(e.g., "Download Error" ->download_error).
- If the user provides a key (e.g.,
-
Insert Content:
- Add the new key-value pair to
en.json. - Add the corresponding French translation to
fr.json. If you don't know the French translation, use a placeholder or ask the user, but typically you should attempt a best-effort translation.
- Add the new key-value pair to
-
Formatting:
- Ensure valid JSON syntax (commas, quotes).
- Maintain consistent indentation (2 spaces).
-
Usage:
- Remind the user to use the key in Dart code as
"key_name".tr().
- Remind the user to use the key in Dart code as