Add: Spanish on launcher

This commit is contained in:
LmeSzinc 2023-09-25 23:42:24 +08:00
parent 67ea7b3ce8
commit 166d4217e4
6 changed files with 12 additions and 4 deletions

View File

@ -33,6 +33,7 @@ import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
import jaJP from '@arco-design/web-vue/es/locale/lang/ja-jp';
import zhTW from '@arco-design/web-vue/es/locale/lang/zh-tw';
import esES from '@arco-design/web-vue/es/locale/lang/es-es';
import type {ArcoLang} from '@arco-design/web-vue/es/locale/interface';
export default defineComponent({
@ -47,6 +48,7 @@ export default defineComponent({
'en-US': enUS,
'ja-JP': jaJP,
'zh-TW': zhTW,
'es-ES': esES,
};
const locale = computed<ArcoLang>(() => {

View File

@ -5,7 +5,7 @@ export async function initAppConfigStore() {
const appStore = useAppStore();
const config = await window.__electron_preload__getAlasConfig();
appStore.setTheme(config?.theme ?? 'light');
appStore.setLanguage(config?.language ?? 'zh-TW');
appStore.setLanguage(config?.language ?? 'zh-CN');
appStore.setRepository(
(repositoryValueMap[config?.repository] as 'global' | 'china') ?? 'global',
);

View File

@ -5,6 +5,7 @@ export const LOCALE: {[key: string]: LocaleType} = {
EN_US: 'en-US',
JA_JP: 'ja-JP',
ZH_TW: 'zh-TW',
ES_ES: 'es-ES',
};
// locale list
@ -25,6 +26,10 @@ export const localeList: {label: string; value: keyof typeof LOCALE}[] = [
label: '繁體中文',
value: LOCALE.ZH_TW,
},
{
label: 'Español',
value: LOCALE.ES_ES,
},
];
export const localeSetting: LocaleSetting = {

View File

@ -1,8 +1,8 @@
z;
/**
* 'zh-CN' | 'en-US' | 'ja-JP' | 'zh-TW'
* 'zh-CN' | 'en-US' | 'ja-JP' | 'zh-TW' | 'en-ES'
*/
export type LocaleType = 'zh-CN' | 'en-US' | 'ja-JP' | 'zh-TW';
export type LocaleType = 'zh-CN' | 'en-US' | 'ja-JP' | 'zh-TW' | 'es-ES';
export interface LocaleSetting {
showPicker: boolean;

View File

@ -104,6 +104,7 @@ const config = {
'@arco-design/web-vue/es/locale/lang/en-us',
'@arco-design/web-vue/es/locale/lang/ja-jp',
'@arco-design/web-vue/es/locale/lang/zh-tw',
'@arco-design/web-vue/es/locale/lang/es-es',
],
},
};

View File

@ -58,7 +58,7 @@ declare interface DefAlasConfig {
Webui: {
WebuiHost: string;
WebuiPort: number;
Language: 'zh-CN' | 'en-US' | 'ja-JP' | 'zh-TW';
Language: 'zh-CN' | 'en-US' | 'ja-JP' | 'zh-TW' | 'es-ES';
Theme: 'default' | 'dark';
DpiScaling: boolean;
Password: null | string;