Skip to content

Add Simplified Chinese (zh-CN) admin locale#471

Merged
ascorbic merged 8 commits intoemdash-cms:mainfrom
ayfl269:main
Apr 13, 2026
Merged

Add Simplified Chinese (zh-CN) admin locale#471
ascorbic merged 8 commits intoemdash-cms:mainfrom
ayfl269:main

Conversation

@ayfl269
Copy link
Copy Markdown
Contributor

@ayfl269 ayfl269 commented Apr 11, 2026

What does this PR do?

Adds Chinese (Simplified) translation for the EmDash admin UI. This enables Chinese-speaking users to use the admin interface in their native language.

Changes included:

  • Add "zh-CN" to lingui.config.ts locales array
  • Register { code: "zh-CN", label: "简体中文" } in the admin SUPPORTED_LOCALES
  • Add initial messages.po with 36 translated messages at packages/admin/src/locales/zh-CN/messages.po
  • Translate all admin UI strings including login page, settings page, and locale switching interface
  • Preserve all placeholders ({email}, {label}, {error}) and Lingui component markers (<0>...</0>)

Translation coverage:

  • Login page (magic link authentication, passkey, email sign-in)
  • Settings page (general, security, SEO, API tokens, language preferences)
  • Locale switching interface (language selector, translation status indicators)

Type of change

  • Bug fix
  • Feature (requires https://github.com/emdash-cms/emdash/discussions/categories/ideas )
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read https://github.com/emdash-cms/emdash/blob/main/CONTRIBUTING.md
  • pnpm typecheck passes ✅ (CI passed)
  • pnpm --silent lint:json | jq '.diagnostics | length' returns 0 ✅ (CI passed)
  • pnpm test passes (or targeted tests for my change) ✅ (CI passed)
  • pnpm format has been run ✅ (CI passed)
  • I have added/updated tests for my changes (if applicable)
  • I have added a https://github.com/emdash-cms/emdash/blob/main/CONTRIBUTING.md#changesets (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code

Test output

CI Results:

  • ✅ Format: Passed
  • ✅ CI (Type Check, Lint, Test, Build): Passed
  • ✅ PR Compliance: Passed

Translation example:

msgid "Sign in to your site"
msgstr "登录到您的网站"

msgid "Send magic link"  
msgstr "发送免密登录链接"

msgid "Settings"
msgstr "设置"

All core CI checks (Format, CI, PR Compliance) have passed successfully. The translation files will be compiled during the build process in the main repository.

Resolving conflict issues #455

Enable the zh-CN locale across the admin UI: add "zh-CN" to lingui.config.ts locales, register { code: "zh-CN", label: "简体中文" } in the admin SUPPORTED_LOCALES, and add the initial messages.po with Simplified Chinese translations at packages/admin/src/locales/zh-CN/messages.po. This provides localized strings for the admin interface.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 11, 2026

🦋 Changeset detected

Latest commit: 4844b77

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 12, 2026

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@471

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@471

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@471

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@471

emdash

npm i https://pkg.pr.new/emdash@471

create-emdash

npm i https://pkg.pr.new/create-emdash@471

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@471

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@471

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@471

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@471

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@471

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@471

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@471

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@471

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@471

commit: 4844b77

@ascorbic ascorbic enabled auto-merge (squash) April 13, 2026 10:41
@ascorbic ascorbic merged commit 4645103 into emdash-cms:main Apr 13, 2026
25 of 26 checks passed
@emdashbot emdashbot bot mentioned this pull request Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants