Translate
The desktop app, the web UI and these docs are written in English and translated into other languages. Anything not yet translated shows in English, so a partial translation is always safe to ship.
| What | English source | Translation |
|---|---|---|
| App text | packages/client-ui/locales/en.json | packages/client-ui/locales/<lang>.json |
| Docs page | docs/src/content/docs/<page>.mdx | docs/src/content/docs/<folder>/<page>.mdx |
| Word choices | docs/i18n/glossary/<lang>.md |
The CLI, HTTP API errors and logs stay in English, because scripts and agents read them.
Fix a translation
-
Edit the text in the translation file. Keep
{{placeholders}}exactly as in English and follow the language’s glossary. -
Check it:
Terminal window pnpm i18n checkTranslations are consistent with English. -
Open a pull request. Mention which language you checked it as a reader of.
See what needs translating
pnpm i18n statuszh-CN UI: 724 translated (0 by machine), 0 missing, 0 out of date, 0 unrecorded Docs (zh-cn/): 35 current, 2 missing, 0 out of date, 0 unrecorded Docs missing: how-it-works/translations.mdx, reference/translate.mdx| Status | Meaning |
|---|---|
| Missing | No translation yet; English is shown |
| Out of date | The English changed after it was translated |
| Unrecorded | Translated, but not yet recorded against an English version |
A bot keeps translations up to date when English changes; see How translations stay up to date.
After you update an out-of-date translation, record it as matching the current English, naming the keys or pages you checked:
pnpm i18n stamp zh-CN reference/translate.mdxTranslate a docs page
Copy the English page to the language folder and translate the prose. Keep the structure so the check can compare the two:
- Keep code as it is; you may translate comments and quoted example text.
- Keep links exactly as in English, such as
/setup/install/. They open the page in the reader’s language automatically. - End every heading with the English heading’s ID, for example
## 安装 \{#install}, so links to#installwork in every language. The backslash is needed in MDX. - Keep the imports and components (
<Aside>,<Steps>,<Tabs>).
Add a language
- App: add
packages/client-ui/locales/<lang>.json(start with{}) and list the tag inlanguagesinpackages/client-ui/src/i18n.tsandCATALOGSinpackages/desktop/src-tauri/src/i18n.rs. - Docs: add the language to
docs/locales.mjsand create its folder, for exampledocs/src/content/docs/ja/. - Add
docs/i18n/glossary/<lang>.mdwith the official WeChat terms in that language. - Run
pnpm i18n checkand open a pull request.