mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 08:37:42 +00:00
Add: Spanish on launcher
This commit is contained in:
parent
67ea7b3ce8
commit
166d4217e4
@ -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 enUS from '@arco-design/web-vue/es/locale/lang/en-us';
|
||||||
import jaJP from '@arco-design/web-vue/es/locale/lang/ja-jp';
|
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 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';
|
import type {ArcoLang} from '@arco-design/web-vue/es/locale/interface';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -47,6 +48,7 @@ export default defineComponent({
|
|||||||
'en-US': enUS,
|
'en-US': enUS,
|
||||||
'ja-JP': jaJP,
|
'ja-JP': jaJP,
|
||||||
'zh-TW': zhTW,
|
'zh-TW': zhTW,
|
||||||
|
'es-ES': esES,
|
||||||
};
|
};
|
||||||
|
|
||||||
const locale = computed<ArcoLang>(() => {
|
const locale = computed<ArcoLang>(() => {
|
||||||
|
@ -5,7 +5,7 @@ export async function initAppConfigStore() {
|
|||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const config = await window.__electron_preload__getAlasConfig();
|
const config = await window.__electron_preload__getAlasConfig();
|
||||||
appStore.setTheme(config?.theme ?? 'light');
|
appStore.setTheme(config?.theme ?? 'light');
|
||||||
appStore.setLanguage(config?.language ?? 'zh-TW');
|
appStore.setLanguage(config?.language ?? 'zh-CN');
|
||||||
appStore.setRepository(
|
appStore.setRepository(
|
||||||
(repositoryValueMap[config?.repository] as 'global' | 'china') ?? 'global',
|
(repositoryValueMap[config?.repository] as 'global' | 'china') ?? 'global',
|
||||||
);
|
);
|
||||||
|
@ -5,6 +5,7 @@ export const LOCALE: {[key: string]: LocaleType} = {
|
|||||||
EN_US: 'en-US',
|
EN_US: 'en-US',
|
||||||
JA_JP: 'ja-JP',
|
JA_JP: 'ja-JP',
|
||||||
ZH_TW: 'zh-TW',
|
ZH_TW: 'zh-TW',
|
||||||
|
ES_ES: 'es-ES',
|
||||||
};
|
};
|
||||||
|
|
||||||
// locale list
|
// locale list
|
||||||
@ -25,6 +26,10 @@ export const localeList: {label: string; value: keyof typeof LOCALE}[] = [
|
|||||||
label: '繁體中文',
|
label: '繁體中文',
|
||||||
value: LOCALE.ZH_TW,
|
value: LOCALE.ZH_TW,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Español',
|
||||||
|
value: LOCALE.ES_ES,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const localeSetting: LocaleSetting = {
|
export const localeSetting: LocaleSetting = {
|
||||||
|
4
webapp/packages/renderer/types/config.d.ts
vendored
4
webapp/packages/renderer/types/config.d.ts
vendored
@ -1,8 +1,8 @@
|
|||||||
z;
|
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 {
|
export interface LocaleSetting {
|
||||||
showPicker: boolean;
|
showPicker: boolean;
|
||||||
|
@ -104,6 +104,7 @@ const config = {
|
|||||||
'@arco-design/web-vue/es/locale/lang/en-us',
|
'@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/ja-jp',
|
||||||
'@arco-design/web-vue/es/locale/lang/zh-tw',
|
'@arco-design/web-vue/es/locale/lang/zh-tw',
|
||||||
|
'@arco-design/web-vue/es/locale/lang/es-es',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
2
webapp/types/index.d.ts
vendored
2
webapp/types/index.d.ts
vendored
@ -58,7 +58,7 @@ declare interface DefAlasConfig {
|
|||||||
Webui: {
|
Webui: {
|
||||||
WebuiHost: string;
|
WebuiHost: string;
|
||||||
WebuiPort: number;
|
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';
|
Theme: 'default' | 'dark';
|
||||||
DpiScaling: boolean;
|
DpiScaling: boolean;
|
||||||
Password: null | string;
|
Password: null | string;
|
||||||
|
Loading…
Reference in New Issue
Block a user