updated Multi Language for a few pages

This commit is contained in:
Marvin Zhang
2019-03-27 12:35:22 +08:00
parent 3af510a417
commit d44e5d2518
13 changed files with 118 additions and 75 deletions

View File

@@ -3,8 +3,8 @@
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noredirect'||index==levelList.length-1"
class="no-redirect">{{ item.meta.title }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
class="no-redirect">{{$t(item.meta.title) }}</span>
<a v-else @click.prevent="handleLink(item)">{{ $t(item.meta.title) }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>

View File

@@ -51,7 +51,7 @@ export default {
if (valid) {
this.$store.dispatch('node/editNode')
.then(() => {
this.$message.success('Node has been saved successfully')
this.$message.success(this.$t('Node info has been saved successfully'))
})
}
})

View File

@@ -116,14 +116,14 @@ export default {
const row = this.spiderForm
this.$refs['spiderForm'].validate(res => {
if (res) {
this.$confirm('Are you sure to run this spider?', 'Notice', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel'
this.$confirm(this.$t('Are you sure to run this spider?'), this.$t('Notification'), {
confirmButtonText: this.$t('Confirm'),
cancelButtonText: this.$t('Cancel')
})
.then(() => {
this.$store.dispatch('spider/crawlSpider', row._id)
.then(() => {
this.$message.success(`Running spider "${row._id}" has been scheduled`)
this.$message.success(this.$t(`Spider task has been scheduled`))
})
})
}
@@ -133,14 +133,14 @@ export default {
const row = this.spiderForm
this.$refs['spiderForm'].validate(res => {
if (res) {
this.$confirm('Are you sure to deploy this spider?', 'Notice', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel'
this.$confirm(this.$t('Are you sure to deploy this spider?'), this.$t('Notification'), {
confirmButtonText: this.$t('Confirm'),
cancelButtonText: this.$t('Cancel')
})
.then(() => {
this.$store.dispatch('spider/deploySpider', row._id)
.then(() => {
this.$message.success(`Spider "${row._id}" has been deployed`)
this.$message.success(this.$t(`Spider has been deployed`))
})
})
}
@@ -151,7 +151,7 @@ export default {
if (res) {
this.$store.dispatch('spider/editSpider')
.then(() => {
this.$message.success('Spider info has been saved successfully')
this.$message.success(this.$t('Spider info has been saved successfully'))
})
.catch(error => {
this.$message.error(error)

View File

@@ -3,12 +3,12 @@
<el-col :span="12">
<!--last tasks-->
<el-row>
<task-table-view title="Latest Tasks"/>
<task-table-view :title="$t('Latest Tasks')"/>
</el-row>
<!--last deploys-->
<el-row v-if="false">
<deploy-table-view title="Latest Deploys"/>
<deploy-table-view :title="$t('Latest Deploys')"/>
</el-row>
</el-col>