Contributing a translation
Add or fix an editor language in @docx-editor.dev/i18n. Partial translations are accepted.
Add a language
Scaffold the locale file in the monorepo, fill in the strings, and validate:
git clone https://github.com/eigenpal/docx-editor && cd docx-editor
bun install
bun run i18n:new <code> # scaffolds packages/i18n/<code>.json with nulls
# fill in the strings, then
bun run i18n:status # shows remaining nulls per locale
bun run i18n:validate # CI runs this; missing keys failOpen a pull request with the filled JSON file.
Follow catalog requirements
| Rule | Detail |
|---|---|
| Shape | packages/i18n/en.json defines the shape. Every locale mirrors it. |
| Missing keys | Fail validation and CI. |
null values | Valid. They inherit at runtime. See fallback behavior. |
| Locale code | Use a BCP 47 code, such as pl, pt-BR, or zh-CN. |
| Placeholders | Keep placeholder names from en.json unchanged. |
| Partial translations | Accepted. |
Fix a translation
Edit the string in packages/i18n/<code>.json, run bun run i18n:validate, and open a pull request. You do not need to change application code.
See also
- i18n package: Wire locales into the editor.
- i18n API reference: Every locale export.
- Open a pull request