Skip to content

Commit

Permalink
Bump to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Jan 9, 2015
2 parents 25ac1c5 + f19a3b8 commit c400ed1
Show file tree
Hide file tree
Showing 27 changed files with 736 additions and 6,376 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Enforcing
"eqeqeq": true,
"indent": 2,
"maxlen": 80,

// Relaxing
"asi": true,
Expand All @@ -13,6 +12,7 @@

// Environments
"browser": true,
"debug": true,

"globals": {
}
Expand Down
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
language: node_js
node_js:
- 0.10
- 0.10
before_install:
- npm install -g phantomjs
env:
global:
- secure: OEN6oZ1RosVu13J7L+AIpxvNm5dMqCepFAzmiZCIzXKeix8dkWBj6G9myxygAezApaOrbQ+6w4nj4MLXaAi1c53twryt7tvtaEna3qBpU9apGsaWGchrW94If0kYYjKvsz0z9wcRbaiyJvj1kSXmF9jujoq6UmjsCT/fCKOIxn4=
- secure: ZAbOA+A7yWRMCQAbyU7oEH0F1LWhwHFbR9DcorTbcRVMIdenUVSZd1Q4+qS04nNvoJ93WNWkR2mII+tcbsWnNxjzjPSyxW4xvFguiGx5gLe4P7iixzk+iPc/oLzbymgHXdg4ywXkH/wxx8qqG6bpvS42vBTAXfbKifOM/X5cxFY=
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.0.0 / 2015-01-10

* Add `$t` method

# v0.11.0 / 2014-11-07

* Bump to 0.11.0
Expand Down
56 changes: 34 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
C8 = node_modules/.bin/component
PONCHO = node_modules/.bin/poncho
REPORTER = dot
KARMA = ./node_modules/karma/bin/karma
MOCHA = ./node_modules/mocha/bin/_mocha
SRCS = ./index.js ./test/specs/*.js ./test/e2e/*.js


build: check node_modules components index.js
@$(C8) build --dev -o test
dist: lint node_modules
@./task/dist

dist: check node_modules components index.js
@$(C8) build --standalone vue-i18n -o dist -n vue-i18n
minify: lint node_modules
@./task/minify

check:
@node_modules/.bin/jshint --config .jshintrc --exclude-path .jshintignore \
index.js test/specs/index.js

components: component.json
@$(C8) install --dev
lint:
@node_modules/.bin/jshint --config .jshintrc --exclude-path .jshintignore $(SRCS)

node_modules: package.json
@npm install

test: build
@node_modules/.bin/mocha-phantomjs --reporter $(REPORTER) test/index.html
test: lint node_modules
@$(KARMA) start

coverage:
@VUE_I18N_TYPE=coverage $(MAKE) test

coveralls:
@VUE_I18N_TYPE=coveralls $(MAKE) test

e2e:
@$(MOCHA) -R dot ./test/e2e/translation.js

sauce1:
@VUE_I18N_TYPE=sauce SAUCE=batch1 $(MAKE) test

sauce2:
@VUE_I18N_TYPE=sauce SAUCE=batch2 $(MAKE) test

sauce3:
@VUE_I18N_TYPE=sauce SAUCE=batch3 $(MAKE) test

test_cov: build
@$(PONCHO) test/index.html
sauce: sauce1 sauce2 sauce3

test_coveralls: build
echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
@$(PONCHO) --reporter lcov test/index.html | node_modules/.bin/coveralls
ci: coverage coveralls e2e sauce

clean:
@rm -rf test/build.js dist
@rm -rf coverage
@rm -rf dist


.PHONY: test test_cov test_coveralls lib_cov clean
.PHONY: dist lint test coverage node_modules clean
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[![Coverage Status](https://img.shields.io/coveralls/kazupon/vue-i18n.svg)](https://coveralls.io/r/kazupon/vue-i18n?branch=master)
[![NPM version](https://badge.fury.io/js/vue-i18n.svg)](http://badge.fury.io/js/vue-i18n)
[![Dependency Status](https://david-dm.org/kazupon/vue-i18n.svg)](https://david-dm.org/kazupon/vue-i18n)
[![Sauce Test Status](https://saucelabs.com/buildstatus/vue-i18n)](https://saucelabs.com/u/vue-i18n)


Internationalization plugin of Vue.js

Expand Down Expand Up @@ -112,6 +114,48 @@ Vue.use(i18n, {
console.log(Vue.t('message.hello')) // output the 'the wolrd'
```

## $t method (for 0.11.4 later)

```html
<div id="message">
Message:<br>{{$t('message.hello')}}
</div>
```

```js
var Vue = require('vue')
var i18n = require('vue-i18n')

// ready translated locales
var locales = {
en: {
message: {
hello: 'the world'
}
},
ja: {
message: {
hello: 'ザ・ワールド'
}
}
}

// set plugin
Vue.use(i18n, {
lang: 'en',
locales: locales
})

new Vue().$mount('#message')
```

render the following:

```html
<div id="message">
Message:<br>the world
</div>
```

# Testing

Expand All @@ -121,10 +165,11 @@ $ make test


# TODO
- specify default translate value
- fallback translate
See the `TODO.md`


# License

## MIT

See the `LICENSE`.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ ] Template Strings format
- [ ] Tynamic language changing
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue-i18n",
"main": "dist/vue-i18n.js",
"description": "Internationalization plugin of Vue.js",
"version": "0.11.0",
"version": "1.0.0",
"homepage": "https://github.com/kazupon/vue-i18n",
"authors": [
"kazuya kawaguchi <kawakazu80@gmail.com>"
Expand Down
6 changes: 2 additions & 4 deletions component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-i18n",
"repo": "kazupon/vue-i18n",
"version": "0.11.0",
"version": "1.0.0",
"description": "Internationalization plugin of Vue.js",
"license": "MIT",
"keywords": [
Expand All @@ -11,9 +11,7 @@
"plugin"
],
"dependencies": {},
"development": {
"yyx990803/vue": "^0.11.0-rc"
},
"development": {},
"scripts": [
"index.js"
],
Expand Down

0 comments on commit c400ed1

Please sign in to comment.