Skip to content

Commit 4645103

Browse files
ayfl269emdashbot[bot]ascorbic
authored
Add Simplified Chinese (zh-CN) admin locale (#471)
* Add Simplified Chinese (zh-CN) admin locale 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. * docs(locales): Update the Chinese translation file and add missing translation content. * style: format * style: format * Add Arabic locale support to configuration --------- Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com> Co-authored-by: Matt Kane <mkane@cloudflare.com> Co-authored-by: Matt Kane <m@mk.gg>
1 parent 2d481a2 commit 4645103

5 files changed

Lines changed: 770 additions & 1 deletion

File tree

.changeset/zh-cn-translation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@emdash-cms/admin": patch
3+
---
4+
5+
Adds Chinese (Simplified) translation for the admin UI, including login page, settings page, and locale switching.

lingui.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { LinguiConfig } from "@lingui/conf";
22

33
const config: LinguiConfig = {
44
sourceLocale: "en",
5-
locales: ["en", "de", "fr", "ar", "pt-BR"],
5+
locales: ["en", "de", "fr", "pt-BR", "ar", "zh-CN"],
66
catalogs: [
77
{
88
path: "<rootDir>/packages/admin/src/locales/{locale}/messages",

lunaria.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ export default defineConfig({
1818
label: "Français",
1919
lang: "fr",
2020
},
21+
{
22+
lang: "pt-BR",
23+
label: "Português (Brasil)",
24+
},
2125
{
2226
label: "العربية",
2327
lang: "ar",
2428
},
29+
{
30+
label: "简体中文",
31+
lang: "zh-CN",
32+
},
2533
],
2634
files: [
2735
{

packages/admin/src/locales/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export const SUPPORTED_LOCALES: SupportedLocale[] = [
2626
{ code: "en", label: "English" },
2727
{ code: "de", label: "Deutsch" },
2828
{ code: "pt-BR", label: "Português (Brasil)" },
29+
{ code: "ar", label: "العربية" },
30+
{ code: "zh-CN", label: "简体中文" },
2931
].filter((l) => validateLocaleCode(l.code));
3032

3133
export const SUPPORTED_LOCALE_CODES = new Set(SUPPORTED_LOCALES.map((l) => l.code));

0 commit comments

Comments
 (0)