Skip to content

Commit 845c093

Browse files
author
罗茜
committed
feat: 调整目录结构,方便国际化新语言
1 parent 02b0659 commit 845c093

File tree

8 files changed

+129
-152
lines changed

8 files changed

+129
-152
lines changed

src/locale/modules/en.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import enLocale from 'element-plus/dist/locale/en.mjs'
2-
import system from './en/system'
3-
import common from './en/common'
4-
import menu from './en/menu'
2+
import common from './en/index'
3+
54
const lang = {
65
el: enLocale.el, // element-plus i18 setting
76
message: {
87
language: 'English',
9-
...system,
108
...common,
11-
...menu
129
}
1310
}
1411

src/locale/modules/en/common.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/locale/modules/en/menu.ts renamed to src/locale/modules/en/index.ts

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
/*
2-
* @Date: 2022-05-22 20:44:25
3-
* @Description:
4-
*/
51
export default {
2+
common: {
3+
search: 'search',
4+
searchTip: 'please input keyword',
5+
add: 'add',
6+
update: 'update',
7+
del: 'delete',
8+
delBat: 'delete choose',
9+
delTip: 'Are you sure delete the selection data ?',
10+
handle: 'handle',
11+
exportExcel:'export excel',
12+
exportExcelTip:'please input file name'
13+
},
614
menu: {
715
dashboard: {
816
name: 'dashboard',
@@ -94,4 +102,55 @@ export default {
94102
name: 'tab',
95103
},
96104
},
105+
system: {
106+
title: 'backendsystem',
107+
subTitle: 'few lines to write beautiful admin',
108+
welcome: 'welcome login',
109+
login: 'login',
110+
userName: 'userName',
111+
password: 'password',
112+
contentScreen: 'content full screen',
113+
fullScreen: 'fullscreen',
114+
fullScreenBack: 'back fullscreen',
115+
github: 'visit github',
116+
changePassword: 'change password',
117+
loginOut: 'login out',
118+
user: 'admin',
119+
size: {
120+
default: 'default',
121+
large: 'large',
122+
small: 'small',
123+
},
124+
setting: {
125+
name: 'setting',
126+
style: {
127+
name: 'full style setting',
128+
default: 'default menu style',
129+
light: 'light menu style',
130+
chinese: 'chinese menu style',
131+
dark: 'dark menu style'
132+
},
133+
primaryColor: {
134+
name: 'primary color',
135+
blue: 'default blue',
136+
red: 'rose red',
137+
violet: 'grace violet',
138+
green: 'story green',
139+
cyan: 'cyan',
140+
black: 'geek black'
141+
},
142+
other: {
143+
name: 'other setting',
144+
showLogo: 'show logo',
145+
showBreadcrumb: 'show breadcrumb',
146+
keepOnlyOneMenu: 'keep only one menu open',
147+
}
148+
},
149+
tab: {
150+
reload: 'refresh',
151+
closeAll: 'close all tags',
152+
closeOther: 'close other tags',
153+
closeCurrent: 'close current tag'
154+
}
155+
},
97156
}

src/locale/modules/en/system.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/locale/modules/zh-cn.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import zhLocale from 'element-plus/dist/locale/zh-cn.mjs'
2-
import system from './zh-cn/system'
3-
import common from './zh-cn/common'
4-
import menu from './zh-cn/menu'
2+
import common from './zh-cn/index'
53
const lang = {
64
el: zhLocale.el, // element内部国际化
75
message: {
86
language: '中文',
9-
...system,
107
...common,
11-
...menu
128
}
139
}
1410

src/locale/modules/zh-cn/common.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/locale/modules/zh-cn/menu.ts renamed to src/locale/modules/zh-cn/index.ts

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
/*
2-
* @Date: 2022-05-22 20:44:25
3-
* @Description:
4-
*/
51
export default {
2+
common: {
3+
search: '搜索',
4+
searchTip: '请输入关键词进行检索',
5+
add: '新增',
6+
update: '编辑',
7+
del: '删除',
8+
delBat: '批量删除',
9+
delTip: '确定删除选中的数据吗?',
10+
handle: '操作',
11+
exportExcel:'导出Excel',
12+
exportExcelTip:'请输入导出文件名'
13+
},
614
menu: {
715
dashboard: {
816
name: 'dashboard',
@@ -94,4 +102,55 @@ export default {
94102
name: 'tab事件公用',
95103
},
96104
},
105+
system: {
106+
title: '后台管理系统',
107+
subTitle: '时间不在于你拥有多少,而在于你怎样使用。',
108+
welcome: '欢迎登录',
109+
login: '登录',
110+
userName: '用户名',
111+
password: '密码',
112+
contentScreen: '内容全屏',
113+
fullScreen: '全屏',
114+
fullScreenBack: '退出全屏',
115+
github: '访问github地址',
116+
changePassword: '修改密码',
117+
loginOut: '退出登录',
118+
user: '管理员',
119+
size: {
120+
default: '默认',
121+
large: '大',
122+
small: '小',
123+
},
124+
setting: {
125+
name: '系统设置',
126+
style: {
127+
name: '整体风格设置',
128+
default: '默认菜单风格',
129+
light: '亮色菜单风格',
130+
chinese: '中国水墨风',
131+
dark: '暗色菜单风格'
132+
},
133+
primaryColor: {
134+
name: '主题色',
135+
blue: '默认蓝',
136+
red: '玫瑰红',
137+
violet: '优雅紫',
138+
green: '故事绿',
139+
cyan: '明青',
140+
black: '极客黑'
141+
},
142+
other: {
143+
name: '其他设置',
144+
showLogo: '显示logo',
145+
showBreadcrumb: '显示面包屑导航',
146+
keepOnlyOneMenu: '保持一个菜单展开',
147+
}
148+
},
149+
tab: {
150+
reload: '重新加载',
151+
closeAll: '关闭所有标签',
152+
closeOther: '关闭其他标签',
153+
closeCurrent: '关闭当前标签'
154+
}
155+
},
97156
}

src/locale/modules/zh-cn/system.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)