Skip to content

Commit 4d760d3

Browse files
authored
feat: Some adjustments to internationalization (#7332)
1 parent 20c9230 commit 4d760d3

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

frontend/src/layout/components/Sidebar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function getCheckedLabels(json: Node): string[] {
133133
134134
const search = async () => {
135135
await checkIsSystemIntl();
136-
let checkedLabels: string | any[];
136+
let checkedLabels: any[] = [];
137137
if (!globalStore.isIntl) {
138138
const res = await getSettingInfo();
139139
const json: Node = JSON.parse(res.data.xpackHideMenu);

frontend/src/routers/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ router.beforeEach((to, from, next) => {
1010
axiosCanceler.removeAllPending();
1111
const globalStore = GlobalStore();
1212

13+
if (globalStore.isIntl && to.path.includes('xpack')) {
14+
next({ name: '404' });
15+
NProgress.done();
16+
return;
17+
}
18+
1319
if (to.name !== 'entrance' && !globalStore.isLogin) {
1420
next({
1521
name: 'entrance',

frontend/src/views/setting/panel/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@
7777
@change="onSave('Language', form.language)"
7878
v-model="form.language"
7979
>
80+
<el-radio v-if="globalStore.isIntl" value="en">English</el-radio>
8081
<el-radio value="zh">中文(简体)</el-radio>
8182
<el-radio value="tw">中文(繁體)</el-radio>
82-
<el-radio value="en">English</el-radio>
83+
<el-radio v-if="!globalStore.isIntl" value="en">English</el-radio>
8384
</el-radio-group>
8485
</el-form-item>
8586

0 commit comments

Comments
 (0)