mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 23:17:33 +08:00
add Chinese (Traditional) language
This commit is contained in:
+4
-3
@@ -3,9 +3,10 @@ import type { ImportFileType } from '@/core/file.ts';
|
||||
export const SUPPORTED_IMAGE_EXTENSIONS: string = '.jpg,.jpeg,.png,.gif,.webp';
|
||||
|
||||
export const DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: string = 'en';
|
||||
export const SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE: Record<string, boolean> = {
|
||||
DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: true,
|
||||
'zh-Hans': true
|
||||
export const SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE: Record<string, string> = {
|
||||
DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE,
|
||||
'zh-Hans': 'zh-Hans',
|
||||
'zh-Hant': 'zh-Hans',
|
||||
};
|
||||
|
||||
export const SUPPORTED_FILE_ENCODINGS: string[] = [
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "Russisch",
|
||||
"Ukrainian": "Ukrainisch",
|
||||
"Vietnamese": "Vietnamesisch",
|
||||
"Chinese (Simplified)": "Chinesisch (Vereinfacht)"
|
||||
"Chinese (Simplified)": "Chinesisch (Vereinfacht)",
|
||||
"Chinese (Traditional)": "Chinesisch (Traditionell)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "EUR",
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "Russian",
|
||||
"Ukrainian": "Ukrainian",
|
||||
"Vietnamese": "Vietnamese",
|
||||
"Chinese (Simplified)": "Chinese (Simplified)"
|
||||
"Chinese (Simplified)": "Chinese (Simplified)",
|
||||
"Chinese (Traditional)": "Chinese (Traditional)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "USD",
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "Ruso",
|
||||
"Ukrainian": "Ucraniano",
|
||||
"Vietnamese": "Vietnamita",
|
||||
"Chinese (Simplified)": "Chino (Simplificado)"
|
||||
"Chinese (Simplified)": "Chino (Simplificado)",
|
||||
"Chinese (Traditional)": "Chino (Tradicional)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "EUR",
|
||||
|
||||
@@ -1087,8 +1087,11 @@ export function useI18n() {
|
||||
if (fileType.document.supportMultiLanguages === true) {
|
||||
documentLanguage = getCurrentLanguageTag();
|
||||
|
||||
if (SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE[documentLanguage]) {
|
||||
if (SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE[documentLanguage] === documentLanguage) {
|
||||
documentAnchor = t(`document.anchor.export_and_import.${fileType.document.anchor}`);
|
||||
} else if (SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE[documentLanguage]) {
|
||||
documentLanguage = SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE[documentLanguage];
|
||||
documentAnchor = t(`document.anchor.export_and_import.${fileType.document.anchor}`, {}, { locale: documentLanguage });
|
||||
} else {
|
||||
documentLanguage = DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE;
|
||||
documentAnchor = t(`document.anchor.export_and_import.${fileType.document.anchor}`, {}, { locale: documentLanguage });
|
||||
|
||||
+11
-3
@@ -1,11 +1,12 @@
|
||||
import de from './de.json';
|
||||
import en from './en.json';
|
||||
import es from './es.json';
|
||||
import ja from './ja.json';
|
||||
import ru from './ru.json';
|
||||
import uk from './uk.json';
|
||||
import es from './es.json';
|
||||
import vi from './vi.json';
|
||||
import zhHans from './zh_Hans.json';
|
||||
import de from './de.json';
|
||||
import ja from './ja.json';
|
||||
import zhHant from './zh_Hant.json';
|
||||
|
||||
export interface LanguageInfo {
|
||||
readonly name: string;
|
||||
@@ -73,5 +74,12 @@ export const ALL_LANGUAGES: Record<string, LanguageInfo> = {
|
||||
alternativeLanguageTag: 'zh-CN',
|
||||
aliases: ['zh-CHS', 'zh-CN', 'zh-SG'],
|
||||
content: zhHans
|
||||
},
|
||||
'zh-Hant': {
|
||||
name: 'Chinese (Traditional)',
|
||||
displayName: '中文 (繁體)',
|
||||
alternativeLanguageTag: 'zh-TW',
|
||||
aliases: ['zh-CHT', 'zh-HK', 'zh-MO'],
|
||||
content: zhHant
|
||||
}
|
||||
};
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "ロシア語",
|
||||
"Ukrainian": "ウクライナ語",
|
||||
"Vietnamese": "ベトナム語",
|
||||
"Chinese (Simplified)": "中国語 (簡体字)"
|
||||
"Chinese (Simplified)": "中国語 (簡体字)",
|
||||
"Chinese (Traditional)": "中国語 (繁体字)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "JPY",
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "Русский",
|
||||
"Ukrainian": "Украинский",
|
||||
"Vietnamese": "Вьетнамский",
|
||||
"Chinese (Simplified)": "Китайский (Упрощенный)"
|
||||
"Chinese (Simplified)": "Китайский (Упрощенный)",
|
||||
"Chinese (Traditional)": "Китайский (Традиционный)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "RUB",
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "Російська",
|
||||
"Ukrainian": "Українська",
|
||||
"Vietnamese": "В'єтнамська",
|
||||
"Chinese (Simplified)": "Китайська (Спрощена)"
|
||||
"Chinese (Simplified)": "Китайська (Спрощена)",
|
||||
"Chinese (Traditional)": "Китайська (Традиційна)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "UAH",
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"Russian": "Tiếng Nga",
|
||||
"Ukrainian": "Tiếng Ukraina",
|
||||
"Vietnamese": "Tiếng Việt",
|
||||
"Chinese (Simplified)": "Tiếng Trung (Giản Thể)"
|
||||
"Chinese (Simplified)": "Tiếng Trung (Giản Thể)",
|
||||
"Chinese (Traditional)": "Tiếng Trung (Phồn Thể)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "VND",
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"Russian": "俄语",
|
||||
"Ukrainian": "乌克兰语",
|
||||
"Vietnamese": "越南语",
|
||||
"Chinese (Simplified)": "中文 (简体)"
|
||||
"Chinese (Simplified)": "中文 (简体)",
|
||||
"Chinese (Traditional)": "中文 (繁体)"
|
||||
},
|
||||
"default": {
|
||||
"currency": "CNY",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user