Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "vue-i18n", | ||
"repo": "kazupon/vue-i18n", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Internationalization plugin of Vue.js", | ||
@@ -15,3 +15,3 @@ "license": "MIT", | ||
"development": { | ||
"yyx990803/vue": "~0.10.4" | ||
"yyx990803/vue": "^0.11.0-rc" | ||
}, | ||
@@ -18,0 +18,0 @@ "scripts": [ |
@@ -0,1 +1,5 @@ | ||
# v0.1.2 / 2014-10-07 | ||
* Support bower | ||
# v0.1.1 / 2014-10-06 | ||
@@ -2,0 +6,0 @@ |
14
index.js
/** | ||
* import(s) | ||
* Expose internationalization plugin | ||
* | ||
* @param {Object} Vue | ||
* @param {Object} opts | ||
*/ | ||
/** | ||
* exports(s) | ||
*/ | ||
module.exports = function (Vue, opts) { | ||
@@ -16,3 +14,3 @@ opts = opts || {} | ||
Vue.t = function (key) { | ||
var ret = key | ||
var ret = key || '' | ||
var locale = locales[lang] | ||
@@ -39,5 +37,5 @@ if (key && locale) { | ||
this.el.textContent = Vue.t(this.key) | ||
this.el.textContent = Vue.t(this.expression) | ||
} | ||
}) | ||
} |
{ | ||
"name": "vue-i18n", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Internationalization plugin of Vue.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -188,25 +188,3 @@ /** | ||
}) | ||
// NOTE: Don't use `v-text` directive !! | ||
describe('v-text', function () { | ||
it('should not translate', function () { | ||
mock('translate-use-text', '<p v-t="message.hello" v-text="hello"></p>') | ||
Vue.use(i18n, { | ||
lang: 'en', | ||
locales: locales | ||
}) | ||
new Vue({ | ||
el: '#translate-use-text', | ||
data: { | ||
hello: 'world' | ||
} | ||
}) | ||
var el = document.querySelector('#translate-use-text') | ||
expect(el.textContent).to.be.eql('world') | ||
}) | ||
}) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148085
34
5530