mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-21 16:28:17 +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 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>(() => {
|
||||
|
@ -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',
|
||||
);
|
||||
|
@ -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 = {
|
||||
|
4
webapp/packages/renderer/types/config.d.ts
vendored
4
webapp/packages/renderer/types/config.d.ts
vendored
@ -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;
|
||||
|
@ -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',
|
||||
],
|
||||
},
|
||||
};
|
||||
|
2
webapp/types/index.d.ts
vendored
2
webapp/types/index.d.ts
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user