From 79eee1b4b80157b53ad4cac9b93731ae076468fb Mon Sep 17 00:00:00 2001 From: Jose Eduardo Kimura Date: Mon, 23 Jul 2018 23:31:22 -0300 Subject: [PATCH] :zap: improvement(warnings): make warning messages clearer (#396) by @kimuraz --- dist/vue-i18n.js | 6 +++--- src/directive.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/vue-i18n.js b/dist/vue-i18n.js index 9ea7ed766..b127af0e6 100644 --- a/dist/vue-i18n.js +++ b/dist/vue-i18n.js @@ -417,7 +417,7 @@ function unbind (el, binding, vnode, oldVNode) { var vm = vnode.context; if (!vm) { - warn('not exist Vue instance in VNode context'); + warn('Vue instance does not exists in VNode context'); return } @@ -431,12 +431,12 @@ function assert (el, vnode) { var vm = vnode.context; if (!vm) { - warn('not exist Vue instance in VNode context'); + warn('Vue instance does not exists in VNode context'); return false } if (!vm.$i18n) { - warn('not exist VueI18n instance in Vue instance'); + warn('VueI18n instance does not exists in Vue instance'); return false } diff --git a/src/directive.js b/src/directive.js index 35cb55cd2..6c87cd666 100644 --- a/src/directive.js +++ b/src/directive.js @@ -19,7 +19,7 @@ export function update (el: any, binding: Object, vnode: any, oldVNode: any): vo export function unbind (el: any, binding: Object, vnode: any, oldVNode: any): void { const vm: any = vnode.context if (!vm) { - warn('not exist Vue instance in VNode context') + warn('Vue instance does not exists in VNode context') return } @@ -33,12 +33,12 @@ export function unbind (el: any, binding: Object, vnode: any, oldVNode: any): vo function assert (el: any, vnode: any): boolean { const vm: any = vnode.context if (!vm) { - warn('not exist Vue instance in VNode context') + warn('Vue instance doest not exists in VNode context') return false } if (!vm.$i18n) { - warn('not exist VueI18n instance in Vue instance') + warn('VueI18n instance does not exists in Vue instance') return false } @@ -55,12 +55,12 @@ function t (el: any, binding: Object, vnode: any): void { const { path, locale, args, choice } = parseValue(value) if (!path && !locale && !args) { - warn('not support value type') + warn('value type not supported') return } if (!path) { - warn('required `path` in v-t directive') + warn('`path` is required in v-t directive') return }