refactor: i18n

--bug=1008890 --user=lyh 【国际化】-Settiing-ENV manament-未翻译为英文
https://www.tapd.cn/55049933/s/1082212
This commit is contained in:
shiziyuan9527 2021-12-17 14:28:27 +08:00 committed by 刘瑞斌
parent 046b5a7dba
commit 910c4d21c6
7 changed files with 76 additions and 25 deletions

View File

@ -4,14 +4,14 @@
<el-collapse-item name="1"> <el-collapse-item name="1">
<template slot="title"> <template slot="title">
<span class="span-style">{{title}}</span> <span class="span-style">{{title}}</span>
<el-tooltip class="item" effect="dark" content="每一个API步骤后执行一次 如加解密" placement="right"> <el-tooltip class="item" effect="dark" :content="$t('api_test.script.tip_1')" placement="right">
<i class="el-icon-info"/> <i class="el-icon-info"/>
</el-tooltip> </el-tooltip>
<div class="header-right" style="margin: 5px 5px 5px 50px" @click.stop> <div class="header-right" style="margin: 5px 5px 5px 50px" @click.stop>
<span class="span-style">过滤请求类型</span> <span class="span-style">{{$t('api_test.script.filter_request_type')}}</span>
<el-select multiple v-model="filterRequestArray" style="margin : 0px 10px 0px 10px; width: 214px " <el-select multiple v-model="filterRequestArray" style="margin : 0px 10px 0px 10px; width: 214px "
size="small" placeholder="请选择"> size="small" :placeholder="$t('commons.please_select')">
<el-option <el-option
v-for="item in requestArray" v-for="item in requestArray"
:key="item.value" :key="item.value"
@ -19,8 +19,8 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<span class="span-style" style="margin-right: 10px">脚本执行顺序</span> <span class="span-style" style="margin-right: 10px">{{$t('api_test.script.execution_order')}}</span>
<el-select v-model="isExecAfterPrivateScript" size="small" placeholder="请选择"> <el-select v-model="isExecAfterPrivateScript" size="small" :placeholder="$t('commons.please_select')">
<el-option <el-option
v-for="item in scriptExecSort" v-for="item in scriptExecSort"
:key="item.value" :key="item.value"
@ -39,13 +39,13 @@
<el-collapse-item name="2"> <el-collapse-item name="2">
<template slot="title"> <template slot="title">
{{ stepTitle }} {{ stepTitle }}
<el-tooltip class="item" effect="dark" content="全部API流程结束后执行一次 如token获取场景初始化" placement="right"> <el-tooltip class="item" effect="dark" :content="$t('api_test.script.tip_2')" placement="right">
<i class="el-icon-info"/> <i class="el-icon-info"/>
</el-tooltip> </el-tooltip>
<div class="header-right" style="margin: 5px 5px 5px 50px;" @click.stop> <div class="header-right" style="margin: 5px 5px 5px 50px;" @click.stop>
<el-switch v-model="isConnScenario" active-text="关联场景结果" style="font-size: 13px;font-weight: 300" <el-switch v-model="isConnScenario" :active-text="$t('api_test.script.associated_scene_results')" style="font-size: 13px;font-weight: 300"
@click.stop/> @click.stop/>
<el-tooltip class="item" effect="dark" content="脚本步骤会统计到场景执行结果中,执行报错时会影响场景的最终执行结果" placement="right"> <el-tooltip class="item" effect="dark" :content="$t('api_test.script.tip_3')" placement="right">
<i class="el-icon-info"/> <i class="el-icon-info"/>
</el-tooltip> </el-tooltip>
</div> </div>
@ -81,11 +81,11 @@ export default {
data() { data() {
return { return {
title: "", title: "",
preTitle: "单个请求步骤前执行", preTitle: this.$t('api_test.script.execute_before_step'),
postTitle: "单个请求步骤后执行", postTitle: this.$t('api_test.script.execute_post_step'),
stepTitle: "", stepTitle: "",
preStepTitle: "所有请求步骤前执行", preStepTitle: this.$t('api_test.script.execute_before_all_steps'),
postStepTitle: "所有请求步骤后执行", postStepTitle: this.$t('api_test.script.execute_post_all_steps'),
result: {}, result: {},
activeNames: [], activeNames: [],
isConnScenario: false, isConnScenario: false,
@ -98,12 +98,12 @@ export default {
], ],
scriptExecSort: [], scriptExecSort: [],
scriptPreExecSort: [ scriptPreExecSort: [
{value: true, label: "步骤内前置脚本后"}, {value: true, label: this.$t('api_test.script.after_the_pre_script_step')},
{value: false, label: "步骤内前置脚本前"}, {value: false, label: this.$t('api_test.script.before_the_pre_script_step')},
], ],
scriptPostExecSort: [ scriptPostExecSort: [
{value: true, label: "步骤内后置脚本后"}, {value: true, label: this.$t('api_test.script.after_the_post_script_step')},
{value: false, label: "步骤内后置脚本前"}, {value: false, label: this.$t('api_test.script.before_the_post_script_step')},
], ],
} }
}, },

