SKILL.md
Translations Updater
This Skill keeps JournalOS translation files consistent and complete. It regenerates locale keys using the project command and then fixes missing, empty, or invalid entries inside lang/*.json files.
When to use this Skill
Use this Skill when:
- New UI text or translation keys were introduced
- Modules, pages, or components added new strings
- Translation JSON files contain empty or missing values
- Locale files are out of sync with the codebase
Instructions
Step 1: Regenerate locale files
- Run the locale generation command:
``bash composer journalos:locale ``
- Confirm the command completes successfully before making any edits.
Step 2: Scan for missing or incomplete translations
- Review all translation files:
- lang/*.json
- Identify any entries that are:
- Missing keys (present in one locale but absent in another) - Empty strings (e.g. "some.key": "") - Whitespace-only values - Null values - Invalid JSON
Step 3: Fix translations
Apply the following rules:
- Do not remove translation keys unless they are confirmed unused.
- For missing keys:
- Add the key to the relevant locale file(s).
- For empty or invalid values:
- Replace them with an appropriate human-readable translation.
- Ensure consistency:
- Same meaning across languages - Same tense and tone - Same terminology as used elsewhere in the app
- Preserve formatting and placeholders exactly:
- Do not modify tokens such as :name, :count, {value} - Do not alter embedded HTML or Markdown
Step 4: Validate JSON correctness
Ensure all lang/*.json files:
- Are valid JSON
- Use consistent indentation
- Contain no duplicate keys
Step 5: Quality checks
- Confirm there are no:
- Empty strings - Null values - Placeholder values like TODO
- If a translation is uncertain, prefer literal and conservative wording.
- Maintain existing key order unless the project explicitly requires sorting.
Step 6: Run tests
- Run the test suite:
``bash composer test ``
- Resolve any failures related to translations or locale loading.
Best practices
- Never rename translation keys without corresponding code changes
- Never translate or alter placeholders
- Favor consistency over stylistic variation
- Avoid informal language unless the UI already uses it
Validation checklist
-
composer journalos:localeexecuted successfully - All
lang/*.jsonfiles are valid JSON - No missing keys remain
- No empty or null translation values remain
- Placeholders are preserved exactly
- All tests pass
Output expectation
All translation files in lang/*.json are regenerated, complete, valid, and contain no missing or empty translations.