Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const i18nLocale = computed(() => {
if (globalStore.language === 'ja') return ja;
if (globalStore.language === 'ms') return ms;
if (globalStore.language === 'ru') return ru;
if (globalStore.language === 'pt-br') return ptBR;
if (globalStore.language === 'pt-BR') return ptBR;
if (globalStore.language === 'ko') return ko;
if (globalStore.language === 'tr') return tr;
if (globalStore.language === 'es-ES') return esES;
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createApp } from 'vue';
import { computed, createApp } from 'vue';
import App from './App.vue';

import '@/styles/index.scss';
Expand Down Expand Up @@ -30,9 +30,10 @@ const bootstrap = async () => {
await Promise.all([loadLocaleMessages(currentLocale), ensureFallbackLocale()]);

const app = createApp(App);
const fit2cloudLocale = computed(() => i18n.global.getLocaleMessage(i18n.global.locale.value));
app.component('SvgIcon', SvgIcon);
app.use(ElementPlus);
app.use(Fit2CloudPlus, { locale: i18n.global.getLocaleMessage(currentLocale) });
app.use(Fit2CloudPlus, { locale: fit2cloudLocale });

Object.keys(Icons).forEach((key) => {
app.component(key, Icons[key as keyof typeof Icons]);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/modules/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const GlobalStore = defineStore({
loadingText: '',
isLogin: false,
entrance: '',
language: '',
language: i18n.global.locale.value,
themeConfig: {
panelName: '',
primary: '#005eeb',
Expand Down
Loading