国际化

This commit is contained in:
chenjianxing 2020-04-07 11:40:42 +08:00
parent 04bb963c55
commit f80190dc01
5 changed files with 67 additions and 40 deletions

View File

@ -9,12 +9,12 @@
<span class="title">{{$t('test_track.test_case')}}</span>
</el-col>
<el-col :span="1" :offset="6">
<el-col :span="1" :offset="4">
<el-button icon="el-icon-circle-plus-outline" size="small" round
@click="$emit('openTestCaseRelevanceDialog')" >关联测试用例</el-button>
@click="$emit('openTestCaseRelevanceDialog')" >{{$t('test_track.relevance_test_case')}}</el-button>
</el-col>
<el-col :span="1" >
<el-col :span="1" :offset="1">
<el-button
icon="el-icon-refresh" size="small" round
@click="initTableData()">{{$t('commons.refresh')}}</el-button>
@ -73,19 +73,19 @@
<el-table-column
width="160"
prop="executor"
label="执行人">
:label="$t('test_track.executor')">
</el-table-column>
<el-table-column
prop="status"
label="执行结果"
:label="$t('test_track.execute_result')"
width="160"
show-overflow-tooltip>
<template v-slot:default="scope">
<span v-if="scope.row.status == 'Prepare'">未开始</span>
<span v-if="scope.row.status == 'Pass'">通过</span>
<span v-if="scope.row.status == 'Failure'">失败</span>
<span v-if="scope.row.status == 'Blocking'">阻塞</span>
<span v-if="scope.row.status == 'Skip'">跳过</span>
<span v-if="scope.row.status == 'Prepare'">{{$t('test_track.plan_status_prepare')}}</span>
<span v-if="scope.row.status == 'Pass'">{{$t('test_track.pass')}}</span>
<span v-if="scope.row.status == 'Failure'">{{$t('test_track.failure')}}</span>
<span v-if="scope.row.status == 'Blocking'">{{$t('test_track.blocking')}}</span>
<span v-if="scope.row.status == 'Skip'">{{$t('test_track.skip')}}</span>
</template>
</el-table-column>

View File

