diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 824aaec8cc..e2a08a4630 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -29,6 +29,8 @@ export default { 'email': 'Email', 'phone': 'Phone', 'role': 'Role', + 'personal_info': 'Personal Info', + 'status': 'Enable/Disable', }, workspace: { 'create': 'Create Workspace', @@ -62,6 +64,23 @@ export default { 'modify': 'Modify', 'delete_confirm': 'Are you sure you want to delete this Member?', 'please_choose_member': 'Please Choose Member', + 'search_by_name': 'Search by name', + 'modify_personal_info': 'Modify Personal Information', + 'input_name': 'Please enter a user name', + 'special_characters_are_not_supported': 'Special characters are not supported', + 'mobile_number_format_is_incorrect': 'Mobile number format is incorrect', + 'email_format_is_incorrect': 'Email format is incorrect', + }, + user: { + 'create': 'Create', + 'modify': 'Modify', + 'input_name': 'Please enter a user name', + 'input_id': 'Please enter a ID', + 'input_email': 'Please enter a email', + 'special_characters_are_not_supported': 'Special characters are not supported', + 'mobile_number_format_is_incorrect': 'Mobile number format is incorrect', + 'email_format_is_incorrect': 'Email format is incorrect', + 'delete_confirm': 'Are you sure you want to delete this User?', }, role: { 'please_choose_role': 'Please Choose Role', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 7643425dd0..f33f5a6ba3 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -29,6 +29,8 @@ export default { 'email': '邮箱', 'phone': '电话', 'role': '角色', + 'personal_info': '个人信息', + 'status': '启用/禁用', }, workspace: { 'create': '创建工作空间', @@ -62,6 +64,24 @@ export default { 'modify': '修改成员', 'delete_confirm': '这个用户确定要删除吗?', 'please_choose_member': '请选择成员', + 'search_by_name': '根据名称搜索', + 'modify_personal_info': '修改个人信息', + 'input_name': '请输入名称', + 'input_email': '请输入邮箱', + 'special_characters_are_not_supported': '不支持特殊字符', + 'mobile_number_format_is_incorrect': '手机号码格式不正确', + 'email_format_is_incorrect': '邮箱格式不正确', + }, + user: { + 'create': '创建用户', + 'modify': '修改用户', + 'input_name': '请输入用户名', + 'input_id': '请输入ID', + 'input_email': '请输入邮箱', + 'special_characters_are_not_supported': '不支持特殊字符', + 'mobile_number_format_is_incorrect': '手机号码格式不正确', + 'email_format_is_incorrect': '邮箱格式不正确', + 'delete_confirm': '这个用户确定要删除吗?', }, role: { 'please_choose_role': '请选择角色', diff --git a/frontend/src/performance/components/settings/organization/OrganizationMember.vue b/frontend/src/performance/components/settings/organization/OrganizationMember.vue index 81459ea1e5..869d180a37 100644 --- a/frontend/src/performance/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/performance/components/settings/organization/OrganizationMember.vue @@ -3,20 +3,21 @@ - 成员 + {{$t('commons.member')}} - + - - - - + + + + {{ role.name }} @@ -49,10 +50,10 @@ - + - - + + - - + + - 保存 + {{$t('commons.save')}} - + - + - + - + - - + + - 保存 + {{$t('commons.save')}} @@ -124,7 +125,7 @@ data() { return { result: {}, - btnTips: "添加组织成员", + btnTips: this.$t('member.create'), createVisible: false, updateVisible: false, form: {}, @@ -133,10 +134,10 @@ tableData: [], rules: { userIds: [ - {required: true, message: '请选择成员', trigger: ['blur']} + {required: true, message: this.$t('member.please_choose_member'), trigger: ['blur']} ], roleIds: [ - {required: true, message: '请选择角色', trigger: ['blur']} + {required: true, message: this.$t('role.please_choose_role'), trigger: ['blur']} ] }, multipleSelection: [], @@ -208,29 +209,29 @@ this.result = this.$post("/organization/member/update", param,() => { this.$message({ type: 'success', - message: '修改成功!' + message: this.$t('commons.modify_success') }); this.updateVisible = false; this.initTableData(); }); }, del(row) { - this.$confirm('是否删除用户 ' + row.name + ' ?', '', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('member.delete_confirm'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), type: 'warning' }).then(() => { this.result = this.$get('/user/orgmember/delete/' + this.currentUser().lastOrganizationId + '/' + row.id, () => { this.$message({ type: 'success', - message: '删除成功!' + message: this.$t('commons.delete_success') }); this.initTableData(); }); }).catch(() => { this.$message({ type: 'info', - message: '已取消删除' + message: this.$t('commons.delete_cancel') }); }); }, diff --git a/frontend/src/performance/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/performance/components/settings/organization/OrganizationWorkspace.vue index 20c63315a4..23cdc23591 100644 --- a/frontend/src/performance/components/settings/organization/OrganizationWorkspace.vue +++ b/frontend/src/performance/components/settings/organization/OrganizationWorkspace.vue @@ -3,19 +3,19 @@ - - 工作空间 + {{$t('commons.workspace')}} - - + + - - + + {{scope.row.memberSize}} @@ -47,17 +47,17 @@ - + - + - + - 创建 + {{$t('commons.save')}} @@ -209,7 +209,7 @@ this.$post("/workspace/" + saveType, this.form, () => { this.createVisible = false; this.list(); - Message.success('保存成功'); + Message.success(this.$t('commons.save_success')); }); } else { return false; @@ -229,13 +229,13 @@ // }); }, del(row) { - this.$confirm('这个工作空间确定要删除吗?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('workspace.delete_confirm'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), type: 'warning' }).then(() => { this.$get('/workspace/delete/' + row.id, () => { - Message.success('删除成功'); + Message.success(this.$t('commons.delete_success')); this.list(); }); }).catch(() => { @@ -423,8 +423,8 @@ }, rules: { name: [ - {required: true, message: '请输入工作空间名称', trigger: 'blur'}, - {min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur'} + {required: true, message: this.$t('workspace.input_name'), trigger: 'blur'}, + {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'} ] }, wsMemberRule: { diff --git a/frontend/src/performance/components/settings/personal/PersonSetting.vue b/frontend/src/performance/components/settings/personal/PersonSetting.vue index ae475ca1b4..07e71f5525 100644 --- a/frontend/src/performance/components/settings/personal/PersonSetting.vue +++ b/frontend/src/performance/components/settings/personal/PersonSetting.vue @@ -4,44 +4,44 @@ - 个人信息 + {{$t('commons.personal_info')}} - - - - + + + + {{ scope.row.createTime | timestampFormatDate }} - + - + - + - + - + - 修改 + {{$t('commons.save')}} @@ -62,12 +62,12 @@ form: {}, rule: { name: [ - {required: true, message: '请输入姓名', trigger: 'blur'}, - { min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' }, + {required: true, message: this.$t('member.input_name'), trigger: 'blur'}, + { min: 2, max: 10, message: this.$t('commons.input_limit', [2, 10]), trigger: 'blur' }, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, - message: '姓名不支持特殊字符', + message: this.$t('member.special_characters_are_not_supported'), trigger: 'blur' } ], @@ -75,16 +75,16 @@ { required: false, pattern: '^1(3|4|5|7|8)\\d{9}$', - message: '手机号码格式不正确!', + message: this.$t('member.mobile_number_format_is_incorrect'), trigger: 'blur' } ], email: [ - { required: true, message: '请输入邮箱', trigger: 'blur' }, + { required: true, message: this.$t('member.input_email'), trigger: 'blur' }, { required: true, pattern: /^([A-Za-z0-9_\-.])+@([A-Za-z0-9]+\.)+[A-Za-z]{2,6}$/, - message: '邮箱格式不正确!', + message: this.$t('member.email_format_is_incorrect'), trigger: 'blur' } ] @@ -110,7 +110,7 @@ this.result = this.$post(this.updatePath, this.form,response => { this.$message({ type: 'success', - message: '修改成功!' + message: this.$t('commons.modify_success') }); localStorage.setItem(TokenKey, JSON.stringify(response.data)); this.updateVisible = false; diff --git a/frontend/src/performance/components/settings/system/Organization.vue b/frontend/src/performance/components/settings/system/Organization.vue index da296a434c..861a2e2117 100644 --- a/frontend/src/performance/components/settings/system/Organization.vue +++ b/frontend/src/performance/components/settings/system/Organization.vue @@ -243,10 +243,10 @@ }, orgMemberRule: { userIds: [ - {required: true, message: '请选择成员', trigger: ['blur']} + {required: true, message: this.$t('member.please_choose_member'), trigger: ['blur']} ], roleIds: [ - {required: true, message: '请选择角色', trigger: ['blur']} + {required: true, message: this.$t('role.please_choose_role'), trigger: ['blur']} ] } } diff --git a/frontend/src/performance/components/settings/system/TestResourcePool.vue b/frontend/src/performance/components/settings/system/TestResourcePool.vue index 47f38f75f9..123ad72902 100644 --- a/frontend/src/performance/components/settings/system/TestResourcePool.vue +++ b/frontend/src/performance/components/settings/system/TestResourcePool.vue @@ -89,8 +89,8 @@ del(row) { window.console.log(row); this.$confirm('此操作将永久删除该资源池, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), type: 'warning' }).then(() => { this.$get(`/testresourcepool/delete/${row.id}`).then(() => { @@ -98,12 +98,12 @@ }); this.$message({ type: 'success', - message: '删除成功!' + message: this.$t('commons.delete_success') }); }).catch(() => { this.$message({ type: 'info', - message: '已取消删除' + message: this.$t('commons.delete_cancel') }); }); }, @@ -131,7 +131,7 @@ .then(() => { this.$message({ type: 'success', - message: '修改成功!' + message: this.$t('commons.modify_success') }, this.updateVisible = false, this.getOrganizationList(), @@ -171,7 +171,7 @@ rule: { name: [ {required: true, message: '请输入资源池名称', trigger: 'blur'}, - { min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' }, + { min: 2, max: 10, message: this.$t('commons.input_limit', [2, 10]), trigger: 'blur' }, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, diff --git a/frontend/src/performance/components/settings/system/User.vue b/frontend/src/performance/components/settings/system/User.vue index 42c1411c3f..010b272cc1 100644 --- a/frontend/src/performance/components/settings/system/User.vue +++ b/frontend/src/performance/components/settings/system/User.vue @@ -4,21 +4,21 @@ - 用户 + {{$t('commons.member')}} - + - - - - + + + + - + {{ scope.row.createTime | timestampFormatDate }} - + @@ -62,18 +62,18 @@ - + - + - + - + @@ -82,23 +82,23 @@ - + - + - + - + - 修改 + {{$t('commons.save')}} @@ -122,22 +122,22 @@ currentPage: 1, pageSize: 5, total: 0, - btnTips: "添加用户", + btnTips: this.$t('user.create'), condition: "", tableData: [], form: {}, rule: { id: [ - { required: true, message: '请输入ID', trigger: 'blur'}, - { min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' } + { required: true, message: this.$t('user.input_id'), trigger: 'blur'}, + { min: 2, max: 10, message: this.$t('commons.input_limit', [2, 10]), trigger: 'blur' } ], name: [ - {required: true, message: '请输入姓名', trigger: 'blur'}, - { min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' }, + {required: true, message: this.$t('user.input_name'), trigger: 'blur'}, + { min: 2, max: 10, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur' }, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, - message: '姓名不支持特殊字符', + message: this.$t('user.special_characters_are_not_supported'), trigger: 'blur' } ], @@ -145,16 +145,16 @@ { required: false, pattern: '^1(3|4|5|7|8)\\d{9}$', - message: '手机号码格式不正确!', + message: this.$t('user.mobile_number_format_is_incorrect'), trigger: 'blur' } ], email: [ - { required: true, message: '请输入邮箱', trigger: 'blur' }, + { required: true, message: this.$t('user.input_email'), trigger: 'blur' }, { required: true, pattern: /^([A-Za-z0-9_\-.])+@([A-Za-z0-9]+\.)+[A-Za-z]{2,6}$/, - message: '邮箱格式不正确!', + message: this.$t('user.email_format_is_incorrect'), trigger: 'blur' } ] @@ -175,22 +175,22 @@ this.form = row; }, del(row) { - this.$confirm('是否删除用户 ' + row.name + ' ?', '', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('user.delete_confirm'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), type: 'warning' }).then(() => { this.result = this.$get(this.deletePath + row.id, () => { this.$message({ type: 'success', - message: '删除成功!' + message: this.$t('commons.delete_success') }); this.initTableData(); }); }).catch(() => { this.$message({ type: 'info', - message: '已取消删除' + message: this.$t('commons.delete_cancel') }); }); }, @@ -200,7 +200,7 @@ this.result = this.$post(this.createPath, this.form, () => { this.$message({ type: 'success', - message: '添加成功!' + message: this.$t('commons.save_success') }); this.initTableData(); this.createVisible = false; @@ -216,7 +216,7 @@ this.result = this.$post(this.updatePath, this.form,() => { this.$message({ type: 'success', - message: '修改成功!' + message: this.$t('commons.modify_success') }); this.updateVisible = false; this.initTableData(); @@ -240,7 +240,7 @@ this.$post(this.updatePath, row,() =>{ this.$message({ type: 'success', - message: '状态修改成功!' + message: this.$t('commons.modify_success') }); }) }, diff --git a/frontend/src/performance/components/settings/workspace/WorkspaceMember.vue b/frontend/src/performance/components/settings/workspace/WorkspaceMember.vue index b2f79c4b42..673fdf144a 100644 --- a/frontend/src/performance/components/settings/workspace/WorkspaceMember.vue +++ b/frontend/src/performance/components/settings/workspace/WorkspaceMember.vue @@ -13,9 +13,9 @@ - - - + + + @@ -52,7 +52,7 @@ - + - + - 保存 + {{$t('commons.save')}} @@ -84,17 +84,17 @@ - + - + - + - + - 保存 + {{$t('commons.save')}} @@ -131,10 +131,10 @@ tableData: [], rules: { userIds: [ - {required: true, message: '请选择成员', trigger: ['blur']} + {required: true, message: this.$t('member.please_choose_member'), trigger: ['blur']} ], roleIds: [ - {required: true, message: '请选择角色', trigger: ['blur']} + {required: true, message: this.$t('role.please_choose_role'), trigger: ['blur']} ] }, multipleSelection: [], @@ -193,8 +193,8 @@ }, del(row) { this.$confirm('移除该成员, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), type: 'warning' }).then(() => { this.loading = true; @@ -204,13 +204,13 @@ }); this.$message({ type: 'success', - message: '删除成功!' + message: this.$t('commons.delete_success') }); }).catch(() => { this.loading = false; this.$message({ type: 'info', - message: '已取消删除' + message: this.$t('commons.delete_cancel') }); }); }, @@ -236,7 +236,7 @@ this.result = this.$post("/workspace/member/update", param,() => { this.$message({ type: 'success', - message: '修改成功!' + message: this.$t('commons.modify_success') }); this.updateVisible = false; this.initTableData();