Browse Source

国际化信息提交。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.8.2^2
zouap 3 years ago
parent
commit
85f37b4e9b
5 changed files with 104 additions and 39 deletions
  1. +38
    -0
      options/locale/locale_en-US.ini
  2. +29
    -1
      options/locale/locale_zh-CN.ini
  3. +26
    -27
      templates/repo/modelmanage/convertIndex.tmpl
  4. +9
    -9
      templates/repo/modelmanage/index.tmpl
  5. +2
    -2
      templates/repo/modelmanage/showinfo.tmpl

+ 38
- 0
options/locale/locale_en-US.ini View File

@@ -1243,6 +1243,44 @@ model.convert=Model Transformation
model.list=Model List
model.manage.create_new_convert_task=Create Model Transformation Task

model.manage.notcreatemodel=No model has been created.
model.manage.init1=Code version: You have not initialized the code repository, please
model.manage.init2=initialized first ;
model.manage.createtrainjob_tip=Training task: you haven't created a training task, please create it first
model.manage.createtrainjob=Training task
model.manage.delete=Delete Model
model.manage.delete_confirm=Are you sure to delete this model? Once this model is deleted, it cannot be restored.
model.manage.select.trainjob=Select train task
model.manage.select.version=Select version
model.manage.engine=Model engine
model.manage.select.engine=Select model engine
model.manage.modelfile=Model file
model.manage.modellabel=Model label
model.manage.modeldesc=Model description
model.manage.baseinfo=Base Information
modelconvert.notcreate=No model conversion task has been created.
modelconvert.importfirst1=Please import first
modelconvert.importfirst2=download model
modelconvert.importfirst3=, then converts it.
modelconvert.download=Download
modelconvert.taskname=Task name
modelconvert.modelname=Model name
modelconvert.selectmodel=Select model
modelconvert.modelversion=Model version
modelconvert.selectversion=Select version
modelconvert.selectmodelfile=Select model file
modelconvert.taskstatus=Status
modelconvert.srcengine=Source model engine
modelconvert.outputformat=Output format
modelconvert.createtime=Created time
modelconvert.inputdataformat=Input data format
modelconvert.inputshape=Input tensor shape
modelconvert.inputshapetip=For example: 1,1,32,32, corresponding to the input data format.
modelconvert.netoutputdata=Network output data type
modelconvert.taskdesc=Task description
modelconvert.newtask=New
modelconvert.createtask=Create model conversion task

modelconvert.manage.create_error1=A model transformation task with the same name already exists.
modelconvert.manage.create_error2=Only one running model transformation task can be created.
modelconvert.manage.model_not_exist=The model does not exist.


+ 29
- 1
options/locale/locale_zh-CN.ini View File

@@ -1263,8 +1263,36 @@ model.manage.createtrainjob_tip=训练任务:您还没创建过训练任务,
model.manage.createtrainjob=训练任务
model.manage.delete=删除模型
model.manage.delete_confirm=你确认删除该模型么?此模型一旦删除不可恢复。

model.manage.select.trainjob=选择训练任务
model.manage.select.version=选择版本
model.manage.engine=模型框架
model.manage.select.engine=选择模型框架
model.manage.modelfile=模型文件
model.manage.modellabel=模型标签
model.manage.modeldesc=模型描述
model.manage.baseinfo=基本信息
modelconvert.notcreate=未创建过模型转换任务
modelconvert.importfirst1=请您先导入
modelconvert.importfirst2=模型下载
modelconvert.importfirst3=,然后再对其进行转换。
modelconvert.download=下载
modelconvert.taskname=任务名称
modelconvert.modelname=模型名称
modelconvert.selectmodel=选择模型
modelconvert.modelversion=模型版本
modelconvert.selectversion=选择版本
modelconvert.selectmodelfile=选择模型文件
modelconvert.taskstatus=状态
modelconvert.srcengine=原模型框架
modelconvert.outputformat=转换后格式
modelconvert.createtime=创建时间
modelconvert.inputdataformat=输入数据格式
modelconvert.inputshape=输入张量形状
modelconvert.inputshapetip=如:1,1,32,32,与输入数据格式对应。
modelconvert.netoutputdata=网络输出数据类型
modelconvert.taskdesc=任务描述
modelconvert.newtask=新建任务
modelconvert.createtask=创建模型转换任务

