mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-03 20:13:02 +00:00
feat(i18n): add Brazilian Portuguese (pt-BR) locale
Adds a full pt-BR translation of the dashboard UI alongside the existing en/zh-CN/vi/ja/ko locales, and wires locale detection/ storage to recognize pt-* browser locales. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2043c65de7
commit
bb2596e296
2 files changed
+2808
-1
No files matched your search
+2806
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
export const LOCALE_STORAGE_KEY = 'ccs-ui-locale';
|
||||
|
||||
export const SUPPORTED_LOCALES = ['en', 'zh-CN', 'vi', 'ja', 'ko'] as const;
|
||||
export const SUPPORTED_LOCALES = ['en', 'pt-BR', 'zh-CN', 'vi', 'ja', 'ko'] as const;
|
||||
|
||||
export type AppLocale = (typeof SUPPORTED_LOCALES)[number];
|
||||
|
||||
@@ -14,6 +14,7 @@ export function normalizeLocale(locale: string | null | undefined): AppLocale {
|
||||
if (locale.toLowerCase().startsWith('ja')) return 'ja';
|
||||
if (locale.toLowerCase().startsWith('zh')) return 'zh-CN';
|
||||
if (locale.toLowerCase().startsWith('vi')) return 'vi';
|
||||
if (locale.toLowerCase().startsWith('pt')) return 'pt-BR';
|
||||
return 'en';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user