fix(测试跟踪): 未规划用例国际化

--bug=1008911 --user=陈建星 【国际化】测试跟踪 模块,未进行国际化的问题汇总 https://www.tapd.cn/55049933/s/1186008
This commit is contained in:
chenjianxing 2022-06-18 19:29:03 +08:00 committed by f2c-ci-robot[bot]
parent db16e04b8e
commit 2ead23f60b
14 changed files with 55 additions and 10 deletions

View File

@ -13,6 +13,7 @@
:add-permission="['PROJECT_API_SCENARIO:READ+CREATE']"
:update-permission="['PROJECT_API_SCENARIO:READ+EDIT']"
:default-label="$t('api_test.automation.unplanned_scenario')"
local-suffix="api_scenario"
@add="add"
@edit="edit"
@drag="drag"

View File

@ -10,6 +10,7 @@
:type="isReadOnly ? 'view' : 'edit'"
:allLabel="$t('api_test.definition.api_all')"
:default-label="$t('api_test.definition.unplanned_api')"
local-suffix="api_definition"
@add="add"
@edit="edit"
@drag="drag"

View File

@ -26,6 +26,8 @@
<node-tree class="node-tree"
:is-display="'public'"
v-loading="result.loading"
local-suffix="test_case"
default-label="未规划用例"
@nodeSelectEvent="publicNodeChange"
:tree-nodes="publicTreeNodes"
ref="publicNodeTree"/>

View File

@ -31,7 +31,7 @@
<i class="el-icon-folder"/>
</span>
<el-tooltip class="item" effect="dark" :content="data.name" placement="top-start" :open-delay="1000">
<span v-if="!data.isEdit" class="node-title" v-text="data.name"/>
<span v-if="!data.isEdit" class="node-title" v-text="isDefault(data) ? getLocalDefaultName() : data.name"/>
</el-tooltip>
<span class="count-title" v-if="isDisplay !== 'relevance'">
@ -49,7 +49,7 @@
<i @click.stop="edit(node, data)" class="el-icon-edit"></i>
</el-tooltip>
<el-tooltip
v-if="data.name === defaultLabel && data.level !==1"
v-if="data.name === defaultLabel && data.level !== 1"
v-permission="updatePermission"
class="item"
effect="dark"
@ -63,7 +63,7 @@
effect="dark"
:open-delay="200"
v-permission="addPermission"
v-if="!(data.name === defaultLabel && data.level ===1)"
v-if="!isDefault(data)"
:content="$t('test_track.module.add_submodule')"
placement="top">
<i @click.stop="append(node, data)" class="el-icon-circle-plus-outline"></i>
@ -133,7 +133,7 @@ export default {
defaultLabel: {
type: String,
default() {
return '默认模块';
return '未规划用例';
}
},
nameLimit: {
@ -150,7 +150,8 @@ export default {
},
updatePermission: Array,
addPermission: Array,
deletePermission: Array
deletePermission: Array,
localSuffix: String
},
watch: {
treeNodes() {
@ -484,6 +485,12 @@ export default {
this.$refs.tree.setCurrentKey(currentNode.data.id);
})
}
},
isDefault(data) {
return data.name === this.defaultLabel && data.level === 1;
},
getLocalDefaultName() {
return this.$t('commons.default_module.' + this.localSuffix);
}
}
};

View File

@ -9,7 +9,8 @@
:delete-permission="['PROJECT_TRACK_CASE:READ+DELETE']"
:add-permission="['PROJECT_TRACK_CASE:READ+CREATE']"
:update-permission="['PROJECT_TRACK_CASE:READ+EDIT']"
:default-label="$t('api_test.unplanned_case')"
default-label="未规划用例"
local-suffix="test_case"
@add="add"
@edit="edit"
@drag="drag"

View File

@ -6,10 +6,12 @@
<template v-slot:aside>
<ms-node-tree class="node-tree"
v-loading="result.loading"
@nodeSelectEvent="nodeChange"
:tree-nodes="treeNodes"
ref="nodeTree"/>
v-loading="result.loading"
@nodeSelectEvent="nodeChange"
:tree-nodes="treeNodes"
default-label="未规划用例"
local-suffix="test_case"
ref="nodeTree"/>
</template>
<el-card>

View File

@ -12,6 +12,8 @@
<node-tree class="node-tree"
:is-display="openType"
v-loading="result.loading"
local-suffix="test_case"
default-label="未规划用例"
@nodeSelectEvent="nodeChange"
:tree-nodes="treeNodes"
ref="nodeTree"/>

View File

@ -5,6 +5,8 @@
<node-tree class="node-tree"
v-loading="result.loading"
@nodeSelectEvent="nodeChange"
local-suffix="test_case"
default-label="未规划用例"
:tree-nodes="treeNodes"
ref="nodeTree"/>
</template>

View File

@ -9,6 +9,8 @@
<node-tree class="node-tree"
v-loading="result.loading"
@nodeSelectEvent="nodeChange"
local-suffix="test_case"
default-label="未规划用例"
:tree-nodes="treeNodes"
ref="nodeTree"/>
</template>

View File

@ -4,6 +4,8 @@
<ms-node-tree
class="node-tree"
:all-label="$t('commons.all_label.review')"
local-suffix="test_case"
default-label="未规划用例"
v-loading="result.loading"
@nodeSelectEvent="nodeChange"
:tree-nodes="treeNodes"

View File

@ -27,6 +27,8 @@
:is-display="openType"
:all-label="$t('commons.all_label.review')"
v-loading="result.loading"
local-suffix="test_case"
default-label="未规划用例"
@nodeSelectEvent="nodeChange"
:tree-nodes="treeNodes"
ref="nodeTree"/>

View File

@ -452,6 +452,13 @@ export default {
not_eligible_for_deletion:'Not Eligible For Deletion',
batch:'Batch',
change:'Change',
default_module: {
test_case: 'default',
api_definition: 'default',
api_scenario: 'default',
ui_element: 'default',
ui_scenario: 'default'
}
},
login: {
normal_Login: "Normal Login",

View File

@ -454,6 +454,13 @@ export default {
not_eligible_for_deletion:'不符合删除条件',
batch:'批量',
change:'改变',
default_module: {
test_case: '未规划用例',
api_definition: '未规划接口',
api_scenario: '未规划场景',
ui_element: '未规划元素',
ui_scenario: '未规划场景'
}
},
login: {
normal_Login: "普通登录",

View File

@ -454,6 +454,13 @@ export default {
not_eligible_for_deletion:'不符合删除條件',
batch:'批量',
change:'改变',
default_module: {
test_case: '未規劃用例',
api_definition: '未規劃接口',
api_scenario: '未規劃場景',
ui_element: '未規劃元素',
ui_scenario: '未規劃場景'
}
},
login: {
normal_Login: "普通登錄",