Comparing version 1.2.0 to 2.0.0
'use strict'; | ||
module.exports = () => { | ||
return function* i18n(next) { | ||
const ctx = this; | ||
return function i18n(ctx, next) { | ||
function gettext() { | ||
return ctx.__.apply(ctx, arguments); | ||
} | ||
this.locals = { | ||
ctx.locals = { | ||
gettext, | ||
@@ -14,4 +13,4 @@ __: gettext, | ||
yield next; | ||
return next(); | ||
}; | ||
}; |
2.0.0 / 2017-11-10 | ||
================== | ||
**others** | ||
* [[`80e591d`](http://github.com/eggjs/egg-i18n/commit/80e591d86eef8d92a8f8c6eef8d8d8fb00d9a1e2)] - refactor: use async function and support egg@2 (#8) (Yiyu He <<dead_horse@qq.com>>) | ||
1.2.0 / 2017-09-13 | ||
@@ -3,0 +9,0 @@ ================== |
{ | ||
"name": "egg-i18n", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"eggPlugin": { | ||
@@ -31,3 +31,3 @@ "name": "i18n" | ||
"engines": { | ||
"node": ">= 6.0.0" | ||
"node": ">= 8.0.0" | ||
}, | ||
@@ -40,19 +40,19 @@ "files": [ | ||
"ci": { | ||
"version": "6, 7" | ||
"version": "8, 9" | ||
}, | ||
"dependencies": { | ||
"debug": "^2.6.0", | ||
"koa-locales": "^1.5.2" | ||
"debug": "^3.1.0", | ||
"koa-locales": "^1.7.0" | ||
}, | ||
"devDependencies": { | ||
"autod": "^2.7.1", | ||
"egg": "^0.7.0", | ||
"egg-bin": "^1.10.0", | ||
"egg-ci": "^1.1.0", | ||
"egg-mock": "^2.0.0", | ||
"eslint": "^3.13.1", | ||
"eslint-config-egg": "^3.2.0", | ||
"pedding": "^1.1.0", | ||
"supertest": "^2.0.1" | ||
"autod": "^2.10.1", | ||
"egg": "next", | ||
"egg-bin": "^4.3.5", | ||
"egg-ci": "^1.8.0", | ||
"egg-mock": "^3.13.1", | ||
"egg-view-nunjucks": "^2.1.4", | ||
"eslint": "^4.10.0", | ||
"eslint-config-egg": "^5.1.1", | ||
"pedding": "^1.1.0" | ||
} | ||
} | ||
} |
16111
9
178
+ Addeddebug@3.2.7(transitive)
+ Addedms@2.1.3(transitive)
Updateddebug@^3.1.0
Updatedkoa-locales@^1.7.0