Prompt
I'm frustrated with translation files breaking every release
Latest observation
That’s a very common pain point. Translation files are especially fragile because they tend to drift from the code shape over time.
A few practical ways to make releases stop breaking:
1) Validate translation keys in CI
Add a check that compares:
- keys used in code
- keys present in each locale file
Fail the build if any are missing or extra, depending on your policy.
2) Use a single source of truth
Instead of hand-editing lots of locale files, generate them from:
- a base locale
- a typed key schema
- or message definitions in code
This reduces accidental key mismatches.
3) Enforce structure with types or schemas
If you use TypeScript, define translation key types so missing or renamed keys are caught at compile time.
If not, validate JSON/YAML with a schema in CI.
4) Avoid changing keys casually
Treat translation keys like public API:
- don’t rename unless necessary
- deprecate old keys gradually
- keep aliases for one release if possible
5) Add a translation sync workflow
Common pattern:
- developers update base locale
- CI detects missing translations
- translators/localization tools update other locales
- release only blocks on truly required keys
6) Make failures visible early
Run checks:
- on pull requests
- before release
- optionally as a pre-commit hook for locale changes
If you want, I can help you set up a specific approach for your stack — for example:
- JavaScript/TypeScript with i18n libraries
- Python/Django
- Rails
- Android/iOS
- JSON/YAML locale files
If you tell me your stack and how translations are stored, I can suggest a concrete setup.