refactor: i18n

This commit is contained in:
shiziyuan9527 2020-10-20 18:51:41 +08:00
parent 21dd0e7508
commit 876cc63d02
6 changed files with 16 additions and 4 deletions

View File

@ -211,7 +211,7 @@
</el-row>
<el-row style="margin-top: 15px;margin-bottom: 10px">
<el-col :offset="2" :span="20">附件:
<el-col :offset="2" :span="20">{{ $t('test_track.case.attachment') }}:
<el-upload
accept=".jpg,.jpeg,.png,.xlsx,.doc,.pdf,.docx"
action=""
@ -223,7 +223,7 @@
:limit="8"
:file-list="fileList">
<el-button icon="el-icon-plus" size="mini"></el-button>
<span slot="tip" class="el-upload__tip"> 只能上传jpgjpegpngdocxdocpdfxlsx文件 </span>
<span slot="tip" class="el-upload__tip"> {{ $t('test_track.case.upload_tip') }} </span>
</el-upload>
</el-col>
</el-row>

View File

@ -1,7 +1,7 @@
<template>
<el-dialog :visible.sync="dialogVisible" width="80%" :destroy-on-close="true" :before-close="close">
<div>
<img :src="'/test/case/file/preview/' + file.id" alt="图片显示异常" style="width: 100%;height: 100%;"
<img :src="'/test/case/file/preview/' + file.id" :alt="$t('test_track.case.img_loading_fail')" style="width: 100%;height: 100%;"
v-if="file.type === 'JPG' || file.type === 'JPEG' || file.type === 'PNG'">
<div v-if="file.type === 'PDF'">
<test-case-pdf :file-id="file.id"/>

View File

@ -27,7 +27,7 @@ export default {
this.loading = false;
}).catch(() => {
this.loading = false;
this.$error("pdf 加载失败");
this.$error(this.$t('test_track.case.pdf_loading_fail'));
})
}
}

View File

@ -742,6 +742,10 @@ export default {
status_pass: 'Pass',
status_un_pass: 'UnPass',
cancel_relevance_project: "Disassociating the project will also cancel the associated test cases under the project",
img_loading_fail: "Image failed to load",
pdf_loading_fail: "PDF loading failed",
upload_tip: "Only jpg, jpeg, png, docx, doc, pdf, xlsx files can be uploaded",
attachment: "Attachment",
import: {
import: "Import test case",
case_import: "Import test case",

View File

@ -746,6 +746,10 @@ export default {
status_pass: '通过',
status_un_pass: '未通过',
cancel_relevance_project: "取消项目关联会同时取消该项目下已关联的测试用例",
img_loading_fail: "图片加载失败",
pdf_loading_fail: "PDF加载失败",
upload_tip: "只能上传jpg、jpeg、png、docx、doc、pdf、xlsx文件",
attachment: "附件",
import: {
import: "导入用例",
case_import: "导入测试用例",

View File

@ -746,6 +746,10 @@ export default {
status_pass: '通過',
status_un_pass: '未通過',
cancel_relevance_project: "取消項目關聯會同時取消該項目下已關聯的測試用例",
img_loading_fail: "圖片加載失敗",
pdf_loading_fail: "PDF加載失敗",
upload_tip: "只能上傳jpg、jpeg、png、docx、doc、pdf、xlsx文件",
attachment: "附件",
import: {
import: "導入用例",
case_import: "導入測試用例",