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

@@ -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)