From abe46cea21d6fbf97246049318c0999aa65d32cf Mon Sep 17 00:00:00 2001 From: lisonge Date: Wed, 21 Aug 2024 11:54:21 +0800 Subject: [PATCH] chore: rm vue-i18n --- package.json | 1 - pnpm-lock.yaml | 40 ---------------------------------------- src/i18n.ts | 17 ----------------- src/main.ts | 2 -- 4 files changed, 60 deletions(-) delete mode 100644 src/i18n.ts diff --git a/package.json b/package.json index e61d126..b87ae0c 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "vite": "5.3.5", "vite-plugin-monkey": "4.0.6", "vue": "3.4.34", - "vue-i18n": "9.13.1", "vue-router": "4.4.0", "vue-tsc": "2.0.29" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2985499..36ea930 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -158,9 +158,6 @@ importers: vue: specifier: 3.4.34 version: 3.4.34(typescript@5.5.4) - vue-i18n: - specifier: 9.13.1 - version: 9.13.1(vue@3.4.34(typescript@5.5.4)) vue-router: specifier: 4.4.0 version: 4.4.0(vue@3.4.34(typescript@5.5.4)) @@ -1108,18 +1105,6 @@ packages: '@iconify/utils@2.1.29': resolution: {integrity: sha512-wCcTsmlJvTi1VWBgcJ7HeuWlh7gLGWY7L9HmbgMfjOfsoo7DADemB2Nqnrw1KvCdEAxLL5wTMBAOP5BesFrtng==} - '@intlify/core-base@9.13.1': - resolution: {integrity: sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==} - engines: {node: '>= 16'} - - '@intlify/message-compiler@9.13.1': - resolution: {integrity: sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==} - engines: {node: '>= 16'} - - '@intlify/shared@9.13.1': - resolution: {integrity: sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==} - engines: {node: '>= 16'} - '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -3223,12 +3208,6 @@ packages: peerDependencies: eslint: '>=6.0.0' - vue-i18n@9.13.1: - resolution: {integrity: sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==} - engines: {node: '>= 16'} - peerDependencies: - vue: ^3.0.0 - vue-router@4.4.0: resolution: {integrity: sha512-HB+t2p611aIZraV2aPSRNXf0Z/oLZFrlygJm+sZbdJaW6lcFqEDQwnzUBXn+DApw+/QzDU/I9TeWx9izEjTmsA==} peerDependencies: @@ -4603,18 +4582,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@intlify/core-base@9.13.1': - dependencies: - '@intlify/message-compiler': 9.13.1 - '@intlify/shared': 9.13.1 - - '@intlify/message-compiler@9.13.1': - dependencies: - '@intlify/shared': 9.13.1 - source-map-js: 1.2.0 - - '@intlify/shared@9.13.1': {} - '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -6870,13 +6837,6 @@ snapshots: transitivePeerDependencies: - supports-color - vue-i18n@9.13.1(vue@3.4.34(typescript@5.5.4)): - dependencies: - '@intlify/core-base': 9.13.1 - '@intlify/shared': 9.13.1 - '@vue/devtools-api': 6.6.3 - vue: 3.4.34(typescript@5.5.4) - vue-router@4.4.0(vue@3.4.34(typescript@5.5.4)): dependencies: '@vue/devtools-api': 6.6.3 diff --git a/src/i18n.ts b/src/i18n.ts deleted file mode 100644 index 03abdfb..0000000 --- a/src/i18n.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createI18n } from 'vue-i18n'; - -const i18n = createI18n({ - legacy: false, - locale: navigator.language, - fallbackLocale: 'en', - messages: { - en: { - preview: `preview`, - }, - 'zh-CN': { - preview: `查看`, - }, - }, -}); - -export default i18n; diff --git a/src/main.ts b/src/main.ts index 3158c1a..eb65110 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,6 @@ import 'normalize.css'; import { createPinia } from 'pinia'; import 'virtual:uno.css'; import App from './App.vue'; -import i18n from './i18n'; import router from './router'; import { commitLog } from './utils/commit'; import root from './utils/root'; @@ -18,7 +17,6 @@ router.beforeEach(async (to, from, next) => { }); const pinia = createPinia(); const app = createApp(App); -app.use(i18n); app.use(router); app.use(pinia); app.mount(root);