modelconvert.manage.create_error1=相同的名称模型转换任务已经存在。
modelconvert.manage.create_error2=只能创建一个正在运行的模型转换任务。


+ 26
- 27
templates/repo/modelmanage/convertIndex.tmpl View File

@@ -47,13 +47,12 @@
{{if eq .MODEL_CONVERT_COUNT 0}}
<div class="ui placeholder segment bgtask-none">
<div class="ui icon header bgtask-header-pic"></div>
<div class="bgtask-content-header">未创建过模型转换任务</div>
<div class="bgtask-content-header">{{$.i18n.Tr "repo.modelconvert.notcreate"}}</div>
<div class="bgtask-content">
{{if eq .MODEL_COUNT 0}}
<div class="bgtask-content-txt">请您先导入<a href="{{.RepoLink}}/modelmanage/show_model">模型</a>,然后再对其进行转换。</div>
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.modelconvert.importfirst1"}}<a href="{{.RepoLink}}/modelmanage/show_model">{{$.i18n.Tr "repo.modelconvert.importfirst2"}}</a>{{$.i18n.Tr "repo.modelconvert.importfirst3"}}</div>
{{end}}
<div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a
href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div>
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions"}}</div>

</div>
</div>
@@ -68,19 +67,19 @@
<div class="ui grid stackable" style="background: #f0f0f0;;">
<div class="row">
<div class="three wide column padding0">
<span style="margin:0 6px">任务名称</span>
<span style="margin:0 6px">{{$.i18n.Tr "repo.modelconvert.taskname"}}</span>
</div>
<div class="two wide column text center padding0">
<span>状态</span>
<span>{{$.i18n.Tr "repo.modelconvert.taskstatus"}}</span>
</div>
<div class="two wide column text center padding0">
<span>原模型框架</span>
<span>{{$.i18n.Tr "repo.modelconvert.srcengine"}}</span>
</div>
<div class="two wide column text center padding0">
<span>转换后格式</span>
<span>{{$.i18n.Tr "repo.modelconvert.outputformat"}}</span>
</div>
<div class="two wide column text center padding0">
<span>创建时间</span>
<span>{{$.i18n.Tr "repo.modelconvert.createtime"}}</span>
</div>
<div class="one wide column text center padding0">
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span>
@@ -143,10 +142,10 @@

{{if .IsCanOper}}
<a id="ai-download-{{.ID}}" href="{{$.Repository.HTMLURL}}/modelmanage/download_model_convert/{{.ID}}?AllDownload=true&a=1" class='ui basic {{if eq .Status "SUCCEEDED" "COMPLETED"}}blue {{else}}disabled {{end}}button' style="border-radius: .28571429rem;">
下载
{{$.i18n.Tr "repo.modelconvert.download"}}
</a>
{{else}}
<a class="ui basic disabled button">下载</a>
<a class="ui basic disabled button">{{$.i18n.Tr "repo.modelconvert.download"}}</a>
{{end}}
</div>
</div>
@@ -211,7 +210,7 @@
<input type="hidden" name="_csrf" value="">
<div class="unite min_title required inline fields" id="task_name">
<div class="three wide field right aligned">
<label for="model_convert_name">任务名称</label>
<label for="model_convert_name">{{$.i18n.Tr "repo.modelconvert.taskname"}}</label>
</div>
<div class="twelve wide field">
<input id="model_convert_name" name="model_convert_name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
@@ -219,10 +218,10 @@
</div>
<div class="unite min_title inline fields required">
<div class="three wide field right aligned">
<label for="choice_model">模型名称</label>
<label for="choice_model">{{$.i18n.Tr "repo.modelconvert.modelname"}}</label>
</div>
<div class="ui dropdown selection search eight wide field loading" id="choice_model" name="choice_model">
<div class="default text">选择模型</div>
<div class="default text">{{$.i18n.Tr "repo.modelconvert.selectmodel"}}</div>
<i class="dropdown icon"></i>
<div class="menu" id="model-name">
</div>
@@ -230,12 +229,12 @@
</div>
<div class="unite min_title inline fields required">
<div class="three wide field right aligned">
<label for="choice_version">模型版本</label>
<label for="choice_version">{{$.i18n.Tr "repo.modelconvert.modelversion"}}</label>
</div>
<div class="ui dropdown selection search eight wide field" id="choice_version">
<input type="hidden" id="ModelVersion" name="ModelVersion" required>
<div class="default text">选择版本</div>
<div class="default text">{{$.i18n.Tr "repo.modelconvert.selectversion"}}</div>
<i class="dropdown icon"></i>
<div class="menu" id="model-version">

