diff --git a/backend/framework/sdk/src/main/resources/i18n/case.properties b/backend/framework/sdk/src/main/resources/i18n/case.properties index 25c75810f0..94149ffaeb 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case.properties @@ -7,6 +7,8 @@ permission.case_review.name=用例评审 permission.case_review.review=评审 permission.case_review.relevance=关联/取消关联 #module:FunctionalCase +functional_case.module.default.name=未规划用例 +review.module.default.name=未规划评审 functional_case.id.not_blank=ID不能为空 functional_case.num.not_blank=业务ID不能为空 functional_case.custom_num.length_range=自定义业务ID长度必须在1-64之间 diff --git a/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties index 485b02d802..867c9cb7ec 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties @@ -8,6 +8,8 @@ permission.case_review.review=Review permission.case_review.relevance=Associate/Disassociate #module:FunctionalCase +functional_case.module.default.name=Unplanned case +review.module.default.name=Unplanned review functional_case.id.not_blank=ID cannot be empty functional_case.num.not_blank=Business ID cannot be empty functional_case.custom_num.length_range=The length of the custom business ID must be between 1 and 64 diff --git a/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties index 0587384b87..9ae38ff3d8 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties @@ -7,6 +7,8 @@ permission.case_review.name=用例评审 permission.case_review.review=评审 permission.case_review.relevance=关联/取消关联 #module:FunctionalCase +functional_case.module.default.name=未规划用例 +review.module.default.name=未规划评审 functional_case.id.not_blank=ID不能为空 functional_case.num.not_blank=业务ID不能为空 functional_case.custom_num.length_range=自定义业务ID长度必须在1-64之间 diff --git a/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties index 1a89145296..80ec7582c9 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties @@ -8,6 +8,8 @@ permission.case_review.review=評審 permission.case_review.relevance=關聯/取消關聯 #module:FunctionalCase +functional_case.module.default.name=未規劃用例 +review.module.default.name=未規劃評審 functional_case.id.not_blank=ID不能為空 functional_case.num.not_blank=业务ID不能為空 functional_case.custom_num.length_range=自定義業務ID長度必須在1-64之間 diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java index 96eeb6d366..dad852ce5d 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java @@ -642,7 +642,7 @@ public class CaseReviewFunctionalCaseService { projectRootMap.forEach((projectId,projectOptionDTOList)->{ BaseTreeNode projectNode = new BaseTreeNode(projectId, projectOptionDTOList.get(0).getProjectName(), Project.class.getName()); returnList.add(projectNode); - BaseTreeNode defaultNode = functionalCaseModuleService.getDefaultModule(Translator.get("default.module")); + BaseTreeNode defaultNode = functionalCaseModuleService.getDefaultModule(Translator.get("functional_case.module.default.name")); projectNode.addChild(defaultNode); }); return returnList; @@ -653,7 +653,7 @@ public class CaseReviewFunctionalCaseService { List projectModuleIds = moduleList.stream().map(FunctionalCaseModule::getId).toList(); List nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(projectModuleIds); boolean haveVirtualRootNode = CollectionUtils.isEmpty(projectRootMap.get(projectId)); - List baseTreeNodes = functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, !haveVirtualRootNode, Translator.get("default.module")); + List baseTreeNodes = functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, !haveVirtualRootNode, Translator.get("functional_case.module.default.name")); for (BaseTreeNode baseTreeNode : baseTreeNodes) { projectNode.addChild(baseTreeNode); } @@ -704,7 +704,7 @@ public class CaseReviewFunctionalCaseService { //节点内容只有Id和parentId List moduleIds = extFunctionalCaseModuleMapper.selectIdByProjectIdAndReviewId(projectId, reviewId); List nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds); - return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, moduleCountDTOList, true, Translator.get("default.module")); + return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, moduleCountDTOList, true, Translator.get("functional_case.module.default.name")); } public List getUserStatus(String reviewId, String caseId) { diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java index 00877baf46..bfa2d64502 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewModuleService.java @@ -66,7 +66,7 @@ public class CaseReviewModuleService extends ModuleTreeService { public List getTree(String projectId) { List fileModuleList = extCaseReviewModuleMapper.selectBaseByProjectId(projectId); - return super.buildTreeAndCountResource(fileModuleList, true, Translator.get("default.module")); + return super.buildTreeAndCountResource(fileModuleList, true, Translator.get("review.module.default.name")); } public String add(CaseReviewModuleCreateRequest request, String userId) { @@ -188,7 +188,7 @@ public class CaseReviewModuleService extends ModuleTreeService { public List getTreeOnlyIdsAndResourceCount(String projectId, List moduleCountDTOList) { //节点内容只有Id和parentId List fileModuleList = extCaseReviewModuleMapper.selectIdAndParentIdByProjectId(projectId); - return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("default.module")); + return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("review.module.default.name")); } /** diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java index 4ddbd9c04c..be688cd01d 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java @@ -77,7 +77,7 @@ public class FunctionalCaseMinderService { private List getBaseTreeNodes(List moduleIds) { List nodeByNodeIds = functionalCaseModuleService.getNodeByNodeIds(moduleIds); //根据模块节点构造模块树 - return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("default.module")); + return functionalCaseModuleService.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("functional_case.module.default.name")); } private static void buildCaseTree(List baseTreeNodes, Map> moduleCaseMap, List functionalMinderTreeNodeDTOs) { diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java index 6b6af786ea..e84562de4f 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java @@ -64,7 +64,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService { public List getTree(String projectId) { List functionalModuleList = extFunctionalCaseModuleMapper.selectBaseByProjectId(projectId); - return super.buildTreeAndCountResource(functionalModuleList, true, Translator.get("default.module")); + return super.buildTreeAndCountResource(functionalModuleList, true, Translator.get("functional_case.module.default.name")); } public String add(FunctionalCaseModuleCreateRequest request, String userId) { @@ -186,7 +186,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService { public List getTreeOnlyIdsAndResourceCount(String projectId, List moduleCountDTOList) { //节点内容只有Id和parentId List fileModuleList = extFunctionalCaseModuleMapper.selectIdAndParentIdByProjectId(projectId); - return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("default.module")); + return super.buildTreeAndCountResource(fileModuleList, moduleCountDTOList, true, Translator.get("functional_case.module.default.name")); } /** @@ -250,7 +250,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService { } List moduleIds = functionalCases.stream().map(FunctionalCase::getModuleId).distinct().toList(); List nodeByNodeIds = getNodeByNodeIds(moduleIds); - return super.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("default.module")); + return super.buildTreeAndCountResource(nodeByNodeIds, true, Translator.get("functional_case.module.default.name")); } public List getNodeByNodeIds(List moduleIds) { @@ -400,7 +400,7 @@ public class FunctionalCaseModuleService extends ModuleTreeService { public String getModuleName(String id) { if (ModuleConstants.DEFAULT_NODE_ID.equals(id)) { - return Translator.get("default.module"); + return Translator.get("functional_case.module.default.name"); } return functionalCaseModuleMapper.selectByPrimaryKey(id).getName(); } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java index 87ed865345..d680dba8fb 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileMetadataService.java @@ -116,7 +116,7 @@ public class FileMetadataService { Map moduleNameMap = fileModuleService.getModuleNameMapByIds(moduleIds); for (FileInformationResponse dto : returnList) { if (StringUtils.equals(dto.getModuleId(), ModuleConstants.DEFAULT_NODE_ID)) { - dto.setModuleName(Translator.get("default.module")); + dto.setModuleName(Translator.get("file.module.default.name")); } else { dto.setModuleName(moduleNameMap.get(dto.getModuleId())); } @@ -125,7 +125,7 @@ public class FileMetadataService { private void initModuleName(FileInformationResponse dto) { if (StringUtils.equals(dto.getModuleId(), ModuleConstants.DEFAULT_NODE_ID)) { - dto.setModuleName(Translator.get("default.module")); + dto.setModuleName(Translator.get("file.module.default.name")); } else { dto.setModuleName(fileModuleService.getModuleName(dto.getModuleId())); }