更新国际化配置

master
pan 4 years ago
parent 44f87a712a
commit 318d0b4c1a
  1. 4
      components/account/login.vue
  2. 6
      components/account/register.vue
  3. 12
      components/center/security.vue
  4. 44
      nuxt.config.js
  5. 37
      pages/index/document.vue
  6. 12
      pages/index/upload.vue

@ -1,10 +1,10 @@
<template> <template>
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item :label="$t('account.form.user')"> <el-form-item :label="$t('account.form.user')">
<el-input v-model="form.user" :placeholder="$t('account.form.input_user',{user:$t('account.form.user')})"></el-input> <el-input v-model="form.user" :placeholder="$t('input_please',{keyword:$t('account.form.user')})"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('account.form.password')"> <el-form-item :label="$t('account.form.password')">
<el-input v-model="form.password" type="password" :placeholder="$t('account.form.input_password',{password:$t('account.form.password')})"></el-input> <el-input v-model="form.password" type="password" :placeholder="$t('input_please',{keyword:$t('account.form.password')})"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onLogin(form.user,form.password)">{{$t('account.login')}}</el-button> <el-button type="primary" @click="onLogin(form.user,form.password)">{{$t('account.login')}}</el-button>

@ -1,13 +1,13 @@
<template> <template>
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item :label="$t('account.form.user')"> <el-form-item :label="$t('account.form.user')">
<el-input v-model="form.user" :placeholder="$t('account.form.input_user',{user:$t('account.form.user')})"></el-input> <el-input v-model="form.user" :placeholder="$t('input_please',{keyword:$t('account.form.user')})"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('account.form.password')"> <el-form-item :label="$t('account.form.password')">
<el-input v-model="form.password" type="password" :placeholder="$t('account.form.input_password',{password:$t('account.form.password')})"></el-input> <el-input v-model="form.password" type="password" :placeholder="$t('input_please',{keyword:$t('account.form.password')})"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('account.form.confirmPwd')"> <el-form-item :label="$t('account.form.confirmPwd')">
<el-input v-model="form.confirmPwd" type="password" :placeholder="$t('account.form.input_password',{password:$t('account.form.password')})"></el-input> <el-input v-model="form.confirmPwd" type="password" :placeholder="$t('input_confirm',{keyword:$t('account.form.password')})"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onRegister(form.user,form.password)">{{$t('account.register')}}</el-button> <el-button type="primary" @click="onRegister(form.user,form.password)">{{$t('account.register')}}</el-button>

