Skip to content

Commit 3fd9e97

Browse files
perf: Menu Language
1 parent 44315c3 commit 3fd9e97

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

frontend/src/components/layout/index.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@
3737
<el-icon v-if="item.meta.icon">
3838
<component :is="resolveIcon(item.meta.icon)"/>
3939
</el-icon>
40-
<span>{{ item.meta.title }}</span>
40+
<span>{{ t(`menu.${item.meta.title}`) }}</span>
4141
</el-menu-item>
4242
</el-menu>
4343

4444
<div v-else class="top-bar-title">
4545
<span class="split"/>
46-
<!-- <span>System manage</span> -->
47-
<span>{{ t('common.system_manage') }}</span>
46+
<span>{{ t('common.system_manage') }}</span>
4847
</div>
4948

5049

@@ -59,12 +58,11 @@
5958
</el-button>
6059
</div>
6160

62-
<el-tooltip content="System manage" placement="bottom" v-else>
61+
<el-tooltip :content="t('common.system_manage')" placement="bottom" v-else>
6362
<div class="header-icon-btn" @click="toSystem">
6463
<el-icon>
6564
<iconsystem/>
6665
</el-icon>
67-
<!-- <span>System manage</span> -->
6866
</div>
6967
</el-tooltip>
7068

@@ -94,7 +92,7 @@
9492
<el-icon>
9593
<iconsystem/>
9694
</el-icon>
97-
<span>System manage</span>
95+
<span>{{ t('common.system_manage') }}</span>
9896
</div>
9997
</el-tooltip>
10098

@@ -126,7 +124,7 @@
126124
<el-icon v-if="item.meta.icon">
127125
<component :is="resolveIcon(item.meta.icon)"/>
128126
</el-icon>
129-
<span>{{ item.meta.title }}</span>
127+
<span>{{ t(`menu.${item.meta.title}`) }}</span>
130128
</el-menu-item>
131129
</el-menu>
132130
</div>
@@ -175,7 +173,8 @@ const routerList = computed(() => {
175173
})
176174
177175
const sysRouterList = computed(() => {
178-
return router.getRoutes().filter(route => route.path.includes('/system'))
176+
const result = router.getRoutes().filter(route => route.path.includes('/system') && !route.redirect)
177+
return result
179178
})
180179
181180
const showSubmenu = computed(() => {

frontend/src/i18n/en.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"menu": {
3-
"dashboard": "Dashboard",
4-
"chat": "Chat",
5-
"datasource": "Data Source",
6-
"system": "System"
3+
"Data Q&A": "Data Q&A",
4+
"Data Connections": "Data Connections",
5+
"Dashboard": "Dashboard",
6+
"AI Model Configuration": "AI Model Configuration"
77
},
88
"common": {
99
"back": "Back",

frontend/src/i18n/zh-CN.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"menu": {
3-
"dashboard": "仪表盘",
4-
"chat": "聊天",
5-
"datasource": "数据源",
6-
"system": "系统"
3+
"Data Q&A": "智能问数",
4+
"Data Connections": "数据源",
5+
"Dashboard": "仪表盘",
6+
"AI Model Configuration": "模型配置"
77
},
88
"common": {
99
"back": "返回",

0 commit comments

Comments
 (0)