-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support i18n and rules config #7
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 1 -2
Lines 9 14 +5
=====================================
+ Hits 9 14 +5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没测试?
补充了 context 的测试 |
中文部分的测试已经补充 |
我把依赖包升级了一下,测试代码已经改过来了。 |
i18n 没有注册 |
嗯,所以 validator 目前还是得绑定在 context 中而不是 app 中。这种情况下 this.validator.addRule这个用法好像意义不大。而且只能在 context 中 |
嗯,先这样吧,反正原来也是有 cc @eggjs/core 也 Review 下? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@runfan 辛苦了,我这边接手下这个 Feature 吧,整理了下 RFC:eggjs/egg#1672
喔噢
发自我的 iPhone
… 在 2017年11月16日,16:40,cwfan ***@***.***> 写道:
@runfan commented on this pull request.
In config/locales/zh-CN.js:
> @@ -0,0 +1,27 @@
+'use strict';
egg config 下面的文件是会合并的不是吗?我是希望这些翻译直接做为默认的中文翻译放到项目中:)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
那么,我关闭这个 PR 了 |
先留着吧,回头我在另一个 PR 中自动 close 也行。 |
@atian25 @dead-horse @runfan any progress on this? |
Checklist
npm test
passesAffected core subsystem(s)
错误信息输出支持 eggjs 中的 i18n
Description of change
parameter.translate 实现,并且使用 gettext 支持
app.validate 去掉
增加在 config.default 中配置 rules