View File

@ -4,7 +4,7 @@
<div class="ms-border"> <div class="ms-border">
<el-form-item prop="socket"> <el-form-item prop="socket">
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col :span="16"> <el-col :span="14">
<span class="ms-env-span" style="line-height: 30px;">{{ $t('api_test.environment.socket') }}</span> <span class="ms-env-span" style="line-height: 30px;">{{ $t('api_test.environment.socket') }}</span>
<el-input v-model="condition.socket" style="width: 85%" :placeholder="$t('api_test.request.url_description')" clearable size="small"> <el-input v-model="condition.socket" style="width: 85%" :placeholder="$t('api_test.request.url_description')" clearable size="small">
<template slot="prepend"> <template slot="prepend">
@ -15,9 +15,9 @@
</template> </template>
</el-input> </el-input>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="10">
<span style="margin-right: 12px;">描述</span> <span style="margin-right: 12px; line-height: 30px;">{{ $t('commons.description') }}</span>
<el-input v-model="condition.description" maxlength="200" :show-word-limit="true" size="small" style="width: 85%;"/> <el-input v-model="condition.description" maxlength="200" :show-word-limit="true" size="small" style="width: 70%;"/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
@ -75,7 +75,7 @@
<span>{{ row.time | timestampFormatDate }}</span> <span>{{ row.time | timestampFormatDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" show-overflow-tooltip min-width="120px" :label="'描述'"> <el-table-column prop="description" show-overflow-tooltip min-width="120px" :label="$t('commons.description')">
<template v-slot:default="{row}"> <template v-slot:default="{row}">
{{ row.description }} {{ row.description }}
</template> </template>

View File

@ -4,7 +4,7 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
append-to-body append-to-body
destroy-on-close destroy-on-close
width="500px" width="550px"
:before-close="handleClose"> :before-close="handleClose">
<el-form :model="currentConfig" label-width="100px" v-loading="result.loading" ref="form"> <el-form :model="currentConfig" label-width="100px" v-loading="result.loading" ref="form">
<el-row> <el-row>
@ -25,7 +25,7 @@
ref="fileUpload"> ref="fileUpload">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text" v-html="$t('load_test.upload_tips')"></div> <div class="el-upload__text" v-html="$t('load_test.upload_tips')"></div>
<div class="el-upload__tip" slot="tip">{{$t('api_test.api_import.file_size_limit')}}支持p12,jks,pfx格式</div> <div class="el-upload__tip" slot="tip">{{$t('api_test.api_import.file_size_limit')}}{{ $t('api_test.api_import.support_format') }}</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-col> <el-col>

View File

@ -49,7 +49,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="'描述'" prop="description"> <el-form-item :label="$t('commons.description')" prop="description">
<el-input v-model="config.description" maxlength="200" :show-word-limit="true" size="small"/> <el-input v-model="config.description" maxlength="200" :show-word-limit="true" size="small"/>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -171,7 +171,7 @@ export default {
millisecond: 'ms', millisecond: 'ms',
please_upload: 'Please upload file', please_upload: 'Please upload file',
please_fill_path: 'Please fill in the path', please_fill_path: 'Please fill in the path',
reference_documentation: "Reference documentation", reference_documentation: "Documentation",
already_exists: 'The name already exists', already_exists: 'The name already exists',
modifier: 'Modifier', modifier: 'Modifier',
validate: "Validate", validate: "Validate",
@ -1482,6 +1482,7 @@ export default {
tip: "Instructions", tip: "Instructions",
export_tip: "Export Tip", export_tip: "Export Tip",
ms_tip: "Support for MeterSphere JSON format", ms_tip: "Support for MeterSphere JSON format",
support_format: "Support p12, jks, pfx format",
ms_export_tip: "Export jSON-formatted files via MeterSphere website or browser plug-ins", ms_export_tip: "Export jSON-formatted files via MeterSphere website or browser plug-ins",
har_export_tip: "Export HAR files by browser dev-tool", har_export_tip: "Export HAR files by browser dev-tool",
esb_export_tip: "Can not export esb files now", esb_export_tip: "Can not export esb files now",
@ -1631,6 +1632,22 @@ export default {
close_title: "Do you want to close this scheduled task", close_title: "Do you want to close this scheduled task",
} }
} }
},
script: {
tip_1: "Execute once after each API step, such as encryption and decryption",
tip_2: "Execute once after all API process ends, such as token acquisition and scene initialization",
tip_3: "Script steps will be counted in the execution result of the scene, and the final execution result of the scene will be affected when an execution error is reported",
filter_request_type: "Filter request type",
execution_order: "Script execution order",
associated_scene_results: "Associated scene results",
execute_before_step: "Execute before a single request step",
execute_post_step: "Execute after a single request step",
execute_before_all_steps: "Execute before all requested steps",
execute_post_all_steps: "Execute after all requested steps",
after_the_pre_script_step: "After the pre-script in the step",
before_the_pre_script_step: "Before pre-script in step",
after_the_post_script_step: "After the script is placed in the step",
before_the_post_script_step: "Post-in-step before script",
} }
}, },
api_report: { api_report: {

View File

@ -1487,6 +1487,7 @@ export default {
title: "接口测试导入", title: "接口测试导入",
data_format: "数据格式", data_format: "数据格式",
file_size_limit: "文件大小不超过 50 M", file_size_limit: "文件大小不超过 50 M",
support_format: "支持p12,jks,pfx格式",
tip: "说明", tip: "说明",
export_tip: "导出方法", export_tip: "导出方法",
ms_tip: "支持 MeterSphere json 格式", ms_tip: "支持 MeterSphere json 格式",
@ -1639,6 +1640,22 @@ export default {
close_title: "要关闭这条定时任务吗?", close_title: "要关闭这条定时任务吗?",
} }
} }
},
script: {
tip_1: "每一个API步骤后执行一次 如加解密",
tip_2: "全部API流程结束后执行一次 如token获取场景初始化",
tip_3: "脚本步骤会统计到场景执行结果中,执行报错时会影响场景的最终执行结果",
filter_request_type: "过滤请求类型",
execution_order: "脚本执行顺序",
associated_scene_results: "关联场景结果",
execute_before_step: "单个请求步骤前执行",
execute_post_step: "单个请求步骤后执行",
execute_before_all_steps: "所有请求步骤前执行",
execute_post_all_steps: "所有请求步骤后执行",
after_the_pre_script_step: "步骤内前置脚本后",
before_the_pre_script_step: "步骤内前置脚本前",
after_the_post_script_step: "步骤内后置脚本后",
before_the_post_script_step: "步骤内后置脚本前",
} }
}, },
api_report: { api_report: {

View File

@ -1488,6 +1488,7 @@ export default {
tip: "說明", tip: "說明",
export_tip: "導出方法", export_tip: "導出方法",
ms_tip: "支持 MeterSphere json 格式", ms_tip: "支持 MeterSphere json 格式",
support_format: "支持p12,jks,pfx格式",
ms_export_tip: "通過 MeterSphere 接口測試頁面或者瀏覽器插件導出 json 格式文件", ms_export_tip: "通過 MeterSphere 接口測試頁面或者瀏覽器插件導出 json 格式文件",
har_export_tip: "通過 瀏覽器的開發者工具 導出 HAR 格式文件", har_export_tip: "通過 瀏覽器的開發者工具 導出 HAR 格式文件",
esb_export_tip: "暫時不支持ESB文件的導出", esb_export_tip: "暫時不支持ESB文件的導出",
@ -1637,6 +1638,22 @@ export default {
close_title: "要關閉這條定時任務嗎?", close_title: "要關閉這條定時任務嗎?",
} }
} }
},
script: {
tip_1: "每一個API步驟後執行一次 如加解密",
tip_2: "全部API流程結束後執行一次 如token獲取場景初始化",
tip_3: "腳本步驟會統計到場景執行結果中,執行報錯時會影響場景的最終執行結果",
filter_request_type: "過濾請求類型",
execution_order: "腳本執行順序",
associated_scene_results: "關聯場景結果",
execute_before_step: "單個請求步驟前執行",
execute_post_step: "單個請求步驟後執行",
execute_before_all_steps: "所有請求步驟前執行",
execute_post_all_steps: "所有請求步驟後執行",
after_the_pre_script_step: "步驟內前置腳本後",
before_the_pre_script_step: "步驟內前置腳本前",
after_the_post_script_step: "步驟內後置腳本後",
before_the_post_script_step: "步驟內後置腳本前",
} }
}, },
api_report: { api_report: {