@ -3,19 +3,19 @@
<el-form-item :label="$t('center.security.oldpwd')" prop="oldpwd"> <el-form-item :label="$t('center.security.oldpwd')" prop="oldpwd">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.oldpwd" show-password type="password" <el-input v-model="form.oldpwd" show-password type="password"
:placeholder="$t('center.security.input_oldpwd',{oldpwd:$t('center.security.oldpwd')})"/> :placeholder="$t('input_please',{keyword:$t('center.security.oldpwd')})"/>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('center.security.newpwd')" prop="newpwd"> <el-form-item :label="$t('center.security.newpwd')" prop="newpwd">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.newpwd" show-password type="password" <el-input v-model="form.newpwd" show-password type="password"
:placeholder="$t('center.security.input_newpwd',{newpwd:$t('center.security.newpwd')})"/> :placeholder="$t('input_please',{keyword:$t('center.security.newpwd')})"/>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('center.security.confirmpwd')" prop="confirmpwd"> <el-form-item :label="$t('center.security.confirmpwd')" prop="confirmpwd">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.confirmpwd" show-password type="password" <el-input v-model="form.confirmpwd" show-password type="password"
:placeholder="$t('center.security.input_confirmpwd',{newpwd:$t('center.security.newpwd')})"/> :placeholder="$t('input_confirm',{keyword:$t('center.security.newpwd')})"/>
</el-col> </el-col>
</el-form-item> </el-form-item>
@ -41,7 +41,7 @@
oldpwd: [ oldpwd: [
{ {
required: true, required: true,
message: this.$t('center.security.input_oldpwd', { oldpwd: this.$t('center.security.oldpwd') }), message: this.$t('input_please', { keyword: this.$t('center.security.oldpwd') }),
trigger: 'blur' trigger: 'blur'
}, },
{ min: 3, max: 5, message: this.$t('center.security.rules.password',{min:3,max:5}), trigger: 'blur' } { min: 3, max: 5, message: this.$t('center.security.rules.password',{min:3,max:5}), trigger: 'blur' }
@ -49,7 +49,7 @@
newpwd: [ newpwd: [
{ {
required: true, required: true,
message: this.$t('center.security.input_newpwd', { newpwd: this.$t('center.security.newpwd') }), message: this.$t('input_please', { keyword: this.$t('center.security.newpwd') }),
trigger: 'blur' trigger: 'blur'
}, },
{ min: 3, max: 5, message: this.$t('center.security.rules.password',{min:3,max:5}), trigger: 'blur' } { min: 3, max: 5, message: this.$t('center.security.rules.password',{min:3,max:5}), trigger: 'blur' }
@ -57,7 +57,7 @@
confirmpwd: [ confirmpwd: [
{ {
required: true, required: true,
message: this.$t('center.security.input_confirmpwd', { newpwd: this.$t('center.security.newpwd') }), message: this.$t('input_confirm', { keyword: this.$t('center.security.newpwd') }),
trigger: 'blur' trigger: 'blur'
}, },
{ min: 3, max: 5, message: this.$t('center.security.rules.password',{min:3,max:5}), trigger: 'blur' } { min: 3, max: 5, message: this.$t('center.security.rules.password',{min:3,max:5}), trigger: 'blur' }

@ -89,9 +89,6 @@ export default {
"account": { "account": {
"form": { "form": {
"confirmPwd": "确认密码", "confirmPwd": "确认密码",
"input_confirmPwd": "请确认{confirmPwd}",
"input_password": "请输入{password}",
"input_user": "请输入{user}",
"password": "密码", "password": "密码",
"user": "帐号", "user": "帐号",
"valid_account": "帐号密码正确" "valid_account": "帐号密码正确"
@ -125,9 +122,6 @@ export default {
}, },
"security": { "security": {
"confirmpwd": "确认新密码", "confirmpwd": "确认新密码",
"input_confirmpwd": "请确认{newpwd}",
"input_newpwd": "请输入{newpwd}",
"input_oldpwd": "请输入{oldpwd}",
"name": "帐号安全", "name": "帐号安全",
"newpwd": "新密码", "newpwd": "新密码",
"oldpwd": "原密码", "oldpwd": "原密码",
@ -140,9 +134,19 @@ export default {
} }
}, },
"choose_lang": "选择语言", "choose_lang": "选择语言",
"document": {
"form": {
"author": "作者",
"keyword": "关键词",
"specialty": "学科专业",
"title": "标题"
}
},
"en": "英文", "en": "英文",
"error_404": "页面不存在", "error_404": "页面不存在",
"error_500": "发生严重异常,请联系管理员", "error_500": "发生严重异常,请联系管理员",
"input_confirm": "请确认{keyword}",
"input_please": "请输入{keyword}",
"logout": "注销登录", "logout": "注销登录",
"menus": { "menus": {
"center": "个人中心", "center": "个人中心",
@ -165,12 +169,6 @@ export default {
"form": { "form": {
"author": "论文作者", "author": "论文作者",
"content": "论文", "content": "论文",
"input_author": "请输入{author}",
"input_profession": "请输入{profession}",
"input_school": "请输入{school}",
"input_summary": "请输入{summary}",
"input_type": "请输入{type}",
"input_year": "请输入{year}",
"profession": "学科专业", "profession": "学科专业",
"remove": "确定移除{file}", "remove": "确定移除{file}",
"school": "学校", "school": "学校",
@ -192,9 +190,6 @@ export default {
"account": { "account": {
"form": { "form": {
"confirmPwd": "确认密码", "confirmPwd": "确认密码",
"input_confirmPwd": "请确认{confirmPwd}",
"input_password": "请输入{password}",
"input_user": "请输入{user}",
"password": "密码", "password": "密码",
"user": "帐号", "user": "帐号",
"valid_account": "帐号密码正确" "valid_account": "帐号密码正确"
@ -228,9 +223,6 @@ export default {
}, },
"security": { "security": {
"confirmpwd": "", "confirmpwd": "",
"input_confirmpwd": "",
"input_newpwd": "",
"input_oldpwd": "",
"name": "帐号安全", "name": "帐号安全",
"newpwd": "", "newpwd": "",
"oldpwd": "", "oldpwd": "",
@ -243,9 +235,19 @@ export default {
} }
}, },
"choose_lang": "language", "choose_lang": "language",
"document": {
"form": {
"author": "",
"keyword": "",
"specialty": "",
"title": ""
}
},
"en": "english", "en": "english",
"error_404": "页面不存在", "error_404": "页面不存在",
"error_500": "发生严重异常,请联系管理员", "error_500": "发生严重异常,请联系管理员",
"input_confirm": "",
"input_please": "",
"logout": "注销登录", "logout": "注销登录",
"menus": { "menus": {
"center": "个人中心", "center": "个人中心",
@ -268,12 +270,6 @@ export default {
"form": { "form": {
"author": "论文作者", "author": "论文作者",
"content": "论文", "content": "论文",
"input_author": "请输入{author}",
"input_profession": "请输入{profession}",
"input_school": "请输入{school}",
"input_summary": "请输入{summary}",
"input_type": "请输入{type}",
"input_year": "请输入{year}",
"profession": "学科专业", "profession": "学科专业",
"remove": "确定移除{file}", "remove": "确定移除{file}",
"school": "学校", "school": "学校",

@ -1,11 +1,44 @@
<template> <template>
<h1>文档</h1> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('document.form.title')" prop="title">
<el-col :span="4">
<el-input v-model="form.title" :placeholder="$t('input_please',{keyword:$t('document.form.title')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('document.form.author')" prop="author">
<el-col :span="4">
<el-input v-model="form.author" :placeholder="$t('input_please',{keyword:$t('document.form.author')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('document.form.keyword')" prop="keyword">
<el-col :span="4">
<el-input v-model="form.keyword" :placeholder="$t('input_please',{keyword:$t('document.form.keyword')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('document.form.specialty')" prop="specialty">
<el-col :span="4">
<el-input v-model="form.specialty" :placeholder="$t('input_please',{keyword:$t('document.form.specialty')})"/>
</el-col>
</el-form-item>
</el-form>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from 'vue'
export default Vue.extend({ export default Vue.extend({
name: 'document' name: 'document',
data(){
return {
form:{
title:'',
author:'',
keyword:'',
specialty:''
},
rules:{}
}
}
}) })
</script> </script>

@ -1,37 +1,37 @@
<template> <template>
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item :label="$t('upload.form.type')"> <el-form-item :label="$t('upload.form.type')">
<el-select v-model="form.type" :placeholder="$t('upload.form.input_type',{type:$t('upload.form.type')})"> <el-select v-model="form.type" :placeholder="$t('input_please',{type:$t('upload.form.type')})">
<el-option v-for="item in options" :key="item.value" :value="item.value">{{item.label}}</el-option> <el-option v-for="item in options" :key="item.value" :value="item.value">{{item.label}}</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('upload.form.author')"> <el-form-item :label="$t('upload.form.author')">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.author" <el-input v-model="form.author"
:placeholder="$t('upload.form.input_author',{author:$t('upload.form.author')})"></el-input> :placeholder="$t('input_please',{keyword:$t('upload.form.author')})"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('upload.form.profession')"> <el-form-item :label="$t('upload.form.profession')">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.profession" <el-input v-model="form.profession"
:placeholder="$t('upload.form.input_profession',{profession:$t('upload.form.profession')})"></el-input> :placeholder="$t('input_please',{keyword:$t('upload.form.profession')})"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('upload.form.school')"> <el-form-item :label="$t('upload.form.school')">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.school" <el-input v-model="form.school"
:placeholder="$t('upload.form.input_school',{school:$t('upload.form.school')})"></el-input> :placeholder="$t('input_please',{keyword:$t('upload.form.school')})"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('upload.form.year')"> <el-form-item :label="$t('upload.form.year')">
<el-select v-model="form.year" :placeholder="$t('upload.form.input_year',{year:$t('upload.form.year')})"> <el-select v-model="form.year" :placeholder="$t('input_please',{keyword:$t('upload.form.year')})">
<el-option v-for="n in 10" :key="n" :value="2019-n">{{2019-n}}</el-option> <el-option v-for="n in 10" :key="n" :value="2019-n">{{2019-n}}</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('upload.form.summary')"> <el-form-item :label="$t('upload.form.summary')">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.summary" type="textarea" <el-input v-model="form.summary" type="textarea"
:placeholder="$t('upload.form.input_summary',{summary:$t('upload.form.summary')})"></el-input> :placeholder="$t('input_please',{keyword:$t('upload.form.summary')})"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('upload.form.tag')"> <el-form-item :label="$t('upload.form.tag')">

Loading…
Cancel
Save