This commit is contained in:
pycook
2020-02-15 20:57:05 +08:00
parent acf881dcb7
commit 07d2af6671
17 changed files with 244 additions and 157 deletions

View File

@@ -31,8 +31,6 @@ export default i18n
const loadedLanguages = [defaultLang]
// 从缓存設置中加载当前语言
function setI18nLanguage (lang) {
i18n.locale = lang
axios.defaults.headers.common['Accept-Language'] = lang
@@ -46,7 +44,6 @@ export function i18nRender (key) {
export function loadLanguageAsync (lang = defaultLang) {
return new Promise(resolve => {
// 缓存语言设置
Vue.ls.set('lang', lang)
if (i18n.locale !== lang) {
if (!loadedLanguages.includes(lang)) {

View File

@@ -4,32 +4,36 @@ export default {
antLocale: enUS,
menu: {
preference: 'Preference',
relationViews: 'RelationViews',
treeViews: 'TreeViews',
batch: 'Batch',
ciType: 'CiType',
acl: 'ACL',
ciModelManager: 'Model',
ciPropertyRep: 'Propertys',
ciRelationType: 'RelationType',
ciRelationViewDefine: 'RelationViewDefine',
relationViews: 'Relation Views',
treeViews: 'Tree Views',
batch: 'Batch Import',
ciType: 'Modeling',
acl: 'Authorization',
ciModelManager: 'CI Type',
ciPropertyRep: 'Attributes',
ciRelationType: 'Relation Type',
ciRelationViewDefine: 'Relation View Define',
aclUsersManager: 'Users',
aclRolesManager: 'Roles',
aclResourceManager: 'Resources',
aclResourceType: 'ResourceType'
aclResourceType: 'Resource Type'
},
button: {
cancel: 'Cancel',
submit: 'Submit',
query: 'Query',
add: 'Add',
new: 'New',
update: 'Edit',
delete: 'Delete',
yes: 'Yes',
no: 'No',
reset: 'Reset',
subscribe: 'Subscribe',
downloadTemplate: 'Download',
upload: 'Upload',
download: 'Download',
upload: 'Upload'
displayFields: 'Display Fields'
},
tip: {
sourceCode: 'view on',
@@ -40,17 +44,47 @@ export default {
detail: 'Detail',
delete: 'Delete',
edit: 'Edit',
operate: 'Operate',
operate: 'Operation',
create: 'Create',
clear: 'Clear',
modify: 'Modify',
unselectedAttribute: 'Unselect Attributes',
selectedAttribute: 'Selected Attributes',
noData: 'No Data',
addSuccess: 'Add successfully',
updateSuccess: 'Update successfully',
deleteSuccess: 'Delete successfully',
cancelSuccess: 'Cancel successfully',
downloading: 'Downloading ...',
deleting: 'Deleting ...',
confirmDelete: 'Confirm deleting ?',
warning: 'Warning',
other: 'Other',
requestFailed: 'Request error, please try again later',
pleaseSelect: 'please select'
},
ci: {
batchOperate: 'Batch Operation',
confirmBatchUpdate: 'Confirm batch modification?',
batchUpdate: 'Batch update ...',
batchUpdateSuccess: 'Batch update successfully',
confirmDelete: 'Confirm deleting ?',
attribute: 'Attributes',
relation: 'Relation',
history: 'History',
time: 'Time',
user: 'User',
batchUpdateTip: 'Just fill in the fields that need to be modified!',
selectLevel: '- - directory level selection - -',
displayFieldDefine: 'Display Fields Define'
},
table: {
selected: 'Selected',
batchOperate: 'Batch operate'
clear: 'Clear'
},
preference: {
cancelSubscribeConfirm: 'Really want to unsubscribe ?',
subscribeSuccess: 'Subscribe successfully',
subscribeModel: 'Subscribe Model',
resourceView: 'Resource View',
subFormTip: 'You can either define a tree view or subscribe to a resource view, which will be presented separately in sidebar'
@@ -62,11 +96,34 @@ export default {
dragFileHere: 'click or drag file to here!',
suportFileType: 'suport file type'
},
relationView: {
tip: 'The administrator has not configured the relational view, or you do not have permission to access it!'
},
treeView: {
tip: 'Please go to my subscription page to complete the subscription!'
},
ciType: {
add: 'Add',
editModel: 'edit model',
modelName: 'model name',
alias: 'alias',
addAttribute: 'Add Attribute',
editModel: 'Edit Model',
modelName: 'Model Name',
name: 'Name',
alias: 'Alias',
type: 'Type',
unique: 'Unique',
index: 'Index',
sort: 'Sort',
link: 'Link',
password: 'Password',
list: 'List',
integer: 'Integer',
float: 'Float',
text: 'Text',
nameValidate: "You can't start with a number, you can start with an English number and an underscore (_)",
nameRequired: 'Please enter a attribute name',
isIt: 'Is it ',
predefinedValue: 'Predefined values',
predefinedValueTip: 'Multiple values are separated by line breaks',
uniqueFlag: 'unique flag'
}
}

View File

@@ -23,13 +23,17 @@ export default {
submit: '提交',
query: '查询',
add: '新增',
new: '新建',
update: '修改',
delete: '删除',
yes: '',
no: '',
reset: '重置',
subscribe: '订阅',
download: '下载模板',
upload: '上传'
downloadTemplate: '下载模板',
upload: '上传',
download: '下载',
displayFields: '显示字段'
},
tip: {
sourceCode: '源代码',
@@ -41,16 +45,46 @@ export default {
delete: '删除',
edit: '编辑',
operate: '操作',
create: '创建',
clear: '清空',
modify: '修改',
unselectedAttribute: '未选属性',
selectedAttribute: '已选属性',
noData: '没数据',
addSuccess: '新增成功',
updateSuccess: '修改成功',
deleteSuccess: '删除成功',
cancelSuccess: '取消成功',
downloading: '正在下载 ...',
deleting: '正在删除 ...',
confirmDelete: '真的要删除吗 ?',
warning: '警告',
other: '其他',
requestFailed: '请求出现错误,请稍后再试',
pleaseSelect: '请选择'
},
ci: {
batchOperate: '批量操作',
confirmBatchUpdate: '确认要批量修改吗 ?',
batchUpdate: '批量修改',
batchUpdateSuccess: '批量修改成功',
confirmDelete: '真的要删除吗 ?',
attribute: '属性',
relation: '关系',
history: '操作历史',
time: '时间',
user: '用户',
batchUpdateTip: '只需要填写需要修改的字段即可!',
selectLevel: '- - 目录层级的选择 - -',
displayFieldDefine: '显示字段定义'
},
table: {
selected: '已选择',
batchOperate: '批量操作'
clear: '清空'
},
preference: {
cancelSubscribeConfirm: '真的要取消订阅吗 ?',
subscribeSuccess: '订阅成功',
subscribeModel: '订阅模型',
resourceView: '资源视图',
subFormTip: '既可以定义树形视图, 也可以订阅资源视图, 资源视图会在SideBar单独呈现'
@@ -62,11 +96,34 @@ export default {
dragFileHere: '点击或拖拽文件至此上传!',
suportFileType: '支持文件类型'
},
relationView: {
tip: '管理员 还未配置关系视图, 或者你无权限访问!'
},
treeView: {
tip: '请先到 我的订阅 页面完成订阅!'
},
ciType: {
add: '新增',
addAttribute: '新增属性',
editModel: '编辑模型',
modelName: '模型名(英文)',
name: '名称',
alias: '别名',
type: '类型',
unique: '唯一',
index: '索引',
sort: '排序',
link: '链接',
password: '密码',
list: '列表',
integer: '整数',
float: '浮点数',
text: '文本',
nameValidate: '不能以数字开头,可以是英文 数字以及下划线 (_)',
nameRequired: '请输入属性名',
isIt: '是否',
predefinedValue: '预定义值',
predefinedValueTip: '多个值使用换行分隔',
uniqueFlag: '唯一标识'
}
}