@@ -244,11 +243,11 @@
</div>
<div class="unite min_title inline fields required">
<div class="three wide field right aligned">
<label for="choice_file">模型文件</label>
<label for="choice_file">{{$.i18n.Tr "repo.model.manage.modelfile"}}</label>
</div>
<div class="ui dropdown selection search eight wide field" id="choice_file">
<input type="hidden" id="ModelFile" name="ModelFile" required>
<div class="default text">选择模型文件</div>
<div class="default text">{{$.i18n.Tr "repo.modelconvert.selectmodelfile"}}</div>
<i class="dropdown icon"></i>
<div class="menu" id="model-file">

@@ -261,7 +260,7 @@
</div>
<div class="unite min_title inline fields required">
<div class="three wide field right aligned">
<label for="SrcEngine">原模型框架</label>
<label for="SrcEngine">{{$.i18n.Tr "repo.modelconvert.srcengine"}}</label>
</div>
<select id="SrcEngine" class="ui search dropdown eight wide field" placeholder="" style='color:#000000;' name="SrcEngine" onchange="javascript:srcEngineChanged()">
@@ -270,7 +269,7 @@
</div>
<div class="unite min_title required inline fields" id="inputdataformat_div">
<div class="three wide field right aligned">
<label for="inputdataformat">输入数据格式</label>
<label for="inputdataformat">{{$.i18n.Tr "repo.modelconvert.inputdataformat"}}</label>
</div>
<select id="inputdataformat" class="ui search dropdown eight wide field" placeholder="" style='width:50%' name="inputdataformat">
@@ -281,16 +280,16 @@
</div>
<div class="unite min_title required inline fields" id="inputshape_div">
<div class="three wide field right aligned">
<label for="inputshape">输入张量形状</label>
<label for="inputshape">{{$.i18n.Tr "repo.modelconvert.inputshape"}}</label>
</div>
<div class="eight wide field">
<input id="inputshape" name="inputshape" placeholder="如:1,1,32,32,与输入数据格式对应。" required maxlength="25">
<input id="inputshape" name="inputshape" placeholder="{{$.i18n.Tr "repo.modelconvert.inputshapetip"}}" required maxlength="25">
</div>
</div>
<div class="unite min_title inline fields required">
<div class="three wide field right aligned">
<label for="DestFormat">转换后格式</label>
<label for="DestFormat">{{$.i18n.Tr "repo.modelconvert.outputformat"}}</label>
</div>
<select id="DestFormat" class="ui search dropdown eight wide field" placeholder="" style='width:50%' name="DestFormat">
@@ -300,7 +299,7 @@
</div>
<div class="unite min_title inline fields">
<div class="three wide field right aligned">
<label for="NetOutputFormat">网络输出数据类型&nbsp;&nbsp;</label>
<label for="NetOutputFormat">{{$.i18n.Tr "repo.modelconvert.netoutputdata"}}&nbsp;&nbsp;</label>
</div>
<select id="NetOutputFormat" class="ui search dropdown eight wide field" placeholder="" style='width:50%' name="NetOutputFormat">
@@ -310,7 +309,7 @@
</div>
<div class="unite min_title inline fields">
<div class="three wide field right aligned">
<label for="Description">任务描述&nbsp;&nbsp;</label>
<label for="Description">{{$.i18n.Tr "repo.modelconvert.taskdesc"}}&nbsp;&nbsp;</label>
</div>
<div class="twelve wide field">
<textarea id="Description" name="Description" rows="1" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea>
@@ -318,7 +317,7 @@
</div>
<div class="unite min_title inline field">
<button id="submitId" name="submitId" type="button" class="ui create_train_job green button" style="position: absolute;margin-left: 150px;">
新建任务
{{$.i18n.Tr "repo.modelconvert.newtask"}}
</button>
</div>
</div>
@@ -411,7 +410,7 @@
.modal({
centered: false,
onShow:function(){
$('#model_header').text("创建模型转换任务")
$('#model_header').text("{{.i18n.Tr "repo.modelconvert.createtask"}}")
$('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"})
createModelName()
loadModelList()


+ 9
- 9
templates/repo/modelmanage/index.tmpl View File

@@ -148,11 +148,11 @@
<div class="menu" id="job-name">
</div>
</div>
<label for="VersionName">版本</label>
<label for="VersionName">{{.i18n.Tr "repo.model.manage.version"}}</label>
<span>&nbsp;</span>
<div class="ui dropdown selection search" id="choice_version">
<input type="hidden" id="VersionName" name="VersionName" required>
<div class="default text">选择版本</div>
<div class="default text">{{.i18n.Tr "repo.model.manage.select.version"}}</div>
<i class="dropdown icon"></i>
<div class="menu" id="job-version">

@@ -162,7 +162,7 @@
</div>
<div class="required inline fields" id="modelname">
<div class="two wide field right aligned">
<label for="Name">模型名称</label>
<label for="Name">{{.i18n.Tr "repo.model.manage.model_name"}}</label>
</div>
<div class="eight wide field">
<input id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
@@ -170,7 +170,7 @@
</div>
<div class="required inline fields" id="verionname">
<div class="two wide field right aligned">
<label for="Version">模型版本</label>
<label for="Version">{{.i18n.Tr "repo.model.manage.version"}}</label>
</div>
<div class="eight wide field">
<input id="version" name="Version" value="" readonly required maxlength="255">
@@ -179,11 +179,11 @@

<div class="unite min_title inline fields required">
<div class="two wide field right aligned">
<label for="Engine">模型框架</label>
<label for="Engine">{{.i18n.Tr "repo.model.manage.engine"}}</label>
</div>
<div class="ui ten wide field dropdown selection search" id="choice_Engine">
<input type="hidden" id="Engine" name="Engine" required>
<div class="default text newtext">选择模型框架</div>
<div class="default text newtext">{{.i18n.Tr "repo.model.manage.select.engine"}}</div>
<i class="dropdown icon"></i>
<div class="menu" id="job-Engine">

@@ -194,7 +194,7 @@

<div class="unite min_title inline fields required">
<div class="two wide field right aligned">
<label for="modelSelectedFile">模型文件</label>
<label for="modelSelectedFile">{{.i18n.Tr "repo.model.manage.modelfile"}}</label>
</div>
<div class="thirteen wide field" style="position:relative">
<input id="modelSelectedFile" type="text" readonly required onclick="showMenu();" name="modelSelectedFile" >
@@ -206,7 +206,7 @@

<div class="inline fields">
<div class="two wide field right aligned">
<label for="Label">模型标签 &nbsp</label>
<label for="Label">{{.i18n.Tr "repo.model.manage.modellabel"}} &nbsp</label>
</div>
<div class="thirteen wide field">
<input id="label" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'>
@@ -214,7 +214,7 @@
</div>
<div class="inline fields">
<div class="two wide field right aligned">
<label for="description">模型描述 &nbsp</label>
<label for="description">{{.i18n.Tr "repo.model.manage.modeldesc"}} &nbsp</label>
</div>
<div class="thirteen wide field">
<textarea id="Description" name="Description" rows="3"


+ 2
- 2
templates/repo/modelmanage/showinfo.tmpl View File

@@ -86,7 +86,7 @@
</div>
<div class="ui tab active" data-tab="first">
<div class="half-table">
<span class="model_header_text">基本信息</span>
<span class="model_header_text">{{$.i18n.Tr "repo.model.manage.baseinfo"}}</span>
<table class="tableStyle" style="margin-top:20px;">
<tbody>
<tr>
@@ -125,7 +125,7 @@
</td>
</tr>
<tr>
<td class="ti-text-form-label text-width80">训练任务</td>
<td class="ti-text-form-label text-width80">{{$.i18n.Tr "repo.model.manage.createtrainjob"}}</td>
<td class="ti-text-form-content word-elipsis">
<a id="DisplayJobNameHref" class="title" style="font-size: 14px;" target="_blank">
<span id="DisplayJobName" class="fitted" style="width: 90%;vertical-align: middle;"></span>


Loading…
Cancel
Save