fix(国际化): 国际化

--bug=1008887 --user=郭雨琦 【ID1008887】【国际化】-MyWorkStation-未翻译为英文
This commit is contained in:
guoyuqi 2021-12-16 18:15:42 +08:00 committed by xiaomeinvG
parent 0497a7b553
commit 2cc93e2d8f
8 changed files with 73 additions and 27 deletions

View File

@ -83,7 +83,7 @@
sortable sortable
:field="item" :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
:filters="LEVEL_FILTERS" :filters="apiscenariofilters.LEVEL_FILTERS"
min-width="130px" min-width="130px"
:label="$t('api_test.automation.case_level')"> :label="$t('api_test.automation.case_level')">
<template v-slot:default="scope"> <template v-slot:default="scope">
@ -96,7 +96,7 @@
sortable sortable
:field="item" :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
:filters="STATUS_FILTERS" :filters="apiscenariofilters.STATUS_FILTERS"
min-width="120px"> min-width="120px">
<template v-slot:default="scope"> <template v-slot:default="scope">
<plan-status-table-item :value="scope.row.status"/> <plan-status-table-item :value="scope.row.status"/>
@ -191,7 +191,7 @@
min-width="80px"/> min-width="80px"/>
<ms-table-column prop="lastResult" <ms-table-column prop="lastResult"
:label="$t('api_test.automation.last_result')" :label="$t('api_test.automation.last_result')"
:filters="RESULT_FILTERS" :filters="apiscenariofilters.RESULT_FILTERS"
:field="item" :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
sortable sortable
@ -500,7 +500,6 @@ export default {
permissions: ['PROJECT_API_SCENARIO:READ+CREATE_PERFORMANCE_BATCH'] permissions: ['PROJECT_API_SCENARIO:READ+CREATE_PERFORMANCE_BATCH']
}, },
], ],
...API_SCENARIO_FILTERS,
typeArr: [ typeArr: [
{id: 'level', name: this.$t('test_track.case.priority')}, {id: 'level', name: this.$t('test_track.case.priority')},
{id: 'status', name: this.$t('test_track.plan.plan_status')}, {id: 'status', name: this.$t('test_track.plan.plan_status')},
@ -531,10 +530,12 @@ export default {
}, },
graphData: {}, graphData: {},
environmentType: "", environmentType: "",
envGroupId: "" envGroupId: "",
apiscenariofilters:{},
}; };
}, },
created() { created() {
this.apiscenariofilters = API_SCENARIO_FILTERS();
scenario.$on('hide', id => { scenario.$on('hide', id => {
this.hideStopBtn(id); this.hideStopBtn(id);
}); });

View File

@ -325,9 +325,9 @@ export default {
{text: this.$t('test_track.review.un_pass'), value: 'UnPass'}, {text: this.$t('test_track.review.un_pass'), value: 'UnPass'},
], ],
statusFilters: [ statusFilters: [
{text: '未开始', value: 'Prepare'}, {text: this.$t('test_track.case.status_prepare'), value: 'Prepare'},
{text: '进行中', value: 'Underway'}, {text: this.$t('test_track.case.status_running'), value: 'Underway'},
{text: '已完成', value: 'Completed'}, {text: this.$t('test_track.case.status_finished'), value: 'Completed'},
], ],
batchButtons: [], batchButtons: [],
simpleButtons: [ simpleButtons: [

View File

@ -45,7 +45,7 @@
prop="level" :label="$t('api_test.automation.case_level')" min-width="120px" prop="level" :label="$t('api_test.automation.case_level')" min-width="120px"
column-key="level" column-key="level"
sortable sortable
:filters="LEVEL_FILTERS"> :filters="apiscenariofilters.LEVEL_FILTERS">
<template v-slot:default="scope"> <template v-slot:default="scope">
<priority-table-item :value="scope.row.level" ref="level"/> <priority-table-item :value="scope.row.level" ref="level"/>
</template> </template>
@ -133,7 +133,7 @@
<ms-table-column :field="item" <ms-table-column :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
prop="lastResult" min-width="100px" prop="lastResult" min-width="100px"
:filters="RESULT_FILTERS" :filters="apiscenariofilters.RESULT_FILTERS"
:label="$t('api_test.automation.last_result')"> :label="$t('api_test.automation.last_result')">
<template v-slot:default="{row}"> <template v-slot:default="{row}">
<el-link type="success" @click="showReport(row)" v-if="row.lastResult === 'Success'"> <el-link type="success" @click="showReport(row)" v-if="row.lastResult === 'Success'">
@ -251,7 +251,6 @@ export default {
infoDb: false, infoDb: false,
runVisible: false, runVisible: false,
runData: [], runData: [],
...API_SCENARIO_FILTERS,
enableOrderDrag: true, enableOrderDrag: true,
operators: [ operators: [
{ {
@ -284,7 +283,8 @@ export default {
valueArr: { valueArr: {
projectEnv: [] projectEnv: []
}, },
planCaseIds: [] planCaseIds: [],
apiscenariofilters:{},
} }
}, },
computed: { computed: {
@ -296,6 +296,7 @@ export default {
} }
}, },
created() { created() {
this.apiscenariofilters = API_SCENARIO_FILTERS();
this.search(); this.search();
}, },

@ -1 +1 @@
Subproject commit f806258070e9ca2cda08e48aa47952d31eb2a60a Subproject commit f78e985bb2ccb3dfbe719e4dd02868a2399ee952

View File

@ -83,7 +83,14 @@ export const ISSUE_STATUS_MAP = {
'created':'新建' 'created':'新建'
} }
export const API_SCENARIO_FILTERS = { export function API_SCENARIO_FILTERS () {
return {
STATUS_FILTERS: [
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
],
LEVEL_FILTERS: [ LEVEL_FILTERS: [
{text: 'P0', value: 'P0'}, {text: 'P0', value: 'P0'},
{text: 'P1', value: 'P1'}, {text: 'P1', value: 'P1'},
@ -93,15 +100,29 @@ export const API_SCENARIO_FILTERS = {
RESULT_FILTERS: [ RESULT_FILTERS: [
{text: i18n.t('api_test.automation.fail'), value: 'Fail'}, {text: i18n.t('api_test.automation.fail'), value: 'Fail'},
{text: i18n.t('api_test.automation.success'), value: 'Success'} {text: i18n.t('api_test.automation.success'), value: 'Success'}
], ]
STATUS_FILTERS: [ };
/*LEVEL_FILTERS: [
{text: 'P0', value: 'P0'},
{text: 'P1', value: 'P1'},
{text: 'P2', value: 'P2'},
{text: 'P3', value: 'P3'}
];
RESULT_FILTERS: [
{text: i18n.t('api_test.automation.fail'), value: 'Fail'},
{text: i18n.t('api_test.automation.success'), value: 'Success'}
];*/
/*STATUS_FILTERS: [
{text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'}, {text: i18n.t('test_track.plan.plan_status_prepare'), value: 'Prepare'},
{text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'}, {text: i18n.t('test_track.plan.plan_status_running'), value: 'Underway'},
{text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'}, {text: i18n.t('test_track.plan.plan_status_completed'), value: 'Completed'},
{text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'}, {text: i18n.t('test_track.plan.plan_status_trash'), value: 'Trash'},
], ],*/
} }
export const USER_GROUP_SCOPE = { export const USER_GROUP_SCOPE = {
'SYSTEM': 'group.system', 'SYSTEM': 'group.system',
'WORKSPACE': 'group.workspace', 'WORKSPACE': 'group.workspace',

View File

@ -360,7 +360,7 @@ export default {
system_project: "Project", system_project: "Project",
user_unit: "", user_unit: "",
workspace_unit: "", workspace_unit: "",
dash_board:'Dash board', dash_board:'DashBoard',
all_project:'All Project', all_project:'All Project',
to_be_completed:'To be completed', to_be_completed:'To be completed',
pending_upgrade:'Pending upgrade', pending_upgrade:'Pending upgrade',
@ -1169,7 +1169,8 @@ export default {
all: "All", all: "All",
none: "None" none: "None"
}, },
} },
case_reduction_error_text:"Please restore first"
}, },
automation: { automation: {
open_expansion: "One-click expansion", open_expansion: "One-click expansion",
@ -1301,7 +1302,10 @@ export default {
share_cookie: 'share cookie', share_cookie: 'share cookie',
module_id:'Scenario Module ID', module_id:'Scenario Module ID',
level: 'Level', level: 'Level',
version:"Scenario Version" version:"Scenario Version",
warning_context:"It is not currently supported to add all scenarios to the test plan in batches!",
jmx_file_set:"Scenario JMX file set",
error_report_jmx:"Failed to export JMX file",
}, },
request: { request: {
debug: "Debug", debug: "Debug",
@ -1775,7 +1779,9 @@ export default {
unlink: 'Unlink', unlink: 'Unlink',
project_name: "Project", project_name: "Project",
status: 'Review Status', status: 'Review Status',
status_prepare: 'Not reviewed', status_prepare: 'Not started',
status_running: 'In progress',
status_finished: 'Completed',
status_pass: 'Pass', status_pass: 'Pass',
status_un_pass: 'UnPass', status_un_pass: 'UnPass',
cancel_relevance_project: "Disassociating the project will also cancel the associated test cases under the project", cancel_relevance_project: "Disassociating the project will also cancel the associated test cases under the project",
@ -2043,6 +2049,11 @@ export default {
title_description_required: "Title and description are required", title_description_required: "Title and description are required",
close_success: "Closed successfully", close_success: "Closed successfully",
preview: "Preview", preview: "Preview",
status_new: 'new',
status_resolved: 'resolved',
status_closed: 'closed',
status_active:'active',
status_delete:'delete',
please_choose_current_owner: "Please choose current owner", please_choose_current_owner: "Please choose current owner",
tapd_current_owner: "Tapd Current Owner", tapd_current_owner: "Tapd Current Owner",
zentao_bug_build: "Zentao Impact version", zentao_bug_build: "Zentao Impact version",

View File

@ -1177,7 +1177,8 @@ export default {
all: "全部", all: "全部",
none: "无" none: "无"
}, },
} },
case_reduction_error_text:"请先恢复"
}, },
automation: { automation: {
open_expansion: "一键展开", open_expansion: "一键展开",
@ -1308,7 +1309,10 @@ export default {
share_cookie: '共享cookie', share_cookie: '共享cookie',
module_id:'场景模块ID', module_id:'场景模块ID',
level: '级别', level: '级别',
version:"场景版本" version:"场景版本",
warning_context:"暂不支持批量添加所有场景到测试计划!",
jmx_file_set:"场景JMX文件集",
error_report_jmx:"导出JMX文件失败",
}, },
request: { request: {
debug: "调试", debug: "调试",
@ -2058,6 +2062,8 @@ export default {
status_new: '新建', status_new: '新建',
status_resolved: '已解决', status_resolved: '已解决',
status_closed: '已关闭', status_closed: '已关闭',
status_active:'激活',
status_delete:'删除',
please_choose_current_owner: "请选择处理人", please_choose_current_owner: "请选择处理人",
tapd_current_owner: "Tapd 处理人", tapd_current_owner: "Tapd 处理人",
zentao_bug_build: "禅道 影响版本", zentao_bug_build: "禅道 影响版本",

View File

@ -1174,7 +1174,8 @@ export default {
all: "全部", all: "全部",
none: "無" none: "無"
}, },
} },
case_reduction_error_text:"請先恢復"
}, },
automation: { automation: {
open_expansion: "一鍵展開", open_expansion: "一鍵展開",
@ -1306,7 +1307,10 @@ export default {
share_cookie: '共享cookie', share_cookie: '共享cookie',
module_id:'場景模塊ID', module_id:'場景模塊ID',
level: '級別', level: '級別',
version:"場景版本" version:"場景版本",
warning_context:"暫不支持批量添加所有場景到測試計劃!",
jmx_file_set:"場景JMX文件集",
error_report_jmx:"導出JMX文件失敗",
}, },
request: { request: {
debug: "調試", debug: "調試",
@ -2055,6 +2059,8 @@ export default {
status_new: '新建', status_new: '新建',
status_resolved: '已解決', status_resolved: '已解決',
status_closed: '已關閉', status_closed: '已關閉',
status_active:'激活',
status_delete:'删除',
please_choose_current_owner: "請選擇處理人", please_choose_current_owner: "請選擇處理人",
tapd_current_owner: "Tapd 處理人", tapd_current_owner: "Tapd 處理人",
zentao_bug_build: "禪道 影響版本", zentao_bug_build: "禪道 影響版本",