From dc30a3d1c3b5d143d15f1fde860db6049d9b9d2c Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:18:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20vue=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=9C=AA=E5=85=BC=E5=AE=B9=E7=B9=81=E4=BD=93=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#7044)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #7033 --- frontend/src/App.vue | 2 ++ frontend/src/lang/modules/tw.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 8cd639de1..4a57d4a53 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -8,6 +8,7 @@ import { reactive, computed, ref, nextTick, provide } from 'vue'; import { GlobalStore } from '@/store'; import zhCn from 'element-plus/es/locale/lang/zh-cn'; +import zhTw from 'element-plus/es/locale/lang/zh-tw'; import en from 'element-plus/es/locale/lang/en'; import { useTheme } from '@/hooks/use-theme'; useTheme(); @@ -19,6 +20,7 @@ const config = reactive({ const i18nLocale = computed(() => { if (globalStore.language === 'zh') return zhCn; + if (globalStore.language === 'tw') return zhTw; if (globalStore.language === 'en') return en; return zhCn; }); diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index cbe70cd11..71d5d2b43 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1,4 +1,4 @@ -import fit2cloudTwLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn'; +import fit2cloudTwLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-tw'; let xpackTwLocale = {}; const xpackModules = import.meta.glob('../../xpack/lang/tw.ts', { eager: true }); if (xpackModules['../../xpack/lang/tw.ts']) {