(show.value = !show.value);
const route = useRoute();
@@ -29,39 +30,39 @@ const items = [
{
id: 1,
icon: Home,
- label: t('sidebar.homepage'),
+ label: () => t('sidebar.homepage'),
path: '/bangumi',
},
{
id: 2,
icon: Calendar,
- label: t('sidebar.calendar'),
+ label: () => t('sidebar.calendar'),
path: '/calendar',
hidden: true,
},
{
id: 3,
icon: Play,
- label: t('sidebar.player'),
+ label: () => t('sidebar.player'),
path: '/player',
},
{
id: 4,
icon: Download,
- label: t('sidebar.downloader'),
+ label: () => t('sidebar.downloader'),
path: '/downloader',
hidden: true,
},
{
id: 5,
icon: Log,
- label: t('sidebar.log'),
+ label: () => t('sidebar.log'),
path: '/log',
},
{
id: 6,
icon: SettingTwo,
- label: t('sidebar.config'),
+ label: () => t('sidebar.config'),
path: '/config',
},
];
@@ -107,7 +108,7 @@ const items = [
:key="i.id"
:to="i.path"
replace
- :title="i.label"
+ :title="i.label()"
fx-cer
px-24px
space-x-42px
@@ -122,7 +123,7 @@ const items = [
]"
>
-
{{ i.label }}
+
{{ i.label() }}
t('topbar.start'),
icon: PlayOne,
handle: start,
},
{
id: 2,
- label: t('topbar.pause'),
+ label: () => t('topbar.pause'),
icon: Pause,
handle: pause,
},
{
id: 3,
- label: t('topbar.restart'),
+ label: () => t('topbar.restart'),
icon: Refresh,
handle: restart,
},
{
id: 4,
- label: t('topbar.shutdown'),
+ label: () => t('topbar.shutdown'),
icon: Power,
handle: shutdown,
},
{
id: 5,
- label: t('topbar.resetrule'),
+ label: () => t('topbar.reset_rule'),
icon: Format,
handle: resetRule,
},
{
id: 6,
- label: t('topbar.profile.title'),
+ label: () => t('topbar.profile.title'),
icon: Me,
handle: () => {
show.value = true;
@@ -66,20 +66,6 @@ onBeforeMount(() => {
onUnmounted(() => {
offUpdate();
});
-
-function changeLocale() {
- if (localStorage.getItem('lang') === 'zh-CN') {
- const newLang = 'en-US';
- locale.value = newLang;
- localStorage.setItem('lang', newLang);
- location.reload();
- } else {
- const newLang = 'zh-CN';
- locale.value = newLang;
- localStorage.setItem('lang', newLang);
- location.reload();
- }
-}
diff --git a/webui/src/components/setting/config-download.vue b/webui/src/components/setting/config-download.vue
index 09d2db82..aee897fb 100644
--- a/webui/src/components/setting/config-download.vue
+++ b/webui/src/components/setting/config-download.vue
@@ -1,9 +1,8 @@
-
+
-import { useI18n } from 'vue-i18n';
import type { BangumiManage, RenameMethod } from '#/config';
import type { SettingItem } from '#/components';
-const { t } = useI18n({ useScope: 'global' });
+const { t } = useMyI18n();
const { getSettingGroup } = useConfigStore();
const manage = getSettingGroup('bangumi_manage');
@@ -12,12 +11,12 @@ const renameMethod: RenameMethod = ['normal', 'pn', 'advance', 'none'];
const items: SettingItem[] = [
{
configKey: 'enable',
- label: t('config.manageset.enable'),
+ label: () => t('config.manage_set.enable'),
type: 'switch',
},
{
configKey: 'rename_method',
- label: t('config.manageset.method'),
+ label: () => t('config.manage_set.method'),
type: 'select',
prop: {
items: renameMethod,
@@ -26,24 +25,24 @@ const items: SettingItem[] = [
},
{
configKey: 'eps_complete',
- label: t('config.manageset.eps'),
+ label: () => t('config.manage_set.eps'),
type: 'switch',
},
{
configKey: 'group_tag',
- label: t('config.manageset.grouptag'),
+ label: () => t('config.manage_set.group_tag'),
type: 'switch',
},
{
configKey: 'remove_bad_torrent',
- label: t('config.manageset.deletebadtorr'),
+ label: () => t('config.manage_set.delete_bad_torrent'),
type: 'switch',
},
];
-
+
-import { useI18n } from 'vue-i18n';
import type { Log, Program } from '#/config';
import type { SettingItem } from '#/components';
-const { t } = useI18n({ useScope: 'global' });
+const { t } = useMyI18n();
const { getSettingGroup } = useConfigStore();
const program = getSettingGroup('program');
@@ -12,7 +11,7 @@ const log = getSettingGroup('log');
const programItems: SettingItem[] = [
{
configKey: 'rss_time',
- label: t('config.normalset.rssintvl'),
+ label: () => t('config.normal_set.rss_interval'),
type: 'input',
css: 'w-72px',
prop: {
@@ -22,7 +21,7 @@ const programItems: SettingItem[] = [
},
{
configKey: 'rename_time',
- label: t('config.normalset.renameintvl'),
+ label: () => t('config.normal_set.rename_interval'),
type: 'input',
css: 'w-72px',
prop: {
@@ -32,7 +31,7 @@ const programItems: SettingItem[] = [
},
{
configKey: 'webui_port',
- label: t('config.normalset.webport'),
+ label: () => t('config.normal_set.web_port'),
type: 'input',
css: 'w-72px',
prop: {
@@ -45,13 +44,13 @@ const programItems: SettingItem[] = [
const logItems: SettingItem = {
configKey: 'debug_enable',
- label: t('config.normalset.debug'),
+ label: () => t('config.normal_set.debug'),
type: 'switch',
};
-
+
-import { useI18n } from 'vue-i18n';
import type { Notification, NotificationType } from '#/config';
import type { SettingItem } from '#/components';
-const { t } = useI18n({ useScope: 'global' });
+const { t } = useMyI18n();
const { getSettingGroup } = useConfigStore();
const notification = getSettingGroup('notification');
@@ -17,13 +16,13 @@ const notificationType: NotificationType = [
const items: SettingItem[] = [
{
configKey: 'enable',
- label: t('config.notificationset.enable'),
+ label: () => t('config.notification_set.enable'),
type: 'switch',
bottomLine: true,
},
{
configKey: 'type',
- label: t('config.notificationset.type'),
+ label: () => t('config.notification_set.type'),
type: 'select',
css: 'w-140px',
prop: {
@@ -32,7 +31,7 @@ const items: SettingItem[] = [
},
{
configKey: 'token',
- label: t('config.notificationset.token'),
+ label: () => t('config.notification_set.token'),
type: 'input',
prop: {
type: 'text',
@@ -41,7 +40,7 @@ const items: SettingItem[] = [
},
{
configKey: 'chat_id',
- label: t('config.notificationset.chatid'),
+ label: () => t('config.notification_set.chat_id'),
type: 'input',
prop: {
type: 'text',
@@ -52,7 +51,7 @@ const items: SettingItem[] = [
-
+
-import { useI18n } from 'vue-i18n';
import type {
RssParser,
RssParserLang,
@@ -8,12 +7,13 @@ import type {
} from '#/config';
import type { SettingItem } from '#/components';
-const { t } = useI18n({ useScope: 'global' });
+const { t } = useMyI18n();
const { getSettingGroup } = useConfigStore();
const parser = getSettingGroup('rss_parser');
const sourceItems: RssParserType = ['mikan'];
+/** @ts-expect-error Incorrect order */
const langs: RssParserLang = ['zh', 'en', 'jp'];
/** @ts-expect-error Incorrect order */
const parserMethods: RssParserMethodType = ['tmdb', 'mikan', 'parser'];
@@ -21,12 +21,12 @@ const parserMethods: RssParserMethodType = ['tmdb', 'mikan', 'parser'];
const items: SettingItem[] = [
{
configKey: 'enable',
- label: t('config.parserset.enable'),
+ label: () => t('config.parser_set.enable'),
type: 'switch',
},
{
configKey: 'type',
- label: t('config.parserset.source'),
+ label: () => t('config.parser_set.source'),
type: 'select',
css: 'w-115px',
prop: {
@@ -35,7 +35,7 @@ const items: SettingItem[] = [
},
{
configKey: 'token',
- label: t('config.parserset.token'),
+ label: () => t('config.parser_set.token'),
type: 'input',
prop: {
type: 'text',
@@ -44,7 +44,7 @@ const items: SettingItem[] = [
},
{
configKey: 'custom_url',
- label: t('config.parserset.url'),
+ label: () => t('config.parser_set.url'),
type: 'input',
prop: {
type: 'text',
@@ -54,7 +54,7 @@ const items: SettingItem[] = [
},
{
configKey: 'language',
- label: t('config.parserset.language'),
+ label: () => t('config.parser_set.language'),
type: 'select',
prop: {
items: langs,
@@ -62,7 +62,7 @@ const items: SettingItem[] = [
},
{
configKey: 'parser_type',
- label: t('config.parserset.type'),
+ label: () => t('config.parser_set.type'),
type: 'select',
prop: {
items: parserMethods,
@@ -70,14 +70,14 @@ const items: SettingItem[] = [
},
{
configKey: 'filter',
- label: t('config.parserset.exclude'),
+ label: () => t('config.parser_set.exclude'),
type: 'dynamic-tags',
},
];
-
+
-
+
diff --git a/webui/src/components/setting/config-proxy.vue b/webui/src/components/setting/config-proxy.vue
index 04407b4e..9e98b063 100644
--- a/webui/src/components/setting/config-proxy.vue
+++ b/webui/src/components/setting/config-proxy.vue
@@ -1,9 +1,8 @@
-
+
{
+ const lang = useLocalStorage('lang', navigator.language);
+
+ const i18n = createI18n({
+ legacy: false,
+ locale: lang.value,
+ fallbackLocale: 'en',
+ messages,
+ });
+
+ function changeLocale() {
+ if (lang.value === 'zh-CN') {
+ i18n.global.locale.value = 'en';
+ lang.value = 'en';
+ } else {
+ i18n.global.locale.value = 'zh-CN';
+ lang.value = 'zh-CN';
+ }
+ }
+
+ return {
+ lang,
+ i18n,
+ t: i18n.global.t,
+ locale: i18n.global.locale,
+ changeLocale,
+ };
+});
diff --git a/webui/src/locales/lang/en-US.json b/webui/src/i18n/en.json
similarity index 70%
rename from webui/src/locales/lang/en-US.json
rename to webui/src/i18n/en.json
index 513e240d..18bd8643 100644
--- a/webui/src/locales/lang/en-US.json
+++ b/webui/src/i18n/en.json
@@ -3,7 +3,7 @@
"title": "Login",
"username": "Username",
"password": "Password",
- "loginbtn": "Login",
+ "login_btn": "Login",
"default": "Default"
},
"sidebar": {
@@ -21,25 +21,24 @@
"pause": "Pause",
"restart": "Restart",
"shutdown": "Shutdown",
- "resetrule": "Reset Rule",
+ "reset_rule": "Reset Rule",
"profile": {
"title": "Profile",
- "poptitle": "Change Account",
+ "pop_title": "Change Account",
"username": "Username",
"password": "Password",
- "updatebtn": "Update"
+ "update_btn": "Update"
},
"add": {
"title": "Add Bangumi",
- "rsslink": "RSS Link",
+ "rss_link": "RSS Link",
"placeholder": "Please enter the RSS link",
"analyse": "Analyse"
}
},
"homepage": {
- "title": "Bangumi List",
"rule": {
- "officaltitle": "Official Title",
+ "offical_title": "Official Title",
"year": "Year",
"season": "Season",
"offset": "Offset",
@@ -48,37 +47,35 @@
"disable": "Disable",
"delete": "Delete",
"apply": "Apply",
- "yesbtn": "Yes",
- "nobtn": "No",
- "enablehit": "Do you want to enable this rule?",
- "deletehit": "Delete Local File?",
- "enablerule": "Enable Rule",
- "editrule": "Edit Rule"
+ "yes_btn": "Yes",
+ "no_btn": "No",
+ "enable_hit": "Do you want to enable this rule?",
+ "delete_hit": "Delete Local File?",
+ "enable_rule": "Enable Rule",
+ "edit_rule": "Edit Rule"
}
},
"player": {
- "title": "Player",
"hit": "Please set up the media player"
},
"log": {
"title": "Log",
"reset": "Reset",
"copy": "Copy",
- "contactinfo": "Contact Infomation",
+ "contact_info": "Contact Infomation",
"go": "Go",
"join": "Join",
- "bugrepo": "Bug Report"
+ "bug_repo": "Bug Report"
},
"config": {
- "title": "Config",
- "normalset": {
+ "normal_set": {
"title": "Normal Setting",
- "rssintvl": "Interval Time of Rss",
- "renameintvl": "Interval Time of Rename",
- "webport": "WebUI Port",
+ "rss_interval": "Interval Time of Rss",
+ "rename_interval": "Interval Time of Rename",
+ "web_port": "WebUI Port",
"debug": "Debug"
},
- "parserset": {
+ "parser_set": {
"title": "Parser Setting",
"enable": "Enable",
"source": "Source",
@@ -88,7 +85,7 @@
"type": "Parser Type",
"exclude": "Exclude"
},
- "downloaderset": {
+ "downloader_set": {
"title": "Downloader Setting",
"type": "Downloader Type",
"host": "Host",
@@ -97,22 +94,22 @@
"path": "Download Path",
"ssl": "SSL"
},
- "manageset": {
+ "manage_set": {
"title": "Manage Setting",
"enable": "Enable",
"method": "Rename Method",
"eps": "EPS complete",
- "grouptag": "Add Group Tag",
- "deletebadtorr": "Delete Bad Torrent"
+ "group_tag": "Add Group Tag",
+ "delete_bad_torrent": "Delete Bad Torrent"
},
- "notificationset": {
+ "notification_set": {
"title": "Notification Setting",
"enable": "Enable",
"type": "Type",
"token": "Token",
- "chatid": "Chat ID"
+ "chat_id": "Chat ID"
},
- "proxyset": {
+ "proxy_set": {
"title": "Proxy Setting",
"enable": "Enable",
"type": "Proxy Type",
@@ -121,7 +118,7 @@
"username": "Username",
"password": "Password"
},
- "mediaplayerset": {
+ "media_player_set": {
"title": "Media Player Setting",
"type": "type",
"url": "url"
diff --git a/webui/src/locales/lang/zh-CN.json b/webui/src/i18n/zh-CN.json
similarity index 63%
rename from webui/src/locales/lang/zh-CN.json
rename to webui/src/i18n/zh-CN.json
index c83e5acc..d07dccb5 100644
--- a/webui/src/locales/lang/zh-CN.json
+++ b/webui/src/i18n/zh-CN.json
@@ -3,8 +3,8 @@
"title": "登录",
"username": "用户名",
"password": "密码",
- "loginbtn": "登录",
- "default": "默认账号密码 "
+ "login_btn": "登录",
+ "default": "默认账号密码"
},
"sidebar": {
"title": "菜单",
@@ -13,7 +13,7 @@
"log": "日志",
"config": "设置",
"logout": "退出",
- "calendar": "日历",
+ "calendar": "番剧日历",
"downloader": "下载器"
},
"topbar": {
@@ -21,64 +21,61 @@
"pause": "暂停",
"restart": "重启",
"shutdown": "关闭",
- "resetrule": "重置规则",
+ "reset_rule": "重置规则",
"profile": {
- "title": "账户资料",
- "poptitle": "修改账户信息",
+ "title": "账户设置",
+ "pop_title": "修改账户",
"username": "用户名",
"password": "密码",
- "updatebtn": "更新"
+ "update_btn": "更新"
},
"add": {
"title": "添加番剧",
- "rsslink": "RSS链接",
+ "rss_link": "RSS链接",
"placeholder": "请输入RSS链接",
"analyse": "分析"
}
},
"homepage": {
- "title": "番剧列表",
"rule": {
- "officaltitle": "官方名称",
+ "offical_title": "官方名称",
"year": "年份",
"season": "季度",
- "offset": "偏移",
+ "offset": "剧集偏移",
"exclude": "排除",
"enable": "启用",
"disable": "禁用",
"delete": "删除",
"apply": "应用",
- "yesbtn": "是",
- "nobtn": "否",
- "enablehit": "确定要让规则生效吗?",
- "deletehit": "删除本地文件?",
- "enablerule": "启用规则",
- "editrule": "编辑规则"
+ "yes_btn": "是",
+ "no_btn": "否",
+ "enable_hit": "确定启用该规则?",
+ "delete_hit": "是否删除本地文件?",
+ "enable_rule": "启用规则",
+ "edit_rule": "编辑规则"
}
},
"player": {
- "title": "播放器",
- "hit": "请设置播放器地址"
+ "hit": "请设置媒体播放器地址"
},
"log": {
"title": "日志",
"reset": "重置",
"copy": "复制",
- "contactinfo": "联系方式",
+ "contact_info": "联系方式",
"go": "访问",
"join": "加入",
- "bugrepo": "Bug反馈"
+ "bug_repo": "Bug 反馈"
},
"config": {
- "title": "系统设置",
- "normalset": {
- "title": "一般设置",
- "rssintvl": "RSS间隔",
- "renameintvl": "重命名间隔",
- "webport": "网页端口",
+ "normal_set": {
+ "title": "常规设置",
+ "rss_interval": "RSS 间隔",
+ "rename_interval": "重命名间隔",
+ "web_port": "网页端口",
"debug": "调试"
},
- "parserset": {
+ "parser_set": {
"title": "解析设置",
"enable": "启用",
"source": "数据源",
@@ -88,7 +85,7 @@
"type": "解析类型",
"exclude": "排除"
},
- "downloaderset": {
+ "downloader_set": {
"title": "下载设置",
"type": "下载器类型",
"host": "下载器地址",
@@ -97,22 +94,22 @@
"path": "下载地址",
"ssl": "SSL"
},
- "manageset": {
+ "manage_set": {
"title": "番剧管理设置",
"enable": "启用",
"method": "重命名方式",
- "eps": "EPS完成",
- "grouptag": "添加组标签",
- "deletebadtorr": "删除坏种"
+ "eps": "番剧补全",
+ "group_tag": "添加组标签",
+ "delete_bad_torrent": "删除坏种"
},
- "notificationset": {
- "title": "推送设置",
+ "notification_set": {
+ "title": "通知设置",
"enable": "启用",
"type": "类型",
"token": "Token",
- "chatid": "Chat ID"
+ "chat_id": "Chat ID"
},
- "proxyset": {
+ "proxy_set": {
"title": "代理设置",
"enable": "启用",
"type": "类型",
@@ -121,7 +118,7 @@
"username": "用户名",
"password": "密码"
},
- "mediaplayerset": {
+ "media_player_set": {
"title": "播放器设置",
"type": "类型",
"url": "播放器地址"
diff --git a/webui/src/locales/index.ts b/webui/src/locales/index.ts
deleted file mode 100644
index bcc4a795..00000000
--- a/webui/src/locales/index.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { createI18n } from 'vue-i18n';
-import enUS from './lang/en-US.json';
-import zhCN from './lang/zh-CN.json';
-
-const messages = {
- 'en-US': enUS,
- 'zh-CN': zhCN,
-};
-
-// Default language is the same as last setting (undefined is browser language)
-let lang = localStorage.getItem('lang');
-if (lang === null) {
- const navLang = navigator.language;
- const localLang = navLang || false;
- lang = localLang || 'en-US';
-}
-localStorage.setItem('lang', lang);
-
-const i18n = createI18n({
- legacy: false,
- locale: lang,
- globalInjection: true,
- silentTranslationWarn: true,
- globalInstall: true,
- messages,
-});
-
-export default i18n;
diff --git a/webui/src/main.ts b/webui/src/main.ts
index f0d24b1b..ab78afa3 100644
--- a/webui/src/main.ts
+++ b/webui/src/main.ts
@@ -1,13 +1,13 @@
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { router } from './router';
-import i18n from './locales';
import App from './App.vue';
import '@unocss/reset/tailwind-compat.css';
import 'virtual:uno.css';
const pinia = createPinia();
+const { i18n } = useMyI18n();
const app = createApp(App);
app.use(router);
diff --git a/webui/src/pages/index.vue b/webui/src/pages/index.vue
index b458bf0a..7ef43097 100644
--- a/webui/src/pages/index.vue
+++ b/webui/src/pages/index.vue
@@ -13,6 +13,8 @@ definePage({
+
+
diff --git a/webui/src/pages/index/bangumi.vue b/webui/src/pages/index/bangumi.vue
index fc6dc328..7225d7d3 100644
--- a/webui/src/pages/index/bangumi.vue
+++ b/webui/src/pages/index/bangumi.vue
@@ -93,7 +93,6 @@ definePage({
-
-
diff --git a/webui/src/pages/index/log.vue b/webui/src/pages/index/log.vue
index fe33e93d..58141bb2 100644
--- a/webui/src/pages/index/log.vue
+++ b/webui/src/pages/index/log.vue
@@ -16,7 +16,6 @@ definePage({
-
@@ -39,7 +38,7 @@ definePage({
-
+
-
+
-
diff --git a/webui/src/pages/login.vue b/webui/src/pages/login.vue
index ad4c3997..fdaa6211 100644
--- a/webui/src/pages/login.vue
+++ b/webui/src/pages/login.vue
@@ -33,7 +33,7 @@ definePage({
{{
- $t('login.loginbtn')
+ $t('login.login_btn')
}}
diff --git a/webui/src/store/config.ts b/webui/src/store/config.ts
index 8be2acc1..b3cdbc52 100644
--- a/webui/src/store/config.ts
+++ b/webui/src/store/config.ts
@@ -35,7 +35,14 @@ export const useConfigStore = defineStore('config', () => {
};
function getSettingGroup(key: Tkey) {
- return computed(() => config.value[key]);
+ return computed({
+ get() {
+ return config.value[key];
+ },
+ set(newVal) {
+ config.value[key] = newVal;
+ },
+ });
}
return {
diff --git a/webui/types/components.ts b/webui/types/components.ts
index 6b2e3381..5f3af19d 100644
--- a/webui/types/components.ts
+++ b/webui/types/components.ts
@@ -6,7 +6,7 @@ export interface SelectItem {
}
export interface AbSettingProps {
- label: string;
+ label: string | (() => string);
type: 'input' | 'switch' | 'select' | 'dynamic-tags';
css?: string;
prop?: any;
diff --git a/webui/types/dts/auto-imports.d.ts b/webui/types/dts/auto-imports.d.ts
index 5d3f7d1d..3c5fa500 100644
--- a/webui/types/dts/auto-imports.d.ts
+++ b/webui/types/dts/auto-imports.d.ts
@@ -190,6 +190,7 @@ declare global {
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
const useGamepad: typeof import('@vueuse/core')['useGamepad']
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
+ const useI18n: typeof import('vue-i18n')['useI18n']
const useIdle: typeof import('@vueuse/core')['useIdle']
const useImage: typeof import('@vueuse/core')['useImage']
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
@@ -212,6 +213,7 @@ declare global {
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
+ const useMyI18n: typeof import('../../src/hooks/useMyI18n')['useMyI18n']
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
const useNetwork: typeof import('@vueuse/core')['useNetwork']
const useNow: typeof import('@vueuse/core')['useNow']
diff --git a/webui/vite.config.ts b/webui/vite.config.ts
index 267af685..44f64732 100644
--- a/webui/vite.config.ts
+++ b/webui/vite.config.ts
@@ -6,6 +6,7 @@ import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import VueRouter from 'unplugin-vue-router/vite';
import { VueRouterAutoImports } from 'unplugin-vue-router';
+import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
// https://vitejs.dev/config/
export default defineConfig({
@@ -21,7 +22,14 @@ export default defineConfig({
}),
UnoCSS(),
AutoImport({
- imports: ['vue', 'vitest', 'pinia', '@vueuse/core', VueRouterAutoImports],
+ imports: [
+ 'vue',
+ 'vitest',
+ 'pinia',
+ '@vueuse/core',
+ VueRouterAutoImports,
+ 'vue-i18n',
+ ],
dts: 'types/dts/auto-imports.d.ts',
dirs: ['src/api', 'src/store', 'src/hooks', 'src/utils'],
}),
@@ -34,6 +42,9 @@ export default defineConfig({
'src/components/setting',
],
}),
+ VueI18nPlugin({
+ include: resolve(__dirname, './src/i18n/**'),
+ }),
],
css: {
preprocessorOptions: {