From 6f734a705ee3f1c477204853eecd7f98b02af4e4 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 2 Nov 2021 17:57:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20i18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1005314 --user=lyh 【测试跟踪】国际化问题 https://www.tapd.cn/55049933/s/1063092 --- .../base/mapper/ext/ExtGroupMapper.xml | 2 +- .../project/head/ProjectHeaderMenus.vue | 2 +- .../components/project/menu/EditProject.vue | 8 +-- .../components/settings/SettingHome.vue | 8 +-- .../settings/plugin/PluginConfig.vue | 4 +- .../system/components/GroupCascader.vue | 2 +- .../settings/system/group/EditPermission.vue | 2 +- .../settings/system/group/UserGroup.vue | 9 ++- .../workspace/template/CustomFieldList.vue | 4 +- .../template/CustomFieldRelateList.vue | 7 +-- .../components/track/issue/IssueList.vue | 14 +---- .../detail/component/FunctionalIssueList.vue | 2 +- frontend/src/common/js/table-constants.js | 63 +++++++++---------- frontend/src/i18n/en-US.js | 32 +++++++++- frontend/src/i18n/zh-CN.js | 32 +++++++++- frontend/src/i18n/zh-TW.js | 32 +++++++++- 16 files changed, 145 insertions(+), 78 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml index a360784fa9..4646822dc2 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtGroupMapper.xml @@ -25,7 +25,7 @@ union distinct - select g.*, '全局' as scopeName from `group` g + select g.*, 'global' as scopeName from `group` g g.scope_id = 'global' diff --git a/frontend/src/business/components/project/head/ProjectHeaderMenus.vue b/frontend/src/business/components/project/head/ProjectHeaderMenus.vue index 78ac20a673..9d6833468c 100644 --- a/frontend/src/business/components/project/head/ProjectHeaderMenus.vue +++ b/frontend/src/business/components/project/head/ProjectHeaderMenus.vue @@ -66,7 +66,7 @@ export default { }, methods: { clickPlanMenu() { - this.$info("功能正在规划中..."); + this.$info(this.$t('commons.function_planning')); return false; } } diff --git a/frontend/src/business/components/project/menu/EditProject.vue b/frontend/src/business/components/project/menu/EditProject.vue index 096f648acb..3cf2eb4b1f 100644 --- a/frontend/src/business/components/project/menu/EditProject.vue +++ b/frontend/src/business/components/project/menu/EditProject.vue @@ -7,10 +7,10 @@ - + - + @@ -50,10 +50,10 @@ - + - + diff --git a/frontend/src/business/components/settings/SettingHome.vue b/frontend/src/business/components/settings/SettingHome.vue index c819985989..04a250f8fd 100644 --- a/frontend/src/business/components/settings/SettingHome.vue +++ b/frontend/src/business/components/settings/SettingHome.vue @@ -4,20 +4,20 @@
- 系统数据 + {{ $t('commons.system_data')}}
- 系统用户 {{statistic.userSize}} 人 + {{ $t('commons.system_user')}} {{statistic.userSize}} {{ $t('commons.user_unit') }}
- 工作空间 {{statistic.workspaceSize}} 个 + {{ $t('commons.system_workspace')}} {{statistic.workspaceSize}} {{ $t('commons.workspace_unit') }}
- 项目 {{statistic.projectSize}} 个 + {{ $t('commons.system_project')}} {{statistic.projectSize}} {{ $t('commons.workspace_unit') }}
diff --git a/frontend/src/business/components/settings/plugin/PluginConfig.vue b/frontend/src/business/components/settings/plugin/PluginConfig.vue index 0a14568493..f5f88c221c 100644 --- a/frontend/src/business/components/settings/plugin/PluginConfig.vue +++ b/frontend/src/business/components/settings/plugin/PluginConfig.vue @@ -33,8 +33,8 @@ diff --git a/frontend/src/business/components/settings/system/components/GroupCascader.vue b/frontend/src/business/components/settings/system/components/GroupCascader.vue index 9d8b87c91b..b8d2197181 100644 --- a/frontend/src/business/components/settings/system/components/GroupCascader.vue +++ b/frontend/src/business/components/settings/system/components/GroupCascader.vue @@ -120,7 +120,7 @@ export default { if (data.length > 0) { data.forEach(d => { d.leaf = d.type === GROUP_SYSTEM; - d.showLabel = "[" + USER_GROUP_SCOPE[d.type] + "] " + d.name; + d.showLabel = "[" + this.$t(USER_GROUP_SCOPE[d.type]) + "] " + d.name; }); } resolve(data); diff --git a/frontend/src/business/components/settings/system/group/EditPermission.vue b/frontend/src/business/components/settings/system/group/EditPermission.vue index ff5e042810..47643d3401 100644 --- a/frontend/src/business/components/settings/system/group/EditPermission.vue +++ b/frontend/src/business/components/settings/system/group/EditPermission.vue @@ -19,7 +19,7 @@ width="180"> diff --git a/frontend/src/business/components/settings/system/group/UserGroup.vue b/frontend/src/business/components/settings/system/group/UserGroup.vue index ce721d2b5f..8e15519b99 100644 --- a/frontend/src/business/components/settings/system/group/UserGroup.vue +++ b/frontend/src/business/components/settings/system/group/UserGroup.vue @@ -12,7 +12,7 @@ @@ -22,7 +22,12 @@ - + + +