diff --git a/frontend/src/i18n/en_US.js b/frontend/src/i18n/en_US.js index 55e3f5fd6552f423acbe186886803256f7161ddc..beff603ea0afc494af9b3806d4a5233c6784f6e1 100644 --- a/frontend/src/i18n/en_US.js +++ b/frontend/src/i18n/en_US.js @@ -1,15 +1,19 @@ const en_US = { commons: { 'workspace': 'Workspace', + 'organization': 'Organization', 'project': 'Project', 'name': 'Name', 'description': 'Description', 'save': 'Save', 'save_success': 'Saved successfully', 'delete_success': 'Deleted successfully', + 'modify_success': 'Modify Success', + 'delete_cancel': 'Deleted Cancel', 'confirm': 'Confirm', 'cancel': 'Cancel', 'prompt': 'Prompt', + 'operating': 'Operating', }, workspace: { 'create': 'Create Workspace', @@ -21,6 +25,15 @@ const en_US = { 'organization_name': 'Organization Name', 'please_choose_organization': 'Please Choose Organization', }, + organization: { + 'create': 'Create', + 'modify': 'Modify', + 'delete_confirm': 'Are you sure you want to delete this workspace?', + 'input_name': 'Please enter a organization name', + 'input_name_2_50': '2 to 50 characters in length', + 'search_by_name': 'Search by name', + 'special_characters_are_not_supported': 'Special characters are not supported', + }, project: { 'recent': 'Recent Projects', 'create': 'Create Project', diff --git a/frontend/src/i18n/zh_CN.js b/frontend/src/i18n/zh_CN.js index 55588e74e8b09a411997d8b79e853aa57cee3314..83993d83085f536f96001d66253d88ea621b2db9 100644 --- a/frontend/src/i18n/zh_CN.js +++ b/frontend/src/i18n/zh_CN.js @@ -1,15 +1,19 @@ const zh_CN = { commons: { 'workspace': '工作空间', + 'organization': '组织', 'project': '项目', 'name': '名称', 'description': '描述', 'save': '保存', 'save_success': '保存成功', 'delete_success': '删除成功', + 'modify_success': '修改成功', + 'delete_cancel': '已取消删除', 'confirm': '确定', 'cancel': '取消', 'prompt': '提示', + 'operating': '操作', }, workspace: { 'create': '创建工作空间', @@ -21,6 +25,15 @@ const zh_CN = { 'organization_name': '所属组织', 'please_choose_organization': '请选择组织', }, + organization: { + 'create': '创建组织', + 'modify': '修改组织', + 'delete_confirm': '这个组织确定要删除吗?', + 'input_name': '请输入组织名称', + 'input_name_2_50': '长度在 2 到 50 个字符', + 'search_by_name': '根据名称搜索', + 'special_characters_are_not_supported': '不支持特殊字符', + }, project: { 'recent': '最近的项目', 'create': '创建项目', diff --git a/frontend/src/i18n/zh_TW.js b/frontend/src/i18n/zh_TW.js index 644e4525814847c03ca541f30dde842fe950580f..a0e477287c215a73863019998d5442bd10d871bf 100644 --- a/frontend/src/i18n/zh_TW.js +++ b/frontend/src/i18n/zh_TW.js @@ -1,6 +1,7 @@ const zh_TW = { commons: { 'workspace': '工作空间', + 'organization': '组织', 'name': '名称', 'description': '描述', 'save': '保存', @@ -9,6 +10,7 @@ const zh_TW = { 'confirm': '确定', 'cancel': '取消', 'prompt': '提示', + 'operating': '操作', }, workspace: { 'create': '创建工作空间', @@ -20,6 +22,11 @@ const zh_TW = { 'organization_name': '所属组织', 'please_choose_organization': '请选择组织', }, + organization: { + 'create': '创建组织', + 'modify': '修改组织', + 'search_by_name': '根据名称搜索', + }, project: { 'recent': '最近的项目' }, diff --git a/frontend/src/performance/components/settings/Organization.vue b/frontend/src/performance/components/settings/Organization.vue index b337b3fbcd5e70b40fb1c621e429b1a70e2d4c61..9a6c5ae54edc44c488195af50435ebab01395026 100644 --- a/frontend/src/performance/components/settings/Organization.vue +++ b/frontend/src/performance/components/settings/Organization.vue @@ -4,20 +4,20 @@ - 组织 + {{$t('commons.organization')}} - - - - + + + @@ -44,31 +44,31 @@ - + - + - + - 创建 + {{$t('commons.save')}} - + - + - + - 修改 + {{$t('organization.modify')}} @@ -94,23 +94,23 @@ currentPage: 1, pageSize: 5, total: 0, - btnTips: "添加组织", + btnTips: this.$t('organization.create'), condition: "", tableData: [], form: {}, rule: { name: [ - {required: true, message: '请输入姓名', trigger: 'blur'}, - { min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' }, + {required: true, message: this.$t('organization.input_name'), trigger: 'blur'}, + { min: 2, max: 10, message: this.$t('organization.input_name_2_50'), trigger: 'blur' }, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, - message: '姓名不支持特殊字符', + message: this.$t('organization.special_characters_are_not_supported'), trigger: 'blur' } ], description: [ - { max: 60, message: '最大长度 60 个字符', trigger: 'blur'} + { max: 50, message: this.$t('organization.input_name_2_50'), trigger: 'blur'} ] } } @@ -128,22 +128,22 @@ this.form = row; }, del(row) { - this.$confirm('是否删除组织' + row.name +' ?', '', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('organization.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') }); }); }, @@ -153,7 +153,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; @@ -169,7 +169,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();