国际化

This commit is contained in:
chenjianxing 2020-04-09 14:47:53 +08:00
parent 3c59765b2a
commit 9b34bb2819
5 changed files with 45 additions and 26 deletions

View File

@ -6,7 +6,7 @@
<select-menu
:data="projects"
:current-data="currentProject"
:title="'项目'"
:title="$t('test_track.project')"
@dataChange="changeProject">
</select-menu>
@ -184,7 +184,6 @@
<style scoped>
.case_container {
padding: 15px;
width: 100%;
height: 100%;
background: white;

View File

@ -6,7 +6,7 @@
<select-menu
:data="testPlans"
:current-data="currentPlan"
:title="'计划'"
:title="$t('test_track.plan')"
@dataChange="changePlan">
</select-menu>
@ -20,12 +20,12 @@
</el-aside>
<el-main>
<test-case-plan-list
<test-plan-test-case-list
@openTestCaseRelevanceDialog="openTestCaseRelevanceDialog"
@editTestPlanTestCase="editTestPlanTestCase"
@refresh="refresh"
:plan-id="planId"
ref="testCasePlanList"></test-case-plan-list>
ref="testCasePlanList"></test-plan-test-case-list>
</el-main>
</el-container>
@ -46,14 +46,14 @@
<script>
import PlanNodeTree from "./components/PlanNodeTree";
import TestCasePlanList from "./components/TestCasePlanList";
import TestPlanTestCaseList from "./components/TestPlanTestCaseList";
import TestCaseRelevance from "./components/TestCaseRelevance";
import TestPlanTestCaseEdit from "./components/TestPlanTestCaseEdit";
import SelectMenu from "../common/SelectMenu";
export default {
name: "TestPlanView",
components: {PlanNodeTree, TestCasePlanList, TestCaseRelevance, TestPlanTestCaseEdit, SelectMenu},
components: {PlanNodeTree, TestPlanTestCaseList, TestCaseRelevance, TestPlanTestCaseEdit, SelectMenu},
data() {
return {
testPlans: [],

View File

@ -10,7 +10,7 @@
</el-col>
<el-col :span="2" :offset="8">
<el-button icon="el-icon-circle-plus-outline" size="small" round
<el-button icon="el-icon-connection" size="small" round
@click="$emit('openTestCaseRelevanceDialog')" >{{$t('test_track.relevance_test_case')}}</el-button>
</el-col>
@ -75,11 +75,25 @@
width="160"
show-overflow-tooltip>
<template v-slot:default="scope">
<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>
<el-tag v-if="scope.row.status == 'Prepare'"
e ffect="info"
size="mini">{{$t('test_track.plan_status_prepare')}}</el-tag>
<el-tag v-if="scope.row.status == 'Pass'"
type="success"
effect="dark"
size="mini">{{$t('test_track.pass')}}</el-tag>
<el-tag v-if="scope.row.status == 'Failure'"
type="danger"
effect="dark"
size="mini">{{$t('test_track.failure')}}</el-tag>
<el-tag v-if="scope.row.status == 'Blocking'"
type="warning"
effect="dark"
size="mini">{{$t('test_track.blocking')}}</el-tag>
<el-tag v-if="scope.row.status == 'Skip'"
type="info"
effect="dark"
size="mini">{{$t('test_track.skip')}}</el-tag>
</template>
</el-table-column>
@ -95,7 +109,7 @@
:label="$t('commons.operating')">
<template v-slot:default="scope">
<el-button @click="handleEdit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
<el-button @click="handleDelete(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
<el-button @click="handleDelete(scope.row)" type="danger" icon="el-icon-unlock" size="mini" circle/>
</template>
</el-table-column>
</el-table>
@ -126,7 +140,7 @@
import PlanNodeTree from './PlanNodeTree';
export default {
name: "TestCaseList",
name: "TestPlanTestCaseList",
components: {PlanNodeTree},
data() {
return {
@ -192,7 +206,7 @@
this.$emit('editTestPlanTestCase', testCase);
},
handleDelete(testCase) {
this.$alert(this.$t('load_test.delete_confirm') + testCase.name + "", '', {
this.$alert(this.$t('test_track.confirm_cancel_relevance') + ' ' + testCase.name + " ", '', {
confirmButtonText: this.$t('commons.confirm'),
callback: (action) => {
if (action === 'confirm') {

View File

@ -41,10 +41,10 @@ export default {
'api': 'Api',
'performance': 'Performance',
'input_content': 'Please enter content',
'create': 'create',
'refresh': 'refresh',
'remark': 'remark',
'delete': 'delete',
'create': 'Create',
'refresh': 'Refresh',
'remark': 'Remark',
'delete': 'Delete',
'not_filled': 'Not filled'
},
workspace: {
@ -201,7 +201,7 @@ export default {
'input_method': 'Please select method',
'input_prerequisite': 'Please select prerequisite',
'search_module': 'Search module',
'rename': 'rename',
'rename': 'Rename',
'add_submodule': 'Add submodule',
'add_module': 'Add module',
'module_name': 'Module name',
@ -209,17 +209,17 @@ export default {
'plan_name': 'Test plan name',
'plan_project': 'Related project',
'plan_stage': 'Testing phase',
'plan_status': 'The current state',
'plan_status': 'Status',
'smoke_test': 'Smoke test',
'functional_test': 'Functional test',
'integration_testing': 'Integration testing',
'system_test': 'System test',
'version_validation': 'Version validation',
'plan_principal': 'principal',
'plan_principal': 'Principal',
'input_plan_principal': 'Please select principal',
'input_plan_project': 'Please select project',
'input_plan_stage': 'Please select stage',
'plan_status_prepare': ' Not started',
'plan_status_prepare': 'Not started',
'plan_status_running': 'Starting',
'plan_status_completed': 'Completed',
'delete_module_confirm': 'Confirm delete module: ',
@ -235,7 +235,10 @@ export default {
'actual_result': 'Actual result',
'step_result': 'Step result',
'select_execute_result': 'Select execute result',
'save': 'Save'
'save': 'Save',
'confirm_cancel_relevance': 'Confirm cancel relevance',
'plan': 'Plan',
'project': 'Project',
},
test_resource_pool: {
'type': 'type',

View File

@ -235,7 +235,10 @@ export default {
'actual_result': '实际结果',
'step_result': '步骤执行结果',
'select_execute_result': '选择执行结果',
'save': '保 存'
'save': '保 存',
'confirm_cancel_relevance': '确认取消关联',
'plan': '计划',
'project': '项目',
},
test_resource_pool: {
'type': '类型',