fix(测试跟踪): i18n

--bug=1008911 --user=lyh 【国际化】测试跟踪 模块,未进行国际化的问题汇总
https://www.tapd.cn/55049933/s/1083409
This commit is contained in:
shiziyuan9527 2021-12-20 17:47:18 +08:00 committed by 刘瑞斌
parent 16dd3fe837
commit 40ddddc44a
9 changed files with 98 additions and 38 deletions

View File

@ -1,25 +1,25 @@
<template>
<test-plan-report-container id="overview" :title="'概览'">
<test-plan-report-container id="overview" :title="$t('test_track.report.overview')">
<el-form class="form-info" v-loading="result.loading">
<el-form-item :label="$t('测试时间') + ':'">
<el-form-item :label="$t('test_track.report.testing_time') + ':'">
{{showTime}}
</el-form-item>
<el-row type="flex" justify="space-between" class="select-time">
<el-col :span="8">
<el-form-item :label="'测试总数' + ':'">
<el-form-item :label="$t('test_track.report.total_number_tests') + ':'">
{{report.caseCount}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="'执行率' + ':'">
<el-form-item :label="$t('test_track.report.exacutive_rate') + ':'">
{{ (report.executeRate ? (report.executeRate * 100).toFixed(1) : 0) + '%'}}
<ms-instructions-icon content="执行过的用例/所有用例 * 100%"/>
<ms-instructions-icon :content="$t('test_track.report.exacutive_rate_tip')"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="'通过率' + ':'">
<el-form-item :label="$t('test_track.report.passing_rate') + ':'">
{{ (report.passRate ? (report.passRate * 100 ).toFixed(1) : 0) + '%'}}
<ms-instructions-icon content="执行通过用例/所有用例 * 100%"/>
<ms-instructions-icon :content="$t('test_track.report.passing_rate_tip')"/>
</el-form-item>
</el-col>
</el-row>

View File

@ -5,30 +5,30 @@
placement="right"
width="300">
<p>{{shareUrl}}</p>
<span style="color: red;float: left;margin-left: 10px;">24小时有效</span>
<span style="color: red;float: left;margin-left: 10px;">{{ $t('test_track.report.valid_for_24_hours') }}</span>
<div style="text-align: right; margin: 0">
<el-button type="primary" size="mini" :disabled="!shareUrl"
v-clipboard:copy="shareUrl">{{ $t("commons.copy") }}</el-button>
</div>
<el-button icon="el-icon-share" slot="reference" :disabled="!isTestManagerOrTestUser"
plain size="mini" @click="handleShare()">
{{'分享'}}
{{ $t('test_track.report.share') }}
</el-button>
</el-popover>
</el-row>
<el-row>
<el-button icon="el-icon-receiving" v-if="!isDb" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleSave()">
{{'保存'}}
{{ $t('commons.save')}}
</el-button>
</el-row>
<el-row>
<el-button icon="el-icon-download" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleExportHtml()">
{{'导出'}}
{{ $t('commons.export')}}
</el-button>
</el-row>
<el-row>
<el-button icon="el-icon-setting" v-if="!isDb" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleEditTemplate()">
{{'配置'}}
{{ $t('test_track.report.configuration') }}
</el-button>
</el-row>
<test-plan-report-edit :plan-id="planId" :config.sync="report.config" ref="reportEdit"/>

View File

@ -157,67 +157,67 @@ export default {
return {
overview: {
enable: true,
name: '概览'
name: this.$t('test_track.report.overview')
},
summary: {
enable: true,
name: '报告总结'
name: this.$t('test_track.report.report_summary')
},
functional: {
enable: true,
name: '功能用例统计分析',
name: this.$t('test_track.report.analysis_functional'),
children: {
result: {
enable: true,
name: '测试结果',
name: this.$t('test_track.report.test_result'),
},
failure: {
enable: true,
name: '失败用例',
name: this.$t('test_track.report.fail_case'),
},
issue: {
enable: true,
name: '缺陷列表',
name: this.$t('test_track.report.issue_list'),
},
all: {
enable: true,
name: '所有用例',
name: this.$t('test_track.report.all_case'),
}
}
},
api: {
enable: true,
name: '接口用例统计分析',
name: this.$t('test_track.report.analysis_api'),
children: {
result: {
enable: true,
name: '测试结果',
name: this.$t('test_track.report.test_result'),
},
failure: {
enable: true,
name: '失败用例',
name: this.$t('test_track.report.fail_case'),
},
all: {
enable: true,
name: '所有用例',
name: this.$t('test_track.report.all_case'),
}
}
},
load: {
enable: true,
name: '性能用例统计分析',
name: this.$t('test_track.report.analysis_load'),
children: {
result: {
enable: true,
name: '测试结果',
name: this.$t('test_track.report.test_result'),
},
failure: {
enable: true,
name: '失败用例',
name: this.$t('test_track.report.fail_case'),
},
all: {
enable: true,
name: '所有用例',
name: this.$t('test_track.report.all_case'),
}
}
}

View File

@ -2,13 +2,13 @@
<div>
<ms-drawer class="drawer-content" :visible="true" :size="10" direction="left" :show-full-screen="false" :is-show-close="false">
<div class="title-item" >
<span class="title-name">目录</span>
<span class="title-name">{{$t('test_track.report.content')}}</span>
<el-tabs tab-position="right" v-model="activeName">
<el-tab-pane v-for="item in data" :key="item.title" :label="item.title" :name="item.link"/>
</el-tabs>
</div>
<div class="hiddenBottom">
<span>目录</span>
<span>{{$t('test_track.report.content')}}</span>
</div>
</ms-drawer>
</div>
@ -34,23 +34,23 @@ export default {
contents: [
{
link: 'overview',
title: '概览',
title: this.$t('test_track.report.overview'),
},
{
link: 'summary',
title: '报告总结',
title: this.$t('test_track.report.report_summary'),
},
{
link: 'functional',
title: '功能用例统计分析',
title: this.$t('test_track.report.analysis_functional'),
},
{
link: 'api',
title: '接口用例统计分析',
title: this.$t('test_track.report.analysis_api'),
},
{
link: 'load',
title: '性能用例统计分析',
title: this.$t('test_track.report.analysis_load'),
}
]
}

View File

@ -1,11 +1,11 @@
<template>
<test-plan-report-container id='summary' :title="'报告总结'">
<test-plan-report-container id='summary' :title="$t('test_track.report.report_summary')">
<template v-slot:title>
<el-link class="edit-link" v-if="!isTemplate && !isShare && !isEdit" @click="isEdit = true">
编辑
{{ $t('commons.edit') }}
</el-link>
<el-link class="edit-link" v-if="!isTemplate && !isShare && !isDb && isEdit" @click="saveSummary">
保存
{{ $t('commons.save')}}
</el-link>
</template>
<el-form class="form-info" v-loading="result.loading">

View File

@ -3,7 +3,7 @@
width="600px"
:visible.sync="visible"
@confirm="confirm"
:title="'模板配置'"
:title="$t('test_track.report.template_configuration')"
append-to-body
ref="msEditDialog">
<el-scrollbar>

View File

@ -2207,6 +2207,26 @@ export default {
manual: "Manual",
automation: "Automation",
},
overview: "Overview",
testing_time: "Testing time",
total_number_tests: "Total",
exacutive_rate: "Exacutive rate",
exacutive_rate_tip: "Use cases executed/all use cases * 100%",
passing_rate: "Passing rate",
passing_rate_tip: "Execute passed use cases/all use cases * 100%",
content: "Content",
report_summary: "Summary",
analysis_functional: "Analysis Functional",
analysis_api: "Analysis Api",
analysis_load: "Analysis Performance",
valid_for_24_hours: "Valid for 24 hours",
configuration: "Config",
share: "Share",
template_configuration: "Template configuration",
test_result: "Test Result",
fail_case: "Fail Case",
issue_list: "Issue List",
all_case: "All Case",
},
reporter:'Reporter',
lastmodify:'Last Modify'

View File

@ -2212,6 +2212,26 @@ export default {
manual: "手动触发",
automation: "自动触发",
},
overview: "概览",
testing_time: "测试时间",
total_number_tests: "测试总数",
exacutive_rate: "执行率",
exacutive_rate_tip: "执行过的用例/所有用例 * 100%",
passing_rate: "通过率",
passing_rate_tip: "执行通过用例/所有用例 * 100%",
content: "目录",
report_summary: "报告总结",
analysis_functional: "功能用例统计分析",
analysis_api: "接口用例统计分析",
analysis_load: "性能用例统计分析",
valid_for_24_hours: "24小时有效",
configuration: "配置",
share: "分享",
template_configuration: "模板配置",
test_result: "测试结果",
fail_case: "失败用例",
issue_list: "缺陷列表",
all_case: "所有用例",
},
reporter: '报告人',
lastmodify: '最后更改'

View File

@ -2210,6 +2210,26 @@ export default {
manual: "手動觸發",
automation: "自動觸發",
},
overview: "概覽",
testing_time: "測試時間",
total_number_tests: "測試總數",
exacutive_rate: "執行率",
exacutive_rate_tip: "執行過的用例/所有用例 * 100%",
passing_rate: "通過率",
passing_rate_tip: "執行通過用例/所有用例 * 100%",
content: "目錄",
report_summary: "報告總結",
analysis_functional: "功能用例統計分析",
analysis_api: "接口用例統計分析",
analysis_load: "性能用例統計分析",
valid_for_24_hours: "24小時有效",
configuration: "配置",
share: "分享",
template_configuration: "模板配置",
test_result: "測試結果",
fail_case: "失敗用例",
issue_list: "缺陷列表",
all_case: "所有用例",
},
reporter: '報告人',
lastmodify: '最後更改'