From b531108bd97e7d8ea0215323ac608e686756b2f8 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 21 Jul 2022 16:51:05 +0800 Subject: [PATCH] * Fix sync from zentao notice error. --- ui/src/locales/en-US.ts | 1 + ui/src/locales/zh-CN.ts | 1 + ui/src/views/script/WorkDir.vue | 14 ++++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ui/src/locales/en-US.ts b/ui/src/locales/en-US.ts index b70ed589..0aba56ce 100644 --- a/ui/src/locales/en-US.ts +++ b/ui/src/locales/en-US.ts @@ -184,6 +184,7 @@ export default { 'extract_success': 'Extract comments to test steps and checkpoints successfully.', 'extract_none': 'Not found any test steps in script comments.', 'extract_fail': 'Extract comments to test steps and checkpoints failed.', + 'sync_from_zentao_success': 'Success to sync {success} cases from Zentao', 'sync_success': 'Success to sync {success} cases to Zentao, ignore {ignore} cases.', 'sync_fail': 'Sync failed.', 'by_workspace': 'By WorkDir', diff --git a/ui/src/locales/zh-CN.ts b/ui/src/locales/zh-CN.ts index 3cd3abd1..40442974 100644 --- a/ui/src/locales/zh-CN.ts +++ b/ui/src/locales/zh-CN.ts @@ -191,6 +191,7 @@ export default { 'extract_success': '提取注释为测试步骤和验证点成功。', 'extract_none': '脚本中未发现测试步骤。', 'extract_fail': '提取注释为测试步骤和验证点失败。', + 'sync_from_zentao_success': '成功从禅道同步{success}个用例。', 'sync_success': '成功同步{success}个用例到禅道,忽略{ignore}个。', 'sync_fail': '同步失败', 'by_workspace': '按目录', diff --git a/ui/src/views/script/WorkDir.vue b/ui/src/views/script/WorkDir.vue index 64450fef..3752445a 100644 --- a/ui/src/views/script/WorkDir.vue +++ b/ui/src/views/script/WorkDir.vue @@ -561,7 +561,9 @@ const checkoutCases = (workspaceId, node) => { } }); notification.success({ - message: t('sync_success'), + message: t('sync_from_zentao_success', { + success: node.children.length, + }), }); } const checkoutFromModule = (workspaceId, node) => { @@ -573,7 +575,9 @@ const checkoutFromModule = (workspaceId, node) => { store.dispatch('Script/syncFromZentao', data).then((resp => { if (resp.code === 0) { notification.success({ - message: t('sync_success'), + message: t('sync_from_zentao_success', { + success: resp.data.length, + }), }); } else { notification.error({ @@ -588,7 +592,9 @@ const checkout = (workspaceId, caseId, path, successNotice = true) => { store.dispatch('Script/syncFromZentao', data).then((resp => { if (resp.code === 0) { successNotice && notification.success({ - message: t('sync_success'), + message: t('sync_from_zentao_success', { + success: 1, + }), }); } else { notification.error({ @@ -602,7 +608,7 @@ const syncFromZentaoSubmit = (model) => { store.dispatch("Script/syncFromZentao", model).then((resp) => { if (resp.code === 0) { notification.success({ - message: t("sync_success", {success: resp.data == undefined? 0 : resp.data.length, ignore:0}), + message: t("sync_from_zentao_success", {success: resp.data == undefined? 0 : resp.data.length, ignore:0}), }); showSyncFromZentaoModal.value = false; syncFromZentaoRef.value.clearFormData() -- GitLab