add Chinese (Traditional) language
This commit is contained in:
@@ -34,6 +34,9 @@ var AllLanguages = map[string]*LocaleInfo{
|
|||||||
"zh-Hans": {
|
"zh-Hans": {
|
||||||
Content: zhHans,
|
Content: zhHans,
|
||||||
},
|
},
|
||||||
|
"zh-Hant": {
|
||||||
|
Content: zhHant,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetLocaleTextItems(locale string) *LocaleTextItems {
|
func GetLocaleTextItems(locale string) *LocaleTextItems {
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package locales
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/mayswind/ezbookkeeping/pkg/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
var zhHant = &LocaleTextItems{
|
||||||
|
DefaultTypes: &DefaultTypes{
|
||||||
|
DecimalSeparator: core.DECIMAL_SEPARATOR_DOT,
|
||||||
|
DigitGroupingSymbol: core.DIGIT_GROUPING_SYMBOL_COMMA,
|
||||||
|
},
|
||||||
|
DataConverterTextItems: &DataConverterTextItems{
|
||||||
|
Alipay: "支付寶",
|
||||||
|
WeChatWallet: "零錢",
|
||||||
|
},
|
||||||
|
VerifyEmailTextItems: &VerifyEmailTextItems{
|
||||||
|
Title: "驗證郵箱",
|
||||||
|
SalutationFormat: "%s 您好,",
|
||||||
|
DescriptionAboveBtn: "請點擊下方的連結確認您的郵箱地址。",
|
||||||
|
VerifyEmail: "驗證郵箱",
|
||||||
|
DescriptionBelowBtnFormat: "如果您沒有註冊 %s 帳戶,請直接忽略本郵件。如果您無法點擊上述連結,請複製下方的地址然後在您的瀏覽器中貼上。郵箱驗證連結將在 %v 分鐘後過期。",
|
||||||
|
},
|
||||||
|
ForgetPasswordMailTextItems: &ForgetPasswordMailTextItems{
|
||||||
|
Title: "重設密碼",
|
||||||
|
SalutationFormat: "%s 您好,",
|
||||||
|
DescriptionAboveBtn: "我們剛才收到重設您密碼的請求。您可以點擊下方連結重設您的密碼。",
|
||||||
|
ResetPassword: "重設密碼",
|
||||||
|
DescriptionBelowBtnFormat: "如果您沒有請求重設密碼,請直接忽略本郵件。如果您無法點擊上述連結,請複製下方的地址然後在您的瀏覽器中貼上。重設密碼連結將在 %v 分鐘後過期。",
|
||||||
|
},
|
||||||
|
}
|
||||||
+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 SUPPORTED_IMAGE_EXTENSIONS: string = '.jpg,.jpeg,.png,.gif,.webp';
|
||||||
|
|
||||||
export const DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: string = 'en';
|
export const DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: string = 'en';
|
||||||
export const SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE: Record<string, boolean> = {
|
export const SUPPORTED_DOCUMENT_LANGUAGES_FOR_IMPORT_FILE: Record<string, string> = {
|
||||||
DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: true,
|
DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE: DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE,
|
||||||
'zh-Hans': true
|
'zh-Hans': 'zh-Hans',
|
||||||
|
'zh-Hant': 'zh-Hans',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SUPPORTED_FILE_ENCODINGS: string[] = [
|
export const SUPPORTED_FILE_ENCODINGS: string[] = [
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "Russisch",
|
"Russian": "Russisch",
|
||||||
"Ukrainian": "Ukrainisch",
|
"Ukrainian": "Ukrainisch",
|
||||||
"Vietnamese": "Vietnamesisch",
|
"Vietnamese": "Vietnamesisch",
|
||||||
"Chinese (Simplified)": "Chinesisch (Vereinfacht)"
|
"Chinese (Simplified)": "Chinesisch (Vereinfacht)",
|
||||||
|
"Chinese (Traditional)": "Chinesisch (Traditionell)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "EUR",
|
"currency": "EUR",
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "Russian",
|
"Russian": "Russian",
|
||||||
"Ukrainian": "Ukrainian",
|
"Ukrainian": "Ukrainian",
|
||||||
"Vietnamese": "Vietnamese",
|
"Vietnamese": "Vietnamese",
|
||||||
"Chinese (Simplified)": "Chinese (Simplified)"
|
"Chinese (Simplified)": "Chinese (Simplified)",
|
||||||
|
"Chinese (Traditional)": "Chinese (Traditional)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "USD",
|
"currency": "USD",
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "Ruso",
|
"Russian": "Ruso",
|
||||||
"Ukrainian": "Ucraniano",
|
"Ukrainian": "Ucraniano",
|
||||||
"Vietnamese": "Vietnamita",
|
"Vietnamese": "Vietnamita",
|
||||||
"Chinese (Simplified)": "Chino (Simplificado)"
|
"Chinese (Simplified)": "Chino (Simplificado)",
|
||||||
|
"Chinese (Traditional)": "Chino (Tradicional)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "EUR",
|
"currency": "EUR",
|
||||||
|
|||||||
@@ -1087,8 +1087,11 @@ export function useI18n() {
|
|||||||
if (fileType.document.supportMultiLanguages === true) {
|
if (fileType.document.supportMultiLanguages === true) {
|
||||||
documentLanguage = getCurrentLanguageTag();
|
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}`);
|
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 {
|
} else {
|
||||||
documentLanguage = DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE;
|
documentLanguage = DEFAULT_DOCUMENT_LANGUAGE_FOR_IMPORT_FILE;
|
||||||
documentAnchor = t(`document.anchor.export_and_import.${fileType.document.anchor}`, {}, { locale: documentLanguage });
|
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 en from './en.json';
|
||||||
|
import es from './es.json';
|
||||||
|
import ja from './ja.json';
|
||||||
import ru from './ru.json';
|
import ru from './ru.json';
|
||||||
import uk from './uk.json';
|
import uk from './uk.json';
|
||||||
import es from './es.json';
|
|
||||||
import vi from './vi.json';
|
import vi from './vi.json';
|
||||||
import zhHans from './zh_Hans.json';
|
import zhHans from './zh_Hans.json';
|
||||||
import de from './de.json';
|
import zhHant from './zh_Hant.json';
|
||||||
import ja from './ja.json';
|
|
||||||
|
|
||||||
export interface LanguageInfo {
|
export interface LanguageInfo {
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
@@ -73,5 +74,12 @@ export const ALL_LANGUAGES: Record<string, LanguageInfo> = {
|
|||||||
alternativeLanguageTag: 'zh-CN',
|
alternativeLanguageTag: 'zh-CN',
|
||||||
aliases: ['zh-CHS', 'zh-CN', 'zh-SG'],
|
aliases: ['zh-CHS', 'zh-CN', 'zh-SG'],
|
||||||
content: zhHans
|
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": "ロシア語",
|
"Russian": "ロシア語",
|
||||||
"Ukrainian": "ウクライナ語",
|
"Ukrainian": "ウクライナ語",
|
||||||
"Vietnamese": "ベトナム語",
|
"Vietnamese": "ベトナム語",
|
||||||
"Chinese (Simplified)": "中国語 (簡体字)"
|
"Chinese (Simplified)": "中国語 (簡体字)",
|
||||||
|
"Chinese (Traditional)": "中国語 (繁体字)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "JPY",
|
"currency": "JPY",
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "Русский",
|
"Russian": "Русский",
|
||||||
"Ukrainian": "Украинский",
|
"Ukrainian": "Украинский",
|
||||||
"Vietnamese": "Вьетнамский",
|
"Vietnamese": "Вьетнамский",
|
||||||
"Chinese (Simplified)": "Китайский (Упрощенный)"
|
"Chinese (Simplified)": "Китайский (Упрощенный)",
|
||||||
|
"Chinese (Traditional)": "Китайский (Традиционный)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "RUB",
|
"currency": "RUB",
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "Російська",
|
"Russian": "Російська",
|
||||||
"Ukrainian": "Українська",
|
"Ukrainian": "Українська",
|
||||||
"Vietnamese": "В'єтнамська",
|
"Vietnamese": "В'єтнамська",
|
||||||
"Chinese (Simplified)": "Китайська (Спрощена)"
|
"Chinese (Simplified)": "Китайська (Спрощена)",
|
||||||
|
"Chinese (Traditional)": "Китайська (Традиційна)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "UAH",
|
"currency": "UAH",
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "Tiếng Nga",
|
"Russian": "Tiếng Nga",
|
||||||
"Ukrainian": "Tiếng Ukraina",
|
"Ukrainian": "Tiếng Ukraina",
|
||||||
"Vietnamese": "Tiếng Việt",
|
"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": {
|
"default": {
|
||||||
"currency": "VND",
|
"currency": "VND",
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
"Russian": "俄语",
|
"Russian": "俄语",
|
||||||
"Ukrainian": "乌克兰语",
|
"Ukrainian": "乌克兰语",
|
||||||
"Vietnamese": "越南语",
|
"Vietnamese": "越南语",
|
||||||
"Chinese (Simplified)": "中文 (简体)"
|
"Chinese (Simplified)": "中文 (简体)",
|
||||||
|
"Chinese (Traditional)": "中文 (繁体)"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"currency": "CNY",
|
"currency": "CNY",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user