Skip to content

Commit

Permalink
Perfect translation / 完善翻译
Browse files Browse the repository at this point in the history
  • Loading branch information
star7th committed Apr 28, 2021
1 parent 72fc6b9 commit 3908fb0
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
26 changes: 17 additions & 9 deletions server/Application/Api/Controller/ItemVariableController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@ public function save(){
if(!$this->checkItemPermn($uid , $item_id)){
$this->sendError(10303);
return ;
}
$data = array() ;
$data['var_name'] = $var_name ;
$data['uid'] = $uid ;
$data['env_id'] = $env_id ;
$data['var_value'] = $var_value ;
$data['item_id'] = $item_id ;
$data['addtime'] = time() ;
}

$id = 0 ;
$res = D("ItemVariable")->where(" item_id = '{$item_id}' and env_id = '{$env_id}' and var_name = '%s' " ,array($var_name) )->find() ;
if($res){
$id = $res['id'] ;
D("ItemVariable")->where(" id = '{$id}' ")->save(array("var_value"=>$var_value));
}else{
$data = array() ;
$data['var_name'] = $var_name ;
$data['uid'] = $uid ;
$data['var_value'] = $var_value ;
$data['item_id'] = $item_id ;
$data['env_id'] = $env_id ;
$data['addtime'] = time() ;
$id = D("ItemVariable")->add($data);
}

$id = D("ItemVariable")->add($data);

if (!$id) {
$this->sendError(10101);
Expand Down
3 changes: 1 addition & 2 deletions web_src/src/components/admin/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ body > .el-container {
.header_title {
float: left;
padding-right: 35px;
padding-left: 25px;
width: 150px;
font-size: 20px;
background-color: rgb(84, 92, 100);
color: #fff;
Expand Down
2 changes: 1 addition & 1 deletion web_src/src/components/admin/attachment/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<el-button @click="onSubmit">{{ $t('search') }}</el-button>
</el-form-item>
</el-form>
<P>累计已使用 {{ used }}M 空间</P>
<P>{{ $t('used_space') }} {{ used }}M</P>
<el-table :data="dataList" style="width: 100%">
<el-table-column prop="file_id" :label="$t('file_id')"></el-table-column>
<el-table-column
Expand Down
2 changes: 1 addition & 1 deletion web_src/src/components/admin/user/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="hello">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label>
<el-input v-model="username" placeholder="用户名"></el-input>
<el-input v-model="username" :placeholder="$t('username')"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="onSubmit">{{ $t('search') }}</el-button>
Expand Down
4 changes: 3 additions & 1 deletion web_src/static/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ exports.default = {
copy_or_mv_cat: 'Copy or move catalog',
copy_to: 'Copy To',
move_to: 'Move To',
remark: 'remark'
remark: 'remark',

used_space: 'Used pace'

}
4 changes: 3 additions & 1 deletion web_src/static/lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,5 +411,7 @@ exports.default = {
copy_or_mv_cat: '复制或移动目录',
copy_to: '复制到',
move_to: '移动到',
remark: '备注'
remark: '备注',

used_space: '已使用空间'
}

0 comments on commit 3908fb0

Please sign in to comment.