diff --git a/History.md b/History.md index 7a7a73d..badeffd 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +1.7.0 / 2017-04-27 +================== + + * feat: Add more debug information on a 'silly' level + 1.6.0 / 2017-04-27 ================== diff --git a/README.md b/README.md index 611f137..190be1e 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ $ npm install koa-locales --save ## Quick start ```js -var koa = require('koa'); -var locales = require('koa-locales'); +const koa = require('koa'); +const locales = require('koa-locales'); -var app = koa(); -var options = { +const app = koa(); +const options = { dirs: [__dirname + '/locales', __dirname + '/foo/locales'], }; locales(app, options); @@ -63,10 +63,10 @@ The key `options.localeAlias` allows to not repeat dictionary files, as you can ```js locales({ - localeAlias: { - es: es_ES, - en: en_UK - } + localeAlias: { + es: es_ES, + en: en_UK, + }, }); ``` @@ -122,8 +122,8 @@ You can set the property *locals* on the KoaPug instance, where the default loca ```js app.use(async (ctx, next) => { - koaPug.locals.__ = ctx.__.bind(ctx); - await next() + koaPug.locals.__ = ctx.__.bind(ctx); + await next(); }); ``` @@ -162,4 +162,4 @@ Use this level if something doesn't work as you expect. This is going to debug e [david-image]: https://img.shields.io/david/koajs/locales.svg?style=flat-square [david-url]: https://david-dm.org/koajs/locales [download-image]: https://img.shields.io/npm/dm/koa-locales.svg?style=flat-square -[download-url]: https://npmjs.org/package/koa-locales \ No newline at end of file +[download-url]: https://npmjs.org/package/koa-locales diff --git a/package.json b/package.json index 66b5aa9..c204ef5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "koa-locales", - "version": "1.6.0", + "version": "1.7.0", "description": "koa locales, i18n solution for koa", "main": "index.js", "files": [