Skip to content

Commit d39b2bc

Browse files
msgill2017sendya
authored andcommitted
refactor Menu Profile from hard coded to language support
1 parent eb410e0 commit d39b2bc

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/config/router.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,19 @@ export const asyncRouterMap = [
134134
name: 'profile',
135135
component: RouteView,
136136
redirect: '/profile/basic',
137-
meta: { title: '详情页', icon: 'profile', permission: [ 'profile' ] },
137+
meta: { title: 'menu.profile', icon: 'profile', permission: [ 'profile' ] },
138138
children: [
139139
{
140140
path: '/profile/basic',
141141
name: 'ProfileBasic',
142142
component: () => import('@/views/profile/basic'),
143-
meta: { title: '基础详情页', permission: [ 'profile' ] }
143+
meta: { title: 'menu.profile.basic', permission: [ 'profile' ] }
144144
},
145145
{
146146
path: '/profile/advanced',
147147
name: 'ProfileAdvanced',
148148
component: () => import('@/views/profile/advanced/Advanced'),
149-
meta: { title: '高级详情页', permission: [ 'profile' ] }
149+
meta: { title: 'menu.profile.advanced', permission: [ 'profile' ] }
150150
}
151151
]
152152
},

src/locales/lang/en-US/menu.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@ export default {
1919
'menu.list.search-list': 'Search List',
2020
'menu.list.search-list.articles': 'Search List(articles)',
2121
'menu.list.search-list.projects': 'Search List(projects)',
22-
'menu.list.search-list.applications': 'Search List(applications)'
22+
'menu.list.search-list.applications': 'Search List(applications)',
23+
'menu.profile': 'Profile',
24+
'menu.profile.basic': 'Basic Profile',
25+
'menu.profile.advanced': 'Advanced Profile'
26+
2327
}

src/locales/lang/zh-CN/menu.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ export default {
1919
'menu.list.search-list': '搜索列表',
2020
'menu.list.search-list.articles': '搜索列表(文章)',
2121
'menu.list.search-list.projects': '搜索列表(项目)',
22-
'menu.list.search-list.applications': '搜索列表(应用)'
22+
'menu.list.search-list.applications': '搜索列表(应用)',
23+
'menu.profile': '详情页',
24+
'menu.profile.basic': '基础详情页',
25+
'menu.profile.advanced': '高级详情页'
2326
}

0 commit comments

Comments
 (0)