Skip to content

Commit

Permalink
Update i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Oct 20, 2017
1 parent 9f27409 commit 567e287
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 40 deletions.
Binary file modified screenshots/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/components/InsertDataToRedis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p>{{lang.deleteConfirmYesOrNo}}</p>
</div>
<div slot="footer">
<Button type="error" size="small" long @click="del">删除</Button>
<Button type="error" size="small" long @click="del">{{lang.delete}}</Button>
</div>
</Modal>
<Form :model="insertRedisFormValue" :rules="ruleValidate" ref="insertRedisForm" :label-width="80"
Expand All @@ -32,7 +32,7 @@
<Input v-model="insertRedisFormValue.insertSortedSet"/>
</FormItem>
<FormItem>
<Button @click.native.prevent="submitInsertForm" type="primary" shape="circle">{{lang.save}}</Button>
<Button @click.native.prevent="submitInsertForm" type="primary">{{lang.save}}</Button>
</FormItem>
<Card style="color:red" v-show="showRedisInsertError">
<div style="margin-left: 10px">
Expand All @@ -45,7 +45,7 @@
</template>

<script>
export default{
export default {
data() {
let self = this;
return {
Expand Down Expand Up @@ -94,7 +94,7 @@
* redis插入数据
*
* */
insertRedisData(){
insertRedisData() {
let me = this;
let insertRedisMethod = "";
let redisKey = this.insertRedisFormValue.insertStringKey;
Expand All @@ -113,7 +113,7 @@
insertRedisMethod = me.redis.zadd(redisKey, sortedSet, redisValue);
} else {
me.showRedisInsertError = true;
if (me.lang._lang_name == '简体中文') {
if (me.lang._lang_name === '简体中文') {
me.errorRedisInsertMessage = "Sorted Set必须是整数";
} else {
me.errorRedisInsertMessage = "Sorted Set should be integer";
Expand All @@ -130,7 +130,7 @@
valueJson = JSON.parse(redisValue.toString());
} catch (e) {
me.showRedisInsertError = true;
if (me.lang._lang_name == '简体中文') {
if (me.lang._lang_name === '简体中文') {
me.errorRedisInsertMessage = "Value不是正确的Json格式";
} else {
me.errorRedisInsertMessage = "Value should be Json";
Expand All @@ -152,7 +152,7 @@
}
me.showRedisInsertError = true;
if (result === 0) {
if (me.lang._lang_name == '简体中文') {
if (me.lang._lang_name === '简体中文') {
me.errorRedisInsertMessage = "数据重复";
} else {
me.errorRedisInsertMessage = "duplicate data";
Expand All @@ -169,7 +169,7 @@
*submit data
*
**/
submitInsertForm(){
submitInsertForm() {
let me = this;
me.$refs.insertRedisForm.validate((valid) => {
if (valid) {
Expand All @@ -188,7 +188,7 @@
});
}
},
mounted(){
mounted() {
}
}
</script>
18 changes: 12 additions & 6 deletions src/components/SubContentHash.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.del(key).then(function (result) {
if (result === 1) {
Expand Down Expand Up @@ -138,14 +141,21 @@
show (index) {
this.$Modal.info({
title: this.lang.content_detail,
content: `${this.content[index].context}`
content: `${this.content[index].context}`,
width: 600,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true
})
},
remove (index) {
let self = this;
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.hdel(self.$route.params.key, self.content[index].key).then(function (result) {
console.log(result);
Expand All @@ -171,11 +181,7 @@
'$route': 'doGetContent'
},
mounted:function(){
let self = this;
// self.codemirror = CodeMirror('stringContent', {
// mode: 'javascript',
// lineNumbers: true
// })
}
}
</script>
Expand Down
23 changes: 12 additions & 11 deletions src/components/SubContentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,12 @@
*/
deleteKey(key) {
let self = this;
console.log(global.lang);
console.log(self.$root);
console.log(self.$root.$data);
console.log(self.$parent.$data);
console.log(self.$parent.lang);
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.del(key).then(function (result) {
if (result === 1) {
Expand Down Expand Up @@ -142,13 +140,20 @@
show (index) {
this.$Modal.info({
title: this.lang.content_detail,
content: `${this.content[index].context}`
content: `${this.content[index].context}`,
width: 600,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true
})
},
remove (index) {
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.hdel(self.$route.params.key, self.content[index].key).then(function (result) {
console.log(result);
Expand All @@ -174,11 +179,7 @@
'$route': 'doGetContent'
},
mounted:function(){
let self = this;
// self.codemirror = CodeMirror('stringContent', {
// mode: 'javascript',
// lineNumbers: true
// })
}
}
</script>
Expand Down
18 changes: 12 additions & 6 deletions src/components/SubContentSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.del(key).then(function (result) {
if (result === 1) {
Expand Down Expand Up @@ -128,13 +131,20 @@
show (index) {
this.$Modal.info({
title: this.lang.content_detail,
content: `${this.content[index].context}`
content: `${this.content[index].context}`,
width: 600,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true
})
},
remove (index) {
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.hdel(self.$route.params.key, self.content[index].key).then(function (result) {
console.log(result);
Expand All @@ -160,11 +170,7 @@
'$route': 'doGetContent'
},
mounted:function(){
let self = this;
// self.codemirror = CodeMirror('stringContent', {
// mode: 'javascript',
// lineNumbers: true
// })
}
}
</script>
Expand Down
7 changes: 5 additions & 2 deletions src/components/SubContentString.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@
deleteKey(key) {
let self = this;
this.$Modal.confirm({
title: '删除提示',
content: '确认删除该键值吗?',
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.del(key).then(function (result) {
if (result === 1) {
Expand Down
18 changes: 12 additions & 6 deletions src/components/SubContentZSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
this.$Modal.confirm({
title: this.lang.delete,
content: this.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.del(key).then(function (result) {
if (result === 1) {
Expand Down Expand Up @@ -137,14 +140,21 @@
show (index) {
this.$Modal.info({
title: this.lang.content_detail,
content: `${this.content[index].context}`
content: `${this.content[index].context}`,
width: 600,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true
})
},
remove (index) {
let self = this;
this.$Modal.confirm({
title: self.lang.delete,
content: self.lang.delete_notice,
okText: this.lang.ok,
cancelText: this.lang.cancel,
scrollable: true,
onOk: () => {
self.redis.zrem(self.$route.params.key, self.content[index].context).then(function (result) {
console.log(result);
Expand All @@ -170,11 +180,7 @@
'$route': 'doGetContent'
},
mounted:function(){
let self = this;
// self.codemirror = CodeMirror('stringContent', {
// mode: 'javascript',
// lineNumbers: true
// })
}
}
</script>
Expand Down

0 comments on commit 567e287

Please sign in to comment.