From 1cf179d1d68d8249b9b2e295ec90b5d65f519b3c Mon Sep 17 00:00:00 2001 From: Howard Guo <50100922+toto6038@users.noreply.github.com> Date: Sat, 18 Jan 2025 04:38:58 +0800 Subject: [PATCH] fix(locale): remove emoji fallback for Chinese --- docs/app/components/content/SupportedLanguages.vue | 3 +-- src/runtime/locale/index.ts | 4 ++-- src/runtime/locale/{zh_hans.ts => zh_cn.ts} | 2 +- src/runtime/locale/{zh_hant.ts => zh_tw.ts} | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) rename src/runtime/locale/{zh_hans.ts => zh_cn.ts} (98%) rename src/runtime/locale/{zh_hant.ts => zh_tw.ts} (98%) diff --git a/docs/app/components/content/SupportedLanguages.vue b/docs/app/components/content/SupportedLanguages.vue index 14ecfcd46b..5c6713902d 100644 --- a/docs/app/components/content/SupportedLanguages.vue +++ b/docs/app/components/content/SupportedLanguages.vue @@ -21,8 +21,7 @@ function getEmojiFlag(locale: string): string { nb: 'no', sv: 'se', uk: 'ua', - vi: 'vn', - zh: 'cn' + vi: 'vn' } const baseLanguage = locale.split('-')[0]?.toLowerCase() || locale diff --git a/src/runtime/locale/index.ts b/src/runtime/locale/index.ts index 053bddd848..d4bb960d3f 100644 --- a/src/runtime/locale/index.ts +++ b/src/runtime/locale/index.ts @@ -25,5 +25,5 @@ export { default as th } from './th' export { default as tr } from './tr' export { default as uk } from './uk' export { default as vi } from './vi' -export { default as zh_hans } from './zh_hans' -export { default as zh_hant } from './zh_hant' +export { default as zh_cn } from './zh_cn' +export { default as zh_tw } from './zh_tw' diff --git a/src/runtime/locale/zh_hans.ts b/src/runtime/locale/zh_cn.ts similarity index 98% rename from src/runtime/locale/zh_hans.ts rename to src/runtime/locale/zh_cn.ts index b7bf84e4b5..ef2ad3ebb8 100644 --- a/src/runtime/locale/zh_hans.ts +++ b/src/runtime/locale/zh_cn.ts @@ -2,7 +2,7 @@ import { defineLocale } from '../composables/defineLocale' export default defineLocale({ name: '简体中文', - code: 'zh-Hans', + code: 'zh-CN', messages: { inputMenu: { noMatch: '没有匹配的数据', diff --git a/src/runtime/locale/zh_hant.ts b/src/runtime/locale/zh_tw.ts similarity index 98% rename from src/runtime/locale/zh_hant.ts rename to src/runtime/locale/zh_tw.ts index 0261a9f1d2..69115e8c29 100644 --- a/src/runtime/locale/zh_hant.ts +++ b/src/runtime/locale/zh_tw.ts @@ -2,7 +2,7 @@ import { defineLocale } from '../composables/defineLocale' export default defineLocale({ name: '繁體中文', - code: 'zh-Hant', + code: 'zh-TW', messages: { inputMenu: { noMatch: '沒有相符的資料',