This project uses a namespace-based i18n setup so contributors can localize safely without changing app logic.
All locale files live under:
src/i18n/locales/en/src/i18n/locales/es/src/i18n/locales/zh-CN/
Each locale has the same namespace files:
common.jsonlaunch.jsoneditor.jsontimeline.jsonsettings.jsondialogs.jsonshortcuts.json
English (en) is the source of truth for key structure.
- Keep the same key paths across locales.
- Do not rename existing keys unless coordinated with code changes.
- Add new keys to
enfirst, then mirror into all other locales. - Prefer descriptive, stable keys. Example:
app.editorTitle. - Interpolation is supported with
{{name}}style placeholders.
- Keys with a namespace prefix like
settings.export.titleuse that namespace. - Keys without a namespace default to
common. - Missing translations fall back to English, then to the provided fallback string, then to the key.
Run:
npm run i18n:checkThis checks for:
- Missing namespace files
- Missing keys compared to
en - Extra keys not present in
en
- Pull latest
main. - Update
en/<namespace>.jsonwith new keys if needed. - Add matching keys to other locale files.
- Run
npm run i18n:check. - Run app locally (
npm run dev) and spot-check UI text. - Open PR with a short summary of changed namespaces.
Current framework is app-wide and ready for full localization rollout. Not every UI string is migrated yet. Migration should be done incrementally by namespace to keep PRs reviewable and low-risk.