refactor: i18n#1005314
--bug=1005314 --user=lyh 【测试跟踪】国际化问题 https://www.tapd.cn/55049933/s/1029327
This commit is contained in:
parent
6bc18fb1c6
commit
5102242aaf
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div @click="exe" class="recycle" :class="{'is-active': condition.trashEnable}">
|
<div @click="exe" class="recycle" :class="{'is-active': condition.trashEnable}">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="21"><i class="el-icon-delete"> 回收站</i></el-col>
|
<el-col :span="21"><i class="el-icon-delete"> {{$t('commons.trash')}}</i></el-col>
|
||||||
<el-col :span="3"><span style="color: #6C317C">{{ total }}</span></el-col>
|
<el-col :span="3"><span style="color: #6C317C">{{ total }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form-item :disable="true" :label="title" :prop="prop" :label-width="labelWidth">
|
<el-form-item :disable="true" :label="title" :prop="prop" :label-width="labelWidth">
|
||||||
<mavon-editor v-if="active" :editable="!disabled" @imgAdd="imgAdd" :default-open="disabled ? 'preview' : null" class="mavon-editor"
|
<mavon-editor v-if="active" :editable="!disabled" @imgAdd="imgAdd" :default-open="disabled ? 'preview' : null" class="mavon-editor"
|
||||||
:subfield="disabled ? false : true" :toolbars="toolbars" :toolbarsFlag="disabled ? false : true" @imgDel="imgDel" v-model="data[prop]" ref="md"/>
|
:subfield="disabled ? false : true" :toolbars="toolbars" :language="language" :toolbarsFlag="disabled ? false : true" @imgDel="imgDel" v-model="data[prop]" ref="md"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getUUID} from "@/common/js/utils";
|
import {getCurrentUser, getUUID} from "@/common/js/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "FormRichTextItem",
|
name: "FormRichTextItem",
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -56,6 +56,20 @@ export default {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
language() {
|
||||||
|
const user = getCurrentUser();
|
||||||
|
const language = user.language;
|
||||||
|
switch (language) {
|
||||||
|
case 'zh_CN':
|
||||||
|
return 'zh-CN';
|
||||||
|
case 'zh_TW':
|
||||||
|
return 'zh-TW';
|
||||||
|
case 'en_US':
|
||||||
|
return 'en';
|
||||||
|
default:
|
||||||
|
return 'zh-CN';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<el-tabs v-model="activeName" @tab-click="clickTabs" simple>
|
<el-tabs v-model="activeName" @tab-click="clickTabs" simple>
|
||||||
<el-tab-pane :label="$t('test_track.case.import.excel_title')" name="excelImport">
|
<el-tab-pane :label="$t('test_track.case.import.excel_title')" name="excelImport">
|
||||||
<el-row class="import-row" style="margin-left: 34px">
|
<el-row class="import-row" style="margin-left: 34px">
|
||||||
<el-radio v-model="importType" label="Create">导入新建</el-radio>
|
<el-radio v-model="importType" label="Create">{{$t('test_track.case.import.import_create')}}</el-radio>
|
||||||
<el-radio v-model="importType" label="Update">导入更新</el-radio>
|
<el-radio v-model="importType" label="Update">{{$t('test_track.case.import.import_create')}}</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="import-row">
|
<el-row class="import-row">
|
||||||
<div class="el-step__icon is-text" style="background-color: #C9E6F8;border-color: #C9E6F8;margin-right: 10px">
|
<div class="el-step__icon is-text" style="background-color: #C9E6F8;border-color: #C9E6F8;margin-right: 10px">
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
<el-row class="import-row">
|
<el-row class="import-row">
|
||||||
<div style="margin-left: 34px">
|
<div style="margin-left: 34px">
|
||||||
<div v-if="importType === 'Create'">
|
<div v-if="importType === 'Create'">
|
||||||
项目设置中“测试用例自定义ID” 开关开启时ID为必填项
|
{{$t('test_track.case.import.import_tip1')}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else >
|
<div v-else >
|
||||||
导入更新时ID为必填项
|
{{$t('test_track.case.import.import_tip2')}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,8 +84,8 @@
|
||||||
<!-- Xmind 导入 -->
|
<!-- Xmind 导入 -->
|
||||||
<el-tab-pane :label="$t('test_track.case.import.xmind_title')" name="xmindImport" style="border: 0px">
|
<el-tab-pane :label="$t('test_track.case.import.xmind_title')" name="xmindImport" style="border: 0px">
|
||||||
<el-row class="import-row" style="margin-left: 34px">
|
<el-row class="import-row" style="margin-left: 34px">
|
||||||
<el-radio v-model="importType" label="Create">导入新建</el-radio>
|
<el-radio v-model="importType" label="Create">{{$t('test_track.case.import.import_create')}}</el-radio>
|
||||||
<el-radio v-model="importType" label="Update">导入更新</el-radio>
|
<el-radio v-model="importType" label="Update">{{$t('test_track.case.import.import_create')}}</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="import-row">
|
<el-row class="import-row">
|
||||||
<div class="el-step__icon is-text" style="background-color: #C9E6F8;border-color: #C9E6F8;margin-right: 10px">
|
<div class="el-step__icon is-text" style="background-color: #C9E6F8;border-color: #C9E6F8;margin-right: 10px">
|
||||||
|
@ -95,10 +95,10 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="import-row" style="margin-left: 34px">
|
<el-row class="import-row" style="margin-left: 34px">
|
||||||
<div v-if="importType === 'Create'">
|
<div v-if="importType === 'Create'">
|
||||||
项目设置中“测试用例自定义ID” 开关开启时ID为必填项
|
{{$t('test_track.case.import.import_tip1')}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else >
|
<div v-else >
|
||||||
导入更新时ID为必填项
|
{{$t('test_track.case.import.import_tip2')}}
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row class="import-row">-->
|
<!-- <el-row class="import-row">-->
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
:filters="field.name === '用例等级' ? priorityFilters : null"
|
:filters="field.name === '用例等级' ? priorityFilters : null"
|
||||||
:field="item"
|
:field="item"
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
:label="field.name"
|
:label="field.system ? $t(systemFiledMap[field.name]) :field.name"
|
||||||
:min-width="90"
|
:min-width="90"
|
||||||
:prop="field.name">
|
:prop="field.name">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
@ -209,6 +209,7 @@ import {getProjectMember} from "@/network/user";
|
||||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||||
import BatchMove from "@/business/components/track/case/components/BatchMove";
|
import BatchMove from "@/business/components/track/case/components/BatchMove";
|
||||||
|
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseList",
|
name: "TestCaseList",
|
||||||
|
@ -363,6 +364,9 @@ export default {
|
||||||
moduleOptions() {
|
moduleOptions() {
|
||||||
return this.$store.state.testCaseModuleOptions;
|
return this.$store.state.testCaseModuleOptions;
|
||||||
},
|
},
|
||||||
|
systemFiledMap() {
|
||||||
|
return SYSTEM_FIELD_NAME_MAP;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.getTemplateField();
|
this.getTemplateField();
|
||||||
|
|
|
@ -1472,6 +1472,10 @@ export default {
|
||||||
import_file: "upload files",
|
import_file: "upload files",
|
||||||
ignore_error: "Ignore errors ",
|
ignore_error: "Ignore errors ",
|
||||||
continue_upload: "Upload continue",
|
continue_upload: "Upload continue",
|
||||||
|
import_create: "Import Create",
|
||||||
|
import_update: "Import Update",
|
||||||
|
import_tip1: "The ID is required when the \"Test Case Custom ID\" switch is turned on in the project settings",
|
||||||
|
import_tip2: "ID is required when importing and updating",
|
||||||
},
|
},
|
||||||
export: {
|
export: {
|
||||||
export: "Export cases",
|
export: "Export cases",
|
||||||
|
|
|
@ -1477,6 +1477,10 @@ export default {
|
||||||
import_file: "上传文件",
|
import_file: "上传文件",
|
||||||
ignore_error: "忽略错误",
|
ignore_error: "忽略错误",
|
||||||
continue_upload: "继续上传",
|
continue_upload: "继续上传",
|
||||||
|
import_create: "导入新建",
|
||||||
|
import_update: "导入更新",
|
||||||
|
import_tip1: "项目设置中“测试用例自定义ID” 开关开启时ID为必填项",
|
||||||
|
import_tip2: "导入更新时ID为必填项",
|
||||||
},
|
},
|
||||||
export: {
|
export: {
|
||||||
export: "导出用例",
|
export: "导出用例",
|
||||||
|
|
|
@ -1477,6 +1477,10 @@ export default {
|
||||||
import_file: "上傳文件",
|
import_file: "上傳文件",
|
||||||
ignore_error: "忽略錯誤",
|
ignore_error: "忽略錯誤",
|
||||||
continue_upload: "繼續上傳",
|
continue_upload: "繼續上傳",
|
||||||
|
import_create: "導入新建",
|
||||||
|
import_update: "導入更新",
|
||||||
|
import_tip1: "項目設置中“測試用例自定義ID” 開關開啟時ID為必填項",
|
||||||
|
import_tip2: "導入更新時ID為必填項",
|
||||||
},
|
},
|
||||||
export: {
|
export: {
|
||||||
export: "導出用例",
|
export: "導出用例",
|
||||||
|
|
Loading…
Reference in New Issue