Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/zh-cn-translation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@emdash-cms/admin": patch
---

Adds Chinese (Simplified) translation for the admin UI, including login page, settings page, and locale switching.
2 changes: 1 addition & 1 deletion lingui.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { LinguiConfig } from "@lingui/conf";

const config: LinguiConfig = {
sourceLocale: "en",
locales: ["en", "de", "fr", "ar", "pt-BR"],
locales: ["en", "de", "fr", "pt-BR", "ar", "zh-CN"],
catalogs: [
{
path: "<rootDir>/packages/admin/src/locales/{locale}/messages",
Expand Down
8 changes: 8 additions & 0 deletions lunaria.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ export default defineConfig({
label: "Français",
lang: "fr",
},
{
lang: "pt-BR",
label: "Português (Brasil)",
},
{
label: "العربية",
lang: "ar",
},
{
label: "简体中文",
lang: "zh-CN",
},
],
files: [
{
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/src/locales/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export const SUPPORTED_LOCALES: SupportedLocale[] = [
{ code: "en", label: "English" },
{ code: "de", label: "Deutsch" },
{ code: "pt-BR", label: "Português (Brasil)" },
{ code: "ar", label: "العربية" },
{ code: "zh-CN", label: "简体中文" },
].filter((l) => validateLocaleCode(l.code));

export const SUPPORTED_LOCALE_CODES = new Set(SUPPORTED_LOCALES.map((l) => l.code));
Expand Down
Loading
Loading