@ -2,7 +2,7 @@
<div>
<el-dialog title="关联测试用例"
<el-dialog :title="$t('test_track.relevance_test_case')"
:visible.sync="dialogFormVisible"
width="50%">
@ -29,7 +29,7 @@
<el-table-column
prop="name"
label="用例名称"
:label="$t('test_track.name')"
style="width: 100%">
<template v-slot:default="scope">
{{scope.row.name}}
@ -115,7 +115,7 @@
},
getCaseNameByNodeIds(nodeIds) {
this.dialogFormVisible = true;
this.getCaseNames(null, nodeIds);
this.getCaseNames(this.planId, nodeIds);
},
handleSelectAll(selection) {
if(selection.length > 0){

View File

@ -11,12 +11,12 @@
<div>
<el-row >
<el-col :span="3" :offset="1">
<span class="cast_label">优先级</span>
<el-col :span="4" :offset="1">
<span class="cast_label">{{$t('test_track.priority')}}</span>
<span class="cast_item">{{testCase.priority}}</span>
</el-col>
<el-col :span="3">
<span class="cast_label">用例类型</span>
<el-col :span="5">
<span class="cast_label">{{$t('test_track.case_type')}}</span>
<span class="cast_item" v-if="testCase.type == 'functional'">{{$t('test_track.functional_test')}}</span>
<span class="cast_item" v-if="testCase.type == 'performance'">{{$t('commons.performance')}}</span>
<span class="cast_item" v-if="testCase.type == 'api'">{{$t('commons.api')}}</span>
@ -24,13 +24,13 @@
</el-row>
<el-row>
<el-col :span="3" :offset="1">
<span class="cast_label">测试方式</span>
<el-col :span="4" :offset="1">
<span class="cast_label">{{$t('test_track.method')}}</span>
<span v-if="testCase.method == 'manual'">{{$t('test_track.manual')}}</span>
<span v-if="testCase.method == 'auto'">{{$t('test_track.auto')}}</span>
</el-col>
<el-col :span="3">
<span class="cast_label">所属模块</span>
<el-col :span="5">
<span class="cast_label">{{$t('test_track.module')}}</span>
<span class="cast_item">{{testCase.nodePath}}</span>
</el-col>
</el-row>
@ -39,22 +39,22 @@
<el-col :offset="1" :span="2">
<el-button type="success" round
:icon="testCase.status == 'Pass' ? 'el-icon-check' : ''"
@click="setTestCaseStatus('Pass')"> 成功</el-button>
@click="setTestCaseStatus('Pass')"> {{$t('test_track.pass')}}</el-button>
</el-col>
<el-col :span="2">
<el-button type="danger" round
:icon="testCase.status == 'Failure' ? 'el-icon-check' : ''"
@click="setTestCaseStatus('Failure')"> 失败</el-button>
@click="setTestCaseStatus('Failure')"> {{$t('test_track.failure')}}</el-button>
</el-col>
<el-col :span="2">
<el-button type="warning" round
:icon="testCase.status == 'Blocking' ? 'el-icon-check' : ''"
@click="setTestCaseStatus('Blocking')"> 阻塞</el-button>
@click="setTestCaseStatus('Blocking')"> {{$t('test_track.blocking')}}</el-button>
</el-col>
<el-col :span="2">
<el-button type="info" round
:icon="testCase.status == 'Skip' ? 'el-icon-check' : ''"
@click="setTestCaseStatus('Skip')"> 跳过</el-button>
@click="setTestCaseStatus('Skip')"> {{$t('test_track.skip')}}</el-button>
</el-col>
</el-row>
@ -77,7 +77,7 @@
<span>{{scope.row.result}}</span>
</template>
</el-table-column>
<el-table-column label="实际结果" min-width="30%">
<el-table-column :label="$t('test_track.actual_result')" min-width="30%">
<template v-slot:default="scope">
<el-input
size="small"
@ -87,13 +87,13 @@
<span>{{scope.row.actualResult}}</span>
</template>
</el-table-column>
<el-table-column label="步骤执行结果" min-width="15%">
<el-table-column :label="$t('test_track.step_result')" min-width="15%">
<template v-slot:default="scope">
<el-select v-model="scope.row.stepResult" placeholder="选择执行结果">
<el-option label="通过" value="Pass"></el-option>
<el-option label="失败" value="Failure"></el-option>
<el-option label="阻塞" value="Blocking"></el-option>
<el-option label="跳过" value="Skip"></el-option>
<el-select v-model="scope.row.stepResult" :placeholder="$t('test_track.select_execute_result')">
<el-option :label="$t('test_track.pass')" value="Pass"></el-option>
<el-option :label="$t('test_track.failure')" value="Failure"></el-option>
<el-option :label="$t('test_track.blocking')" value="Blocking"></el-option>
<el-option :label="$t('test_track.skip')" value="Skip"></el-option>
</el-select>
</template>
</el-table-column>
@ -103,17 +103,17 @@
<el-row >
<el-col :span="40" :offset="1">
<span>备注</span>
<span>{{$t('commons.remark')}}</span>
<span>{{testCase.remark}}</span>
<span v-if="testCase.remark == null" style="color: gainsboro">未填写</span>
<span v-if="testCase.remark == null" style="color: gainsboro">{{$t('commons.not_filled')}}</span>
</el-col>
</el-row>
<el-row type="flex" justify="end">
<el-col :span="5">
<div>
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="saveCase">{{ ' ' }}</el-button>
<el-button @click="cancel">{{$t('test_track.cancel')}}</el-button>
<el-button type="primary" @click="saveCase">{{$t('test_track.save')}}</el-button>
</div>
</el-col>
</el-row>

View File

@ -45,6 +45,7 @@ export default {
'refresh': 'refresh',
'remark': 'remark',
'delete': 'delete',
'not_filled': 'Not filled'
},
workspace: {
'create': 'Create Workspace',
@ -206,7 +207,7 @@ export default {
'module_name': 'Module name',
'create_plan': 'Create test plan',
'plan_name': 'Test plan name',
'plan_project': 'Related projects',
'plan_project': 'Related project',
'plan_stage': 'Testing phase',
'plan_status': 'The current state',
'smoke_test': 'Smoke test',
@ -222,7 +223,19 @@ export default {
'plan_status_running': 'Starting',
'plan_status_completed': 'Completed',
'delete_module_confirm': 'Confirm delete module: ',
'delete_module_resource': 'and all submodules and test cases under the module'
'delete_module_resource': 'and all submodules and test cases under the module',
'relevance_test_case': 'Relevance test case',
'executor': 'executor',
'execute_result': 'Execute result',
'case_type': 'Case type',
'pass': 'Success',
'failure': 'Failure',
'blocking': 'Blocking',
'skip': 'Skip',
'actual_result': 'Actual result',
'step_result': 'Step result',
'select_execute_result': 'Select execute result',
'save': 'Save'
},
i18n: {
'home': 'Home'

View File

@ -44,7 +44,8 @@ export default {
'create': '新建',
'refresh': '刷新',
'remark': '备注',
'delete': '删除'
'delete': '删除',
'not_filled': '未填写'
},
workspace: {
'create': '创建工作空间',
@ -204,7 +205,6 @@ export default {
'add_submodule': '添加子模块',
'add_module': '添加模块',
'module_name': '模块名称',
'create_plan': '新建测试计划',
'plan_name': '计划名称',
'plan_project': '所属项目',
@ -224,6 +224,20 @@ export default {
'plan_status_completed': '已完成',
'delete_module_confirm': '确认删除模块: ',
'delete_module_resource': '以及模块下所有子模块和测试用例',
'relevance_test_case': '关联测试用例',
'executor': '执行人',
'execute_result': '执行结果',
'case_type': '用例类型',
'pass': '成功',
'failure': '失败',
'blocking': '阻塞',
'skip': '跳过',
'actual_result': '实际结果',
'step_result': '步骤执行结果',
'select_execute_result': '选择执行结果',
'save': '保 存'
},
i18n: {
'home': '首页'