feat: Some adjustments to internationalization (#7332)

pull/7336/head
2024-12-11 18:45:45 +08:00 committed by GitHub
parent 20c9230291
commit 4d760d3019
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View File

@ -133,7 +133,7 @@ function getCheckedLabels(json: Node): string[] {
const search = async () => {
await checkIsSystemIntl();
let checkedLabels: string | any[];
let checkedLabels: any[] = [];
if (!globalStore.isIntl) {
const res = await getSettingInfo();
const json: Node = JSON.parse(res.data.xpackHideMenu);

View File

@ -10,6 +10,12 @@ router.beforeEach((to, from, next) => {
axiosCanceler.removeAllPending();
const globalStore = GlobalStore();
if (globalStore.isIntl && to.path.includes('xpack')) {
next({ name: '404' });
NProgress.done();
return;
}
if (to.name !== 'entrance' && !globalStore.isLogin) {
next({
name: 'entrance',

View File

@ -77,9 +77,10 @@
@change="onSave('Language', form.language)"
v-model="form.language"
>
<el-radio v-if="globalStore.isIntl" value="en">English</el-radio>
<el-radio value="zh">中文(简体)</el-radio>
<el-radio value="tw">中文(繁體)</el-radio>
<el-radio value="en">English</el-radio>
<el-radio v-if="!globalStore.isIntl" value="en">English</el-radio>
</el-radio-group>
</el-form-item>