mirror of https://github.com/Fabio286/antares.git
Merge pull request #397 from antares-sql/dependabot/npm_and_yarn/vue-i18n-9.2.0
build(deps): bump vue-i18n from 9.1.10 to 9.2.0
This commit is contained in:
commit
e2307341f3
|
@ -37,7 +37,7 @@
|
|||
"ssh2-promise": "~1.0.2",
|
||||
"v-mask": "~2.3.0",
|
||||
"vue": "~3.2.37",
|
||||
"vue-i18n": "~9.1.9",
|
||||
"vue-i18n": "~9.2.0",
|
||||
"vuedraggable": "~4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -2031,85 +2031,60 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@intlify/core-base": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.1.10.tgz",
|
||||
"integrity": "sha512-So9CNUavB/IsZ+zBmk2Cv6McQp6vc2wbGi1S0XQmJ8Vz+UFcNn9MFXAe9gY67PreIHrbLsLxDD0cwo1qsxM1Nw==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.2.0.tgz",
|
||||
"integrity": "sha512-PkaiY9FAzZHAwPNaS+3csXR6L5k8LFBsSjn63/dy5BqE3pOJd07R4+NYtk8ezxymUemu7p5cS9YX77cmnQO6aQ==",
|
||||
"dependencies": {
|
||||
"@intlify/devtools-if": "9.1.10",
|
||||
"@intlify/message-compiler": "9.1.10",
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/runtime": "9.1.10",
|
||||
"@intlify/shared": "9.1.10",
|
||||
"@intlify/vue-devtools": "9.1.10"
|
||||
"@intlify/devtools-if": "9.2.0",
|
||||
"@intlify/message-compiler": "9.2.0",
|
||||
"@intlify/shared": "9.2.0",
|
||||
"@intlify/vue-devtools": "9.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@intlify/devtools-if": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/devtools-if/-/devtools-if-9.1.10.tgz",
|
||||
"integrity": "sha512-SHaKoYu6sog3+Q8js1y3oXLywuogbH1sKuc7NSYkN3GElvXSBaMoCzW+we0ZSFqj/6c7vTNLg9nQ6rxhKqYwnQ==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/devtools-if/-/devtools-if-9.2.0.tgz",
|
||||
"integrity": "sha512-8yfusyhUaqInnn6Cma+NTTh5+EWyrnAkez36qADetbUnY4tCeGyAy+MmIAGh0uqmJVIeX94vd6L1AaA0p9McGg==",
|
||||
"dependencies": {
|
||||
"@intlify/shared": "9.1.10"
|
||||
"@intlify/shared": "9.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@intlify/message-compiler": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.1.10.tgz",
|
||||
"integrity": "sha512-+JiJpXff/XTb0EadYwdxOyRTB0hXNd4n1HaJ/a4yuV960uRmPXaklJsedW0LNdcptd/hYUZtCkI7Lc9J5C1gxg==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.2.0.tgz",
|
||||
"integrity": "sha512-KGwwZsl+Nw2O26ZOKdytncxzKnMZ236KmM70u4GePgbizI+pu8yAh0apKxljSPzEJ7WECKTVc9R+laG12EJQYA==",
|
||||
"dependencies": {
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/shared": "9.1.10",
|
||||
"@intlify/shared": "9.2.0",
|
||||
"source-map": "0.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@intlify/message-resolver": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.1.10.tgz",
|
||||
"integrity": "sha512-5YixMG/M05m0cn9+gOzd4EZQTFRUu8RGhzxJbR1DWN21x/Z3bJ8QpDYj6hC4FwBj5uKsRfKpJQ3Xqg98KWoA+w==",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@intlify/runtime": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.1.10.tgz",
|
||||
"integrity": "sha512-7QsuByNzpe3Gfmhwq6hzgXcMPpxz8Zxb/XFI6s9lQdPLPe5Lgw4U1ovRPZTOs6Y2hwitR3j/HD8BJNGWpJnOFA==",
|
||||
"dependencies": {
|
||||
"@intlify/message-compiler": "9.1.10",
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/shared": "9.1.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@intlify/shared": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.10.tgz",
|
||||
"integrity": "sha512-Om54xJeo1Vw+K1+wHYyXngE8cAbrxZHpWjYzMR9wCkqbhGtRV5VLhVc214Ze2YatPrWlS2WSMOWXR8JktX/IgA==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.2.0.tgz",
|
||||
"integrity": "sha512-71uObL3Sy2ZiBQBMVETbkspE4Plpy87Hvlj6FAUF3xdD+M82tuxe3MVJjaD3ucqhtHmQWBkAWEurVLdPYr8G2g==",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@intlify/vue-devtools": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.1.10.tgz",
|
||||
"integrity": "sha512-5l3qYARVbkWAkagLu1XbDUWRJSL8br1Dj60wgMaKB0+HswVsrR6LloYZTg7ozyvM621V6+zsmwzbQxbVQyrytQ==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.2.0.tgz",
|
||||
"integrity": "sha512-6P/tE/JdNNVo1z/sr/FnSd90OVlox2XuKMmzHR13nvpHGX7fjRn6pVv47L2jySOYG1cMezmYvJl14TAddKpw5Q==",
|
||||
"dependencies": {
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/runtime": "9.1.10",
|
||||
"@intlify/shared": "9.1.10"
|
||||
"@intlify/core-base": "9.2.0",
|
||||
"@intlify/shared": "9.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@jest/types": {
|
||||
|
@ -16755,17 +16730,17 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vue-i18n": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.1.10.tgz",
|
||||
"integrity": "sha512-jpr7gV5KPk4n+sSPdpZT8Qx3XzTcNDWffRlHV/cT2NUyEf+sEgTTmLvnBAibjOFJ0zsUyZlVTAWH5DDnYep+1g==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.2.0.tgz",
|
||||
"integrity": "sha512-vN8aW8Vn4r4eRhUgTLK1/kCIYMb3LQmuloa1YP4NsehiASCX0XCq50tgUAz1o0eBAZ8YvhdlaVPqlO7O0wCnkQ==",
|
||||
"dependencies": {
|
||||
"@intlify/core-base": "9.1.10",
|
||||
"@intlify/shared": "9.1.10",
|
||||
"@intlify/vue-devtools": "9.1.10",
|
||||
"@vue/devtools-api": "^6.0.0-beta.7"
|
||||
"@intlify/core-base": "9.2.0",
|
||||
"@intlify/shared": "9.2.0",
|
||||
"@intlify/vue-devtools": "9.2.0",
|
||||
"@vue/devtools-api": "^6.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
"node": ">= 14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
|
@ -18966,64 +18941,45 @@
|
|||
"dev": true
|
||||
},
|
||||
"@intlify/core-base": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.1.10.tgz",
|
||||
"integrity": "sha512-So9CNUavB/IsZ+zBmk2Cv6McQp6vc2wbGi1S0XQmJ8Vz+UFcNn9MFXAe9gY67PreIHrbLsLxDD0cwo1qsxM1Nw==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.2.0.tgz",
|
||||
"integrity": "sha512-PkaiY9FAzZHAwPNaS+3csXR6L5k8LFBsSjn63/dy5BqE3pOJd07R4+NYtk8ezxymUemu7p5cS9YX77cmnQO6aQ==",
|
||||
"requires": {
|
||||
"@intlify/devtools-if": "9.1.10",
|
||||
"@intlify/message-compiler": "9.1.10",
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/runtime": "9.1.10",
|
||||
"@intlify/shared": "9.1.10",
|
||||
"@intlify/vue-devtools": "9.1.10"
|
||||
"@intlify/devtools-if": "9.2.0",
|
||||
"@intlify/message-compiler": "9.2.0",
|
||||
"@intlify/shared": "9.2.0",
|
||||
"@intlify/vue-devtools": "9.2.0"
|
||||
}
|
||||
},
|
||||
"@intlify/devtools-if": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/devtools-if/-/devtools-if-9.1.10.tgz",
|
||||
"integrity": "sha512-SHaKoYu6sog3+Q8js1y3oXLywuogbH1sKuc7NSYkN3GElvXSBaMoCzW+we0ZSFqj/6c7vTNLg9nQ6rxhKqYwnQ==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/devtools-if/-/devtools-if-9.2.0.tgz",
|
||||
"integrity": "sha512-8yfusyhUaqInnn6Cma+NTTh5+EWyrnAkez36qADetbUnY4tCeGyAy+MmIAGh0uqmJVIeX94vd6L1AaA0p9McGg==",
|
||||
"requires": {
|
||||
"@intlify/shared": "9.1.10"
|
||||
"@intlify/shared": "9.2.0"
|
||||
}
|
||||
},
|
||||
"@intlify/message-compiler": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.1.10.tgz",
|
||||
"integrity": "sha512-+JiJpXff/XTb0EadYwdxOyRTB0hXNd4n1HaJ/a4yuV960uRmPXaklJsedW0LNdcptd/hYUZtCkI7Lc9J5C1gxg==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.2.0.tgz",
|
||||
"integrity": "sha512-KGwwZsl+Nw2O26ZOKdytncxzKnMZ236KmM70u4GePgbizI+pu8yAh0apKxljSPzEJ7WECKTVc9R+laG12EJQYA==",
|
||||
"requires": {
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/shared": "9.1.10",
|
||||
"@intlify/shared": "9.2.0",
|
||||
"source-map": "0.6.1"
|
||||
}
|
||||
},
|
||||
"@intlify/message-resolver": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.1.10.tgz",
|
||||
"integrity": "sha512-5YixMG/M05m0cn9+gOzd4EZQTFRUu8RGhzxJbR1DWN21x/Z3bJ8QpDYj6hC4FwBj5uKsRfKpJQ3Xqg98KWoA+w=="
|
||||
},
|
||||
"@intlify/runtime": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.1.10.tgz",
|
||||
"integrity": "sha512-7QsuByNzpe3Gfmhwq6hzgXcMPpxz8Zxb/XFI6s9lQdPLPe5Lgw4U1ovRPZTOs6Y2hwitR3j/HD8BJNGWpJnOFA==",
|
||||
"requires": {
|
||||
"@intlify/message-compiler": "9.1.10",
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/shared": "9.1.10"
|
||||
}
|
||||
},
|
||||
"@intlify/shared": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.10.tgz",
|
||||
"integrity": "sha512-Om54xJeo1Vw+K1+wHYyXngE8cAbrxZHpWjYzMR9wCkqbhGtRV5VLhVc214Ze2YatPrWlS2WSMOWXR8JktX/IgA=="
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.2.0.tgz",
|
||||
"integrity": "sha512-71uObL3Sy2ZiBQBMVETbkspE4Plpy87Hvlj6FAUF3xdD+M82tuxe3MVJjaD3ucqhtHmQWBkAWEurVLdPYr8G2g=="
|
||||
},
|
||||
"@intlify/vue-devtools": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.1.10.tgz",
|
||||
"integrity": "sha512-5l3qYARVbkWAkagLu1XbDUWRJSL8br1Dj60wgMaKB0+HswVsrR6LloYZTg7ozyvM621V6+zsmwzbQxbVQyrytQ==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.2.0.tgz",
|
||||
"integrity": "sha512-6P/tE/JdNNVo1z/sr/FnSd90OVlox2XuKMmzHR13nvpHGX7fjRn6pVv47L2jySOYG1cMezmYvJl14TAddKpw5Q==",
|
||||
"requires": {
|
||||
"@intlify/message-resolver": "9.1.10",
|
||||
"@intlify/runtime": "9.1.10",
|
||||
"@intlify/shared": "9.1.10"
|
||||
"@intlify/core-base": "9.2.0",
|
||||
"@intlify/shared": "9.2.0"
|
||||
}
|
||||
},
|
||||
"@jest/types": {
|
||||
|
@ -30087,14 +30043,14 @@
|
|||
}
|
||||
},
|
||||
"vue-i18n": {
|
||||
"version": "9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.1.10.tgz",
|
||||
"integrity": "sha512-jpr7gV5KPk4n+sSPdpZT8Qx3XzTcNDWffRlHV/cT2NUyEf+sEgTTmLvnBAibjOFJ0zsUyZlVTAWH5DDnYep+1g==",
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.2.0.tgz",
|
||||
"integrity": "sha512-vN8aW8Vn4r4eRhUgTLK1/kCIYMb3LQmuloa1YP4NsehiASCX0XCq50tgUAz1o0eBAZ8YvhdlaVPqlO7O0wCnkQ==",
|
||||
"requires": {
|
||||
"@intlify/core-base": "9.1.10",
|
||||
"@intlify/shared": "9.1.10",
|
||||
"@intlify/vue-devtools": "9.1.10",
|
||||
"@vue/devtools-api": "^6.0.0-beta.7"
|
||||
"@intlify/core-base": "9.2.0",
|
||||
"@intlify/shared": "9.2.0",
|
||||
"@intlify/vue-devtools": "9.2.0",
|
||||
"@vue/devtools-api": "^6.2.1"
|
||||
}
|
||||
},
|
||||
"vue-loader": {
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
"ssh2-promise": "~1.0.2",
|
||||
"v-mask": "~2.3.0",
|
||||
"vue": "~3.2.37",
|
||||
"vue-i18n": "~9.1.9",
|
||||
"vue-i18n": "~9.2.0",
|
||||
"vuedraggable": "~4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -329,7 +329,7 @@ import ModalSettingsChangelog from '@/components/ModalSettingsChangelog.vue';
|
|||
import BaseTextEditor from '@/components/BaseTextEditor.vue';
|
||||
import BaseSelect from '@/components/BaseSelect.vue';
|
||||
|
||||
const { t, availableLocales } = useI18n();
|
||||
const { t, AvailableLocale } = useI18n();
|
||||
|
||||
const applicationStore = useApplicationStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
@ -456,7 +456,7 @@ const selectedTab: Ref<string> = ref('general');
|
|||
|
||||
const locales = computed(() => {
|
||||
const locales = [];
|
||||
for (const locale of availableLocales)
|
||||
for (const locale of AvailableLocale)
|
||||
locales.push({ code: locale, name: localesNames[locale] });
|
||||
|
||||
return locales;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const arSA = {
|
||||
word: {
|
||||
edit: 'تعديل',
|
||||
save: 'حفظ',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const deDE = {
|
||||
word: {
|
||||
edit: 'Bearbeiten',
|
||||
save: 'Speichern',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const enUS = {
|
||||
word: {
|
||||
edit: 'Edit',
|
||||
save: 'Save',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const esES = {
|
||||
word: {
|
||||
edit: 'Editar',
|
||||
save: 'Guardar',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const frFR = {
|
||||
word: {
|
||||
edit: 'Editer',
|
||||
save: 'Sauver',
|
||||
|
|
|
@ -1,19 +1,40 @@
|
|||
import { createI18n } from 'vue-i18n';
|
||||
import { enUS } from './en-US';
|
||||
import { itIT } from './it-IT';
|
||||
import { arSA } from './ar-SA';
|
||||
import { esES } from './es-ES';
|
||||
import { frFR } from './fr-FR';
|
||||
import { ptBR } from './pt-BR';
|
||||
import { deDE } from './de-DE';
|
||||
import { viVN } from './vi-VN';
|
||||
import { jaJP } from './ja-JP';
|
||||
import { zhCN } from './zh-CN';
|
||||
import { ruRU } from './ru-RU';
|
||||
|
||||
const i18n = createI18n({
|
||||
const messages = {
|
||||
'en-US': enUS,
|
||||
'it-IT': itIT,
|
||||
'ar-SA': arSA,
|
||||
'es-ES': esES,
|
||||
'fr-FR': frFR,
|
||||
'pt-BR': ptBR,
|
||||
'de-DE': deDE,
|
||||
'vi-VN': viVN,
|
||||
'ja-JP': jaJP,
|
||||
'zh-CN': zhCN,
|
||||
'ru-RU': ruRU
|
||||
};
|
||||
|
||||
type NestedPartial<T> = {
|
||||
[K in keyof T]?: T[K] extends Array<infer R> ? Array<NestedPartial<R>> : (T[K] extends unknown ? unknown : NestedPartial<T[K]>)
|
||||
};
|
||||
|
||||
export type MessageSchema = typeof enUS
|
||||
export type AvailableLocale = keyof typeof messages
|
||||
|
||||
const i18n = createI18n<[NestedPartial<MessageSchema>], AvailableLocale>({
|
||||
fallbackLocale: 'en-US',
|
||||
messages: {
|
||||
'en-US': require('./en-US'),
|
||||
'it-IT': require('./it-IT'),
|
||||
'ar-SA': require('./ar-SA'),
|
||||
'es-ES': require('./es-ES'),
|
||||
'fr-FR': require('./fr-FR'),
|
||||
'pt-BR': require('./pt-BR'),
|
||||
'de-DE': require('./de-DE'),
|
||||
'vi-VN': require('./vi-VN'),
|
||||
'ja-JP': require('./ja-JP'),
|
||||
'zh-CN': require('./zh-CN'),
|
||||
'ru-RU': require('./ru-RU')
|
||||
}
|
||||
legacy: false,
|
||||
messages
|
||||
});
|
||||
export default i18n;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const itIT = {
|
||||
word: {
|
||||
edit: 'Modifica',
|
||||
save: 'Salva',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const jaJP = {
|
||||
word: {
|
||||
edit: '編集',
|
||||
save: '保存',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const ptBR = {
|
||||
word: {
|
||||
edit: 'Editar',
|
||||
save: 'Salvar',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const ruRU = {
|
||||
word: {
|
||||
edit: 'Редактировать',
|
||||
save: 'Сохранить',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const viVN = {
|
||||
word: {
|
||||
edit: 'Chỉnh sửa',
|
||||
save: 'Lưu',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export const zhCN = {
|
||||
word: {
|
||||
edit: '编辑',
|
||||
save: '保存',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import i18n from '@/i18n';
|
||||
import i18n, { AvailableLocale } from '@/i18n';
|
||||
import * as Store from 'electron-store';
|
||||
const persistentStore = new Store({ name: 'settings' });
|
||||
const isDarkTheme = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
|
@ -12,7 +12,7 @@ export type ApplicationTheme = 'light' | 'dark';
|
|||
|
||||
export const useSettingsStore = defineStore('settings', {
|
||||
state: () => ({
|
||||
locale: persistentStore.get('locale', 'en-US') as string,
|
||||
locale: persistentStore.get('locale', 'en-US') as AvailableLocale,
|
||||
allowPrerelease: persistentStore.get('allow_prerelease', true) as boolean,
|
||||
explorebarSize: persistentStore.get('explorebar_size', null) as number,
|
||||
notificationsTimeout: persistentStore.get('notifications_timeout', 5) as number,
|
||||
|
@ -27,7 +27,7 @@ export const useSettingsStore = defineStore('settings', {
|
|||
disableScratchpad: persistentStore.get('disable_scratchpad', false) as boolean
|
||||
}),
|
||||
actions: {
|
||||
changeLocale (locale: string) {
|
||||
changeLocale (locale: AvailableLocale) {
|
||||
this.locale = locale;
|
||||
i18n.global.locale = locale;
|
||||
persistentStore.set('locale', this.locale);
|
||||
|
|
Loading…
Reference in New Issue