Browse Source

国际化信息提交。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.8.2^2
zouap 3 years ago
parent
commit
0623874a52
2 changed files with 44 additions and 14 deletions
  1. +20
    -14
      web_src/js/components/Model.vue
  2. +24
    -0
      web_src/js/features/i18nVue.js

+ 20
- 14
web_src/js/components/Model.vue View File

@@ -14,7 +14,7 @@
>
<el-table-column
prop="Name"
label="模型名称"
:label="i18n.model_name"
align="left"
min-width="18%"
>
@@ -28,7 +28,7 @@
</el-table-column>
<el-table-column
prop="Version"
label="版本"
:label="i18n.model_version"
align="center"
min-width="6.5%"
>
@@ -39,7 +39,7 @@
<el-table-column
prop="VersionCount"
label="版本数"
:label="i18n.model_version_num"
align="center"
min-width="7.5%"
>
@@ -50,7 +50,7 @@

<el-table-column
prop="Size"
label="模型大小"
:label="i18n.model_size"
align="center"
min-width="10.5%"
>
@@ -60,7 +60,7 @@
</el-table-column>
<el-table-column
prop="EngineName"
label="模型框架"
:label="i18n.model_egine"
align="center"
min-width="8.5%"
>
@@ -70,7 +70,7 @@
</el-table-column>
<el-table-column
prop="ComputeResource"
label="计算资源"
:label="i18n.model_compute_resource"
align="center"
min-width="10.5%"
>
@@ -80,7 +80,7 @@
</el-table-column>
<el-table-column
prop="CreatedUnix"
label="创建时间"
:label="i18n.model_create_time"
align="center"
min-width="13.75%"
>
@@ -90,7 +90,7 @@
</el-table-column>
<el-table-column
prop="UserName"
label="创建者"
:label="i18n.model_creator"
align="center"
min-width="6.75%"
>
@@ -101,12 +101,12 @@
</template>
</el-table-column>

<el-table-column label="操作" min-width="18%" align="center">
<el-table-column :label="i18n.model_operation" min-width="18%" align="center">
<template slot-scope="scope">
<div class="space-around">
<a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">创建新版本</a>
<a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">下载</a>
<a :class="{'disabled':!scope.row.IsCanDelete}" @click="deleteModel(scope.row.ID,scope.row.cName,scope.row.rowKey)">删除</a>
<a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">{{i18n.model_create_new_ver}}</a>
<a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">{{i18n.model_download}}</a>
<a :class="{'disabled':!scope.row.IsCanDelete}" @click="deleteModel(scope.row.ID,scope.row.cName,scope.row.rowKey)">{{i18n.model_delete}}</a>
</div>
</template>
@@ -141,7 +141,7 @@ export default {
},
data() {
return {
i18n: {},
currentPage:1,
pageSize:10,
totalNum:0,
@@ -451,7 +451,13 @@ export default {
this.url_create_newVersion = this.url + 'create_model'
this.url_create_newModel = this.url + 'create_new_model'
},

created() {
if (document.documentElement.attributes["lang"].nodeValue == "en-US") {
this.i18n = this.$locale.US;
} else {
this.i18n = this.$locale.CN;
}
},
beforeDestroy() { // 实例销毁之前对点击事件进行解绑
this.submitId.removeEventListener('click', this.submit);
}


+ 24
- 0
web_src/js/features/i18nVue.js View File

@@ -83,6 +83,18 @@ export const i18nVue = {
dataset_ok:"确定",
dataset_not_equal_file:"不能选择相同名称的数据文件",
dataset_most:"最多不超过五个文件",
model_name:"模型名称",
model_version:"版本",
model_version_num:"版本数",
model_size:"模型大小",
model_egine:"模型框架",
model_compute_resource:"计算资源",
model_create_time:"创建时间",
model_creator:"创建者",
model_operation:"操作",
model_create_new_ver:"创建新版本",
model_download:"下载",
model_delete:"删除",
},
US: {
computer_vision: "computer vision",
@@ -171,5 +183,17 @@ export const i18nVue = {
dataset_ok:"OK",
dataset_not_equal_file:"Cannot select a data file with the same name.",
dataset_most:"Up to five files.",
model_name:"Model Name",
model_version:"Version",
model_version_num:"Version Nums",
model_size:"Model Size",
model_egine:"Model Engine",
model_compute_resource:"Compute Resource",
model_create_time:"Created Time",
model_creator:"Creator",
model_operation:"Operation",
model_create_new_ver:"Create New Version",
model_download:"Download",
model_delete:"Delete",
},
};

Loading…
Cancel
Save