add zh_cn

This commit is contained in:
lingxh
2026-04-07 01:11:04 +02:00
committed by Linus Rath
parent c3f60448ad
commit 05d3f0b469
13 changed files with 2517 additions and 4 deletions
+2
View File
@@ -14,6 +14,7 @@ import nlMessages from '@/locales/nl/common.json';
import plMessages from '@/locales/pl/common.json'; import plMessages from '@/locales/pl/common.json';
import ptMessages from '@/locales/pt/common.json'; import ptMessages from '@/locales/pt/common.json';
import ruMessages from '@/locales/ru/common.json'; import ruMessages from '@/locales/ru/common.json';
import zhMessages from '@/locales/zh/common.json';
// Pre-loaded translations (loaded at build time, not runtime) // Pre-loaded translations (loaded at build time, not runtime)
const ALL_MESSAGES = { const ALL_MESSAGES = {
@@ -28,6 +29,7 @@ const ALL_MESSAGES = {
pl: plMessages, pl: plMessages,
pt: ptMessages, pt: ptMessages,
ru: ruMessages, ru: ruMessages,
zh: zhMessages,
}; };
interface IntlProviderProps { interface IntlProviderProps {
+2 -1
View File
@@ -19,7 +19,8 @@ export function LanguageSwitcher({ className }: { className?: string }) {
{ value: 'nl', label: 'Nederlands' }, { value: 'nl', label: 'Nederlands' },
{ value: 'pl', label: 'Polski' }, { value: 'pl', label: 'Polski' },
{ value: 'pt', label: 'Português' }, { value: 'pt', label: 'Português' },
{ value: 'ru', label: 'Русский' } { value: 'ru', label: 'Русский' },
{ value: 'zh', label: '简体中文' }
]; ];
return ( return (
+4 -1
View File
@@ -41,6 +41,9 @@ export default getRequestConfig(async ({ requestLocale }) => {
case 'ru': case 'ru':
messages = (await import('../locales/ru/common.json')).default; messages = (await import('../locales/ru/common.json')).default;
break; break;
case 'zh':
messages = (await import('../locales/zh/common.json')).default;
break;
default: default:
messages = (await import('../locales/en/common.json')).default; messages = (await import('../locales/en/common.json')).default;
} }
@@ -51,4 +54,4 @@ export default getRequestConfig(async ({ requestLocale }) => {
timeZone: 'Europe/Paris', timeZone: 'Europe/Paris',
now: new Date() now: new Date()
}; };
}); });
+2 -2
View File
@@ -1,11 +1,11 @@
import { defineRouting } from 'next-intl/routing'; import { defineRouting } from 'next-intl/routing';
export const routing = defineRouting({ export const routing = defineRouting({
locales: ['en', 'fr', 'de', 'es', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ru'], locales: ['en', 'fr', 'de', 'es', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ru', 'zh'],
defaultLocale: 'en', defaultLocale: 'en',
localePrefix: 'never' localePrefix: 'never'
}); });
export const locales = routing.locales; export const locales = routing.locales;
export const defaultLocale = routing.defaultLocale; export const defaultLocale = routing.defaultLocale;
export type Locale = (typeof locales)[number]; export type Locale = (typeof locales)[number];
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Einstellungen importieren", "label": "Einstellungen importieren",
"description": "Einstellungen aus JSON-Datei hochladen", "description": "Einstellungen aus JSON-Datei hochladen",
"button": "Importieren" "button": "Importieren"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Importar Configuración", "label": "Importar Configuración",
"description": "Cargar configuración desde archivo JSON", "description": "Cargar configuración desde archivo JSON",
"button": "Importar" "button": "Importar"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Importer les paramètres", "label": "Importer les paramètres",
"description": "Charger les paramètres depuis un fichier JSON", "description": "Charger les paramètres depuis un fichier JSON",
"button": "Importer" "button": "Importer"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Importa impostazioni", "label": "Importa impostazioni",
"description": "Carica impostazioni da file JSON", "description": "Carica impostazioni da file JSON",
"button": "Importa" "button": "Importa"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "設定をインポート", "label": "設定をインポート",
"description": "JSONファイルから設定をアップロード", "description": "JSONファイルから設定をアップロード",
"button": "インポート" "button": "インポート"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Instellingen importeren", "label": "Instellingen importeren",
"description": "Upload instellingen vanuit JSON-bestand", "description": "Upload instellingen vanuit JSON-bestand",
"button": "Importeren" "button": "Importeren"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Importar Configurações", "label": "Importar Configurações",
"description": "Fazer upload de configurações de arquivo JSON", "description": "Fazer upload de configurações de arquivo JSON",
"button": "Importar" "button": "Importar"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
+3
View File
@@ -1211,6 +1211,9 @@
"label": "Импортировать настройки", "label": "Импортировать настройки",
"description": "Загрузить настройки из файла JSON", "description": "Загрузить настройки из файла JSON",
"button": "Импортировать" "button": "Импортировать"
},
"about": {
"title": "Bulwark Webmail"
} }
}, },
"sidebar_apps": { "sidebar_apps": {
File diff suppressed because it is too large Load Diff