chore(i18n): add Traditional Chinese locale and translations (#1839)

This commit is contained in:
rudd6617 2025-11-20 20:42:31 +08:00 committed by GitHub
parent 3c75e0a9b6
commit b6dcde7f6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

View File

@ -1,11 +1,11 @@
import {createI18n} from 'vue-i18n'
import type {PluralizationRule} from 'vue-i18n'
import type { PluralizationRule } from 'vue-i18n'
import { createI18n } from 'vue-i18n'
import langEN from './lang/en.json'
import { loadDayJsLocale } from '@/i18n/useDayjsLanguageSync.ts'
import dayjs from 'dayjs'
import localizedFormat from 'dayjs/plugin/localizedFormat'
import relativeTime from 'dayjs/plugin/relativeTime'
import dayjs from 'dayjs'
import {loadDayJsLocale} from '@/i18n/useDayjsLanguageSync.ts'
dayjs.extend(localizedFormat)
dayjs.extend(relativeTime)
@ -22,7 +22,8 @@ export const SUPPORTED_LOCALES = {
'pl-PL': 'Polski',
'nl-NL': 'Nederlands',
'pt-PT': 'Português',
'zh-CN': '中文',
'zh-CN': '简体中文',
'zh-TW': '繁體中文',
'no-NO': 'Norsk Bokmål',
'es-ES': 'Español',
'da-DK': 'Dansk',

View File

@ -1,7 +1,7 @@
import {computed, ref, watch} from 'vue'
import type dayjs from 'dayjs'
import { computed, ref, watch } from 'vue'
import {i18n, type ISOLanguage, type SupportedLocale} from '@/i18n'
import { i18n, type ISOLanguage, type SupportedLocale } from '@/i18n'
export const DAYJS_LOCALE_MAPPING = {
'de-de': 'de',
@ -15,6 +15,7 @@ export const DAYJS_LOCALE_MAPPING = {
'nl-nl': 'nl',
'pt-pt': 'pt',
'zh-cn': 'zh-cn',
'zh-tw': 'zh-tw',
'no-no': 'nb',
'es-es': 'es',
'da-dk': 'da',
@ -45,6 +46,7 @@ export const DAYJS_LANGUAGE_IMPORTS = {
'nl-nl': () => import('dayjs/locale/nl'),
'pt-pt': () => import('dayjs/locale/pt'),
'zh-cn': () => import('dayjs/locale/zh-cn'),
'zh-tw': () => import('dayjs/locale/zh-tw'),
'no-no': () => import('dayjs/locale/nb'),
'es-es': () => import('dayjs/locale/es'),
'da-dk': () => import('dayjs/locale/da'),

View File

@ -59,6 +59,7 @@ var availableLanguages = map[string]bool{
"nl-NL": true,
"pt-PT": true,
"zh-CN": true,
"zh-TW": true,
"no-NO": true,
"es-ES": true,
"da-DK": true,