-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
add locale.rake #717
add locale.rake #717
Conversation
b3b70ce
to
1cfc293
Compare
@JasonYCHuang This looks fine. If we have this, then it's optional to add the locale building to the application startup. It would be really slick if we checked for the locale files being current at the same place migrations are confirmed on controller requests.... In order to merge this:
|
af03d3f
to
1cfc293
Compare
@justin808 I will update documents. I am confused about Travis CI failure. It only fails in Ruby2.3.1. |
Travis.ci is consistently failing for at least one ruby version and I just restart it for just that version. |
@JasonYCHuang See my comment above: #717 (comment) Do you need any help from me? I'd like to wrap this one up this weekend! |
@justin808 Yes, I need some advice. I am going to update i18n doc. In |
@justin808 What do you mean: Should I add more information to |
@JasonYCHuang I sent you invites to Screen Hero and Slack. Let's get this locale stuff resolved! Awesome work!
Overall:
|
This is where we fix up precompile by default: And this doc needs to be updated... as well as the new locale one. |
1cfc293
to
724eba8
Compare
2 similar comments
lib/tasks/assets.rake
Outdated
When "ReactOnRails.configuration.i18n_dir" is set, it indeicates that javascript locale files are needed. | ||
This task generates javascript locale files: `translations.js` & `default.js`. | ||
DESC | ||
desc "Generate i18n javascript files" |
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.
Formatting is not right See example above in this file.
desc << Generate i18n javascript files
This task generates javascript locale files: `translations.js` & `default.js` and places them in
the "ReactOnRails.configuration.i18n_dir".
DESC
724eba8
to
6f06f7f
Compare
2 similar comments
1fac7bb
to
23162e7
Compare
23162e7
to
178cc72
Compare
e23c721
to
5f502c7
Compare
Review status: 2 of 3 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. docs/basics/i18n.md, line 58 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
updated Comments from Reviewable |
4537752
to
1132e9d
Compare
1132e9d
to
27fc9be
Compare
27fc9be
to
cb75a4f
Compare
1 similar comment
No pre-hook needed in
Review status: 1 of 6 files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
Very nice. For testing, we should have a call to generate the i18n task here: Reviewed 1 of 1 files at r5, 3 of 5 files at r6, 2 of 2 files at r7. CHANGELOG.md, line 10 at r7 (raw file):
Allow using rake task to generate javascript locale files. The test helper automatically creates the localization files when needed. docs/basics/i18n.md, line 49 at r7 (raw file):
for testing and for production deployments. For development, you should adjust your Procfiles so that they run bundle exec rake react_on_rails:locale lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt, line 2 at r7 (raw file):
nice! Did you try the generator? lib/tasks/assets.rake, line 53 at r7 (raw file):
Nice! Comments from Reviewable |
cb75a4f
to
110c11b
Compare
done Review status: 4 of 7 files reviewed at latest revision, 4 unresolved discussions. CHANGELOG.md, line 10 at r7 (raw file): Previously, justin808 (Justin Gordon) wrote…
done docs/basics/i18n.md, line 49 at r7 (raw file): Previously, justin808 (Justin Gordon) wrote…
done lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt, line 2 at r7 (raw file): Previously, justin808 (Justin Gordon) wrote…
yes, I create a new rails project and install react_on_rails. It looks good. Comments from Reviewable |
110c11b
to
a10e4db
Compare
@JasonYCHuang Please confirm that you manually verified checking the locales files works in the test helper and I'll merge. Reviewed 4 of 4 files at r8. lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt, line 2 at r7 (raw file): Previously, JasonYCHuang (Jason Huang) wrote…
fabulous. lib/react_on_rails/test_helper/ensure_assets_compiled.rb, line 30 at r8 (raw file):
This is awesome. @robwise are you OK with us not adding a test here: https://github.com/shakacode/react_on_rails/blob/master/spec/react_on_rails/test_helper/ensure_assets_compiled_spec.rb#L8 Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. lib/react_on_rails/test_helper/ensure_assets_compiled.rb, line 30 at r8 (raw file): Previously, justin808 (Justin Gordon) wrote…
I would definitely write a test if you are introducing new logic Comments from Reviewable |
7620b95
to
a10e4db
Compare
Yes, I manually run Review status: 7 of 8 files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
… time. (#340) Demonstrates use of i18n (internationalization) with React on Rails. Docs: https://github.com/shakacode/react_on_rails/blob/master/docs/basics/i18n.md Relevant PRs from React on Rails: * shakacode/react_on_rails#642 * shakacode/react_on_rails#717
… time. (#340) Demonstrates use of i18n (internationalization) with React on Rails. Docs: https://github.com/shakacode/react_on_rails/blob/master/docs/basics/i18n.md Relevant PRs from React on Rails: * shakacode/react_on_rails#642 * shakacode/react_on_rails#717
… time. (#340) Demonstrates use of i18n (internationalization) with React on Rails. Docs: https://github.com/shakacode/react_on_rails/blob/master/docs/basics/i18n.md Relevant PRs from React on Rails: * shakacode/react_on_rails#642 * shakacode/react_on_rails#717
Solve travis CI problem in shakacode/react-webpack-rails-tutorial#340
This change is