From ace15a79c655acf88a687b1240e4c211131b1266 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Wed, 18 Jun 2025 17:15:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=9F=E4=B8=80=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- index.html | 2 ++ public/langs/en-us.js | 5 +++++ public/langs/zh-cn.js | 5 +++++ src/locales/locale.ts | 11 +++++++---- 5 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 public/langs/en-us.js create mode 100644 public/langs/zh-cn.js diff --git a/.env b/.env index 412035b..b9c998b 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ VITE_BASE_URL=/ -VITE_APP_TITLE="WANFi Platform" +VITE_APP_TITLE="Platform" # the prefix of the icon name VITE_ICON_PREFIX=icon diff --git a/index.html b/index.html index c62bd48..8f6f311 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,8 @@ + + %VITE_APP_TITLE% diff --git a/public/langs/en-us.js b/public/langs/en-us.js new file mode 100644 index 0000000..5e09480 --- /dev/null +++ b/public/langs/en-us.js @@ -0,0 +1,5 @@ +const enUS = { + system: { + title: 'MacroHub Platform' + } +}; diff --git a/public/langs/zh-cn.js b/public/langs/zh-cn.js new file mode 100644 index 0000000..694c183 --- /dev/null +++ b/public/langs/zh-cn.js @@ -0,0 +1,5 @@ +const zhCN = { + system: { + title: 'MacroHub 平台' + } +}; diff --git a/src/locales/locale.ts b/src/locales/locale.ts index dc38010..85a2d3a 100644 --- a/src/locales/locale.ts +++ b/src/locales/locale.ts @@ -1,9 +1,12 @@ -import zhCN from './langs/zh-cn'; -import enUS from './langs/en-us'; +import localeZhCN from './langs/zh-cn'; +import localeEnUS from './langs/en-us'; + +const fullZhCN = { ...localeZhCN, ...zhCN }; +const fullEnUS = { ...localeEnUS, ...enUS }; const locales: Record = { - 'zh-CN': zhCN, - 'en-US': enUS + 'zh-CN': fullZhCN, + 'en-US': fullEnUS }; export default locales;