From 3981cc8741c8704a5f30ab4d6a2770e39b3af59c Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 22 May 2020 09:24:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/service/TestCaseReportTemplateService.java | 3 ++- backend/src/main/resources/i18n/messages.properties | 3 ++- backend/src/main/resources/i18n/messages_en_US.properties | 3 ++- backend/src/main/resources/i18n/messages_zh_CN.properties | 1 + backend/src/main/resources/i18n/messages_zh_TW.properties | 3 ++- .../comonents/report/TemplateComponent/BaseInfoComponent.vue | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReportTemplateService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReportTemplateService.java index 6c50055d7b..2f2c443718 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseReportTemplateService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReportTemplateService.java @@ -5,6 +5,7 @@ import io.metersphere.base.domain.TestCaseReportTemplateExample; import io.metersphere.base.mapper.TestCaseReportTemplateMapper; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.SessionUtils; +import io.metersphere.i18n.Translator; import io.metersphere.track.request.testCaseReport.QueryTemplateRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -61,7 +62,7 @@ public class TestCaseReportTemplateService { .andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId()) .andIdNotEqualTo(testCaseReportTemplate.getId()); if (testCaseReportTemplateMapper.selectByExample(example).size() > 0) { - MSException.throwException("同一工作空间下不能存在同名模版"); + MSException.throwException(Translator.get("test_case_report_template_repeat")); } } diff --git a/backend/src/main/resources/i18n/messages.properties b/backend/src/main/resources/i18n/messages.properties index a540e76319..93f6073c99 100644 --- a/backend/src/main/resources/i18n/messages.properties +++ b/backend/src/main/resources/i18n/messages.properties @@ -41,4 +41,5 @@ remark_optional= do_not_modify_header_order= module_created_automatically= options= -please_input_workspace_member= \ No newline at end of file +please_input_workspace_member= +test_case_report_template_repeat= \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 9ea76aedaf..0091ee77db 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -82,4 +82,5 @@ remark_optional=Remark optional do_not_modify_header_order=Do not modify the header order module_created_automatically=If there is no such module, will be created automatically options=options -please_input_workspace_member=Please input workspace merber \ No newline at end of file +please_input_workspace_member=Please input workspace merber +test_case_report_template_repeat=The workspace has the same name template \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 0031ca23b4..38a341411c 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -83,3 +83,4 @@ do_not_modify_header_order=请勿修改表头顺序 module_created_automatically=若无该模块将自动创建 options=选项 please_input_workspace_member=请填写该工作空间相关人员 +test_case_report_template_repeat=同一工作空间下不能存在同名模版 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index d4a5cd2cac..4fac1a1bc2 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -82,4 +82,5 @@ remark_optional=備註選填 do_not_modify_header_order=請勿修改表頭順序 module_created_automatically=若無該模塊將自動創建 options=選項 -please_input_workspace_member=請填寫該工作空間相關人員 \ No newline at end of file +please_input_workspace_member=請填寫該工作空間相關人員 +test_case_report_template_repeat=同壹工作空間下不能存在同名模版 \ No newline at end of file diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/BaseInfoComponent.vue b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/BaseInfoComponent.vue index 6112318966..5bc05dac5b 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/BaseInfoComponent.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/BaseInfoComponent.vue @@ -51,7 +51,7 @@ type: Object, default() { return { - projectName: this.$t('test_track.project.name'), + projectName: this.$t('test_track.project'), principal: 'Michael', executors: ['Michael','Tom','Jiessie'], startTime: '2020-6-18',