From da69cde43f3d87d0aa92c53ff2c3b616878d53f6 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 22 Apr 2024 18:34:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=94=A8=E4=BE=8B=E6=95=B0=E6=8D=AE=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk/src/main/resources/i18n/commons.properties | 1 + .../src/main/resources/i18n/commons_en_US.properties | 1 + .../src/main/resources/i18n/commons_zh_CN.properties | 1 + .../src/main/resources/i18n/commons_zh_TW.properties | 1 + .../metersphere/bug/service/BugHistoryService.java | 2 ++ .../api-test/management/components/moduleTree.vue | 6 +++--- .../views/bug-management/components/bugCaseTab.vue | 12 +++--------- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/framework/sdk/src/main/resources/i18n/commons.properties b/backend/framework/sdk/src/main/resources/i18n/commons.properties index 30d2ff1d61..abd278f4d3 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons.properties @@ -439,6 +439,7 @@ project=项目 add=添加 delete=删除 update=更新 +recover=恢复 project_is_not_exist=项目不存在 #permission diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties index 9406e02b93..a5a40df763 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_en_US.properties @@ -447,6 +447,7 @@ project=Project add=Add delete=Delete update=Update +recover=Recover project_is_not_exist=Project is not exist #permission diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties index d51940ccd9..93e00ff14b 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_zh_CN.properties @@ -446,6 +446,7 @@ project=项目 add=添加 delete=删除 update=更新 +recover=恢复 project_is_not_exist=项目不存在 #permission diff --git a/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties index 02d9f23254..4dd48f036f 100644 --- a/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/commons_zh_TW.properties @@ -444,6 +444,7 @@ project=項目 add=添加 delete=删除 update=更新 +recover=恢復 project_is_not_exist=項目不存在 #permission diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugHistoryService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugHistoryService.java index d66f973e62..d25acb87fc 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugHistoryService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugHistoryService.java @@ -64,6 +64,8 @@ public class BugHistoryService { dto.setType(Translator.get("update")); } else if (StringUtils.equals(dto.getType(), OperationLogType.DELETE.name())) { dto.setType(Translator.get("delete")); + } else if (StringUtils.equals(dto.getType(), OperationLogType.RECOVER.name())) { + dto.setType(Translator.get("recover")); } dto.setLatest(latestVersionId != null && latestVersionId.longValue() == dto.getId().longValue()); return dto; diff --git a/frontend/src/views/api-test/management/components/moduleTree.vue b/frontend/src/views/api-test/management/components/moduleTree.vue index 0079aaacbd..5dc930c9ff 100644 --- a/frontend/src/views/api-test/management/components/moduleTree.vue +++ b/frontend/src/views/api-test/management/components/moduleTree.vue @@ -203,7 +203,7 @@ import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import useAppStore from '@/store/modules/app'; - import { mapTree } from '@/utils'; + import { characterLimit, mapTree } from '@/utils'; import { hasAllPermission, hasAnyPermission } from '@/utils/permission'; import { ApiDefinitionGetModuleParams } from '@/models/apiTest/management'; @@ -517,8 +517,8 @@ type: 'error', title: node.type === 'API' - ? t('apiTestDebug.deleteDebugTipTitle', { name: node.name }) - : t('apiTestDebug.deleteFolderTipTitle', { name: node.name }), + ? t('apiTestDebug.deleteDebugTipTitle', { name: characterLimit(node.name) }) + : t('apiTestDebug.deleteFolderTipTitle', { name: characterLimit(node.name) }), content: node.type === 'API' ? t('apiTestDebug.deleteDebugTipContent') : t('apiTestDebug.deleteFolderTipContent'), okText: t('apiTestDebug.deleteConfirm'), okButtonProps: { diff --git a/frontend/src/views/bug-management/components/bugCaseTab.vue b/frontend/src/views/bug-management/components/bugCaseTab.vue index deebf49722..0d1b4d8adc 100644 --- a/frontend/src/views/bug-management/components/bugCaseTab.vue +++ b/frontend/src/views/bug-management/components/bugCaseTab.vue @@ -64,7 +64,6 @@ ([]); - const currentSelectCase = ref('API'); + const currentSelectCase = ref('FUNCTIONAL'); const modulesTreeParams = ref({}); @@ -236,12 +234,8 @@ const caseTypeOptions = ref<{ label: string; value: string }[]>([ { - value: 'API', - label: t('caseManagement.featureCase.apiCase'), - }, - { - value: 'SCENARIO', - label: t('caseManagement.featureCase.sceneCase'), + label: 'menu.caseManagement.featureCase', + value: 'FUNCTIONAL', }, ]);