diff --git a/.env b/.env index 5823e02..0c3e4e1 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..16009e9 --- /dev/null +++ b/public/langs/en-us.js @@ -0,0 +1,5 @@ +const enUS = { + system: { + title: 'MacroHub' + } +}; diff --git a/public/langs/zh-cn.js b/public/langs/zh-cn.js new file mode 100644 index 0000000..1f81503 --- /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; diff --git a/src/views/_builtin/login/index.vue b/src/views/_builtin/login/index.vue index 84f0502..70ca0bd 100644 --- a/src/views/_builtin/login/index.vue +++ b/src/views/_builtin/login/index.vue @@ -62,7 +62,7 @@ const bgColor = computed(() => {
-

{{ "WANFi" }}

+

{{ $t('system.title') }}