refactor: i18n#1005314
--bug=1005314 --user=lyh 【测试跟踪】国际化问题 https://www.tapd.cn/55049933/s/1029327
This commit is contained in:
parent
46166acb34
commit
355fef0e56
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div @click="exe" class="recycle" :class="{'is-active': condition.trashEnable}">
|
||||
<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-row>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<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"
|
||||
: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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import {getCurrentUser, getUUID} from "@/common/js/utils";
|
||||
export default {
|
||||
name: "FormRichTextItem",
|
||||
components: {},
|
||||
|
@ -56,6 +56,20 @@ export default {
|
|||
return true;
|
||||
}
|
||||
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: {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<el-tabs v-model="activeName" @tab-click="clickTabs" simple>
|
||||
<el-tab-pane :label="$t('test_track.case.import.excel_title')" name="excelImport">
|
||||
<el-row class="import-row" style="margin-left: 34px">
|
||||
<el-radio v-model="importType" label="Create">导入新建</el-radio>
|
||||
<el-radio v-model="importType" label="Update">导入更新</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">{{$t('test_track.case.import.import_create')}}</el-radio>
|
||||
</el-row>
|
||||
<el-row class="import-row">
|
||||
<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">
|
||||
<div style="margin-left: 34px">
|
||||
<div v-if="importType === 'Create'">
|
||||
项目设置中“测试用例自定义ID” 开关开启时ID为必填项
|
||||
{{$t('test_track.case.import.import_tip1')}}
|
||||
</div>
|
||||
<div v-else >
|
||||
导入更新时ID为必填项
|
||||
{{$t('test_track.case.import.import_tip2')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -84,8 +84,8 @@
|
|||
<!-- Xmind 导入 -->
|
||||
<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-radio v-model="importType" label="Create">导入新建</el-radio>
|
||||
<el-radio v-model="importType" label="Update">导入更新</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">{{$t('test_track.case.import.import_create')}}</el-radio>
|
||||
</el-row>
|
||||
<el-row class="import-row">
|
||||
<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 class="import-row" style="margin-left: 34px">
|
||||
<div v-if="importType === 'Create'">
|
||||
项目设置中“测试用例自定义ID” 开关开启时ID为必填项
|
||||
{{$t('test_track.case.import.import_tip1')}}
|
||||
</div>
|
||||
<div v-else >
|
||||
导入更新时ID为必填项
|
||||
{{$t('test_track.case.import.import_tip2')}}
|
||||
</div>
|
||||
</el-row>
|
||||
<!-- <el-row class="import-row">-->
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
:filters="field.name === '用例等级' ? priorityFilters : null"
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
:label="field.name"
|
||||
:label="field.system ? $t(systemFiledMap[field.name]) :field.name"
|
||||
:min-width="90"
|
||||
:prop="field.name">
|
||||
<template v-slot="scope">
|
||||
|
@ -191,6 +191,7 @@ import {getProjectMember} from "@/network/user";
|
|||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import BatchMove from "@/business/components/track/case/components/BatchMove";
|
||||
import {SYSTEM_FIELD_NAME_MAP} from "@/common/js/table-constants";
|
||||
|
||||
export default {
|
||||
name: "TestCaseList",
|
||||
|
@ -321,6 +322,9 @@ export default {
|
|||
moduleOptions() {
|
||||
return this.$store.state.testCaseModuleOptions;
|
||||
},
|
||||
systemFiledMap() {
|
||||
return SYSTEM_FIELD_NAME_MAP;
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.$emit('setCondition', this.condition);
|
||||
|
|
|
@ -1432,6 +1432,10 @@ export default {
|
|||
import_file: "upload files",
|
||||
ignore_error: "Ignore errors ",
|
||||
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 cases",
|
||||
|
|
|
@ -1437,6 +1437,10 @@ export default {
|
|||
import_file: "上传文件",
|
||||
ignore_error: "忽略错误",
|
||||
continue_upload: "继续上传",
|
||||
import_create: "导入新建",
|
||||
import_update: "导入更新",
|
||||
import_tip1: "项目设置中“测试用例自定义ID” 开关开启时ID为必填项",
|
||||
import_tip2: "导入更新时ID为必填项",
|
||||
},
|
||||
export: {
|
||||
export: "导出用例",
|
||||
|
|
|
@ -1437,6 +1437,10 @@ export default {
|
|||
import_file: "上傳文件",
|
||||
ignore_error: "忽略錯誤",
|
||||
continue_upload: "繼續上傳",
|
||||
import_create: "導入新建",
|
||||
import_update: "導入更新",
|
||||
import_tip1: "項目設置中“測試用例自定義ID” 開關開啟時ID為必填項",
|
||||
import_tip2: "導入更新時ID為必填項",
|
||||
},
|
||||
export: {
|
||||
export: "導出用例",
|
||||
|
|
Loading…
Reference in New Issue