Skip to content

i18n: add Simplified Chinese (zh) translation - #562

Open
X-T-E-R wants to merge 1 commit into
keptinventory:mainfrom
X-T-E-R:i18n/simplified-chinese
Open

X-T-E-R wants to merge 1 commit into
keptinventory:mainfrom
X-T-E-R:i18n/simplified-chinese

Conversation

@X-T-E-R

@X-T-E-R X-T-E-R commented Nov 15, 2026 •

Copy link
Copy Markdown

What and why

Closes #532

Adds Simplified Chinese (zh) across Kept:

  • Web app (@kept/web): full zh Lingui catalogue (apps/web/src/locales/zh/messages.po, all 6,986 source messages translated with verified placeholders, numbered tags, and ICU plural branches), zh in lingui.config.ts, index.html, prefs.ts, and i18n.ts, CN flag and 简体中文 label in languages.tsx, locale?: … | 'zh' across report/export API types, and Chinese CSV header synonyms in import/suggest.ts.
  • Shared (@kept/shared): zh translations for all 34 built-in types and 34 built-in fields, languageSearch support for Intl.DisplayNames in each language's own tag plus zh-Hans (so 2-character queries like 中文 and 简体 as well as chinese and simplified match zh), and Chinese container suffixes in homebox.ts.
  • PDF reports & readable exports (@kept/server): adds @ibm/plex-sans-sc@1.1.0 (OFL-1.1, Regular / Medium / SemiBold WOFF conversion in reports/render/fonts.ts and notice entry in docker/notices.sh), adds "IBM Plex Sans SC" to all six Typst templates, maps zh → zh-CN and full-width colon : in reports/locale.ts, and provides reports/words/zh.ts for inventory, insurance, condition, move, vehicle, and readable HTML exports.
  • Server mail, reminders & helpers (@kept/server): adds mail/messages-zh.ts along with zh entries in messages-notify.ts, messages-transparency.ts, notify/words.ts, notify/push.ts, assistant/{prompt,words,select}.ts, extraction/{checks,prompts/common}.ts, exports/service.ts, imports/dry-run.ts, incidents/download.ts, and paperless/kinds.ts.
  • Home Assistant & docs: adds homeassistant/kept/translations/zh.yaml and zh-Hans.yaml, and updates the language lists in README.md, users/features.md, users/faq.md, and developers/i18n-rtl.md (keeping the Starlight docs locales unchanged and noting that docs ship in eight of the nine app languages).

Checks

  • bash scripts/ci-local.sh passes (--fast steps lint, catalogues, typecheck, unit across all non-DB projects, eval mock extraction, licences, server/web/docs builds, and Poppler-backed PDF rendering tests in reports/languages.test.ts and reports/render/render.test.ts all passed locally; Docker/Postgres-backed steps compose, test, drift, prod-boot, portability, backup, e2e, images, ha, and helm were not run locally)
  • Tests first, on their own database; the leak test and route catalogue updated for a new table or route (no schema, table, or route additions)
  • Migrations are additive (no database migrations needed)
  • New strings in every catalogue, Arabic in the house style; logical CSS; works at 375 px and 1280
  • Conventional commit messages; no tool attribution in commits or this description (D173)
  • The CLA signed

Add Simplified Chinese (zh) across the web app, shared utilities, server mail/notifications/PDFs, and Home Assistant options:

- Web app: complete 6,986-entry zh Lingui catalogue, language picker flag and native label (简体中文), pre-paint locale detection, API report locale types, and Chinese CSV import header matching.
- Shared: built-in type and field names, languageSearch DisplayNames coverage (including zh-Hans and 2-character Chinese queries), and Homebox Chinese container suffixes.
- PDF reports and readable exports: @ibm/plex-sans-sc@1.1.0 Regular, Medium, and SemiBold WOFF conversion in fonts.ts, OFL-1.1 notice entry, Typst template font stacks, full-width colon formatting, and complete words/zh.ts tables across all report kinds.
- Server: transactional, notification, and transparency mail templates (messages-zh.ts), reminder/push copy, assistant prompt/topic/viewer words, extraction script/warranty checks, claim-pack expired page, and Paperless paperwork kind matching.
- Home Assistant and docs: zh.yaml and zh-Hans.yaml option labels, plus updated language lists in README.md and user/developer docs.

Closes keptinventory#532
@X-T-E-R
X-T-E-R requested a review from a team as a code owner November 15, 2026 12:08
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@X-T-E-R

X-T-E-R commented Nov 15, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Nov 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Simplified Chinese (zh-Hans) localization

1 participant