-
-
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
Automatically generate i18n javascript files for react-intl when the serve starts up. #642
Conversation
we want this pr to include i18n.rake Reviewed 3 of 3 files at r1. Comments from Reviewable |
@JasonYCHuang How's this PR going? |
@justin808 I am occupied recently, and will finish this during Xmas or New year holidays. |
fdff007
to
c367290
Compare
2 similar comments
@JasonYCHuang Looks potentially super amazing! We need updates to the docs and a CHANGELOG.md, as well as tests that demonstrate and verify locals_to_js.rb. This is really a huge addition to the project! 👏 🎉 Reviewed 2 of 5 files at r2. Comments from Reviewable |
No problem, will update it later. Review status: 2 of 5 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
d2188f1
to
95d8a08
Compare
1 similar comment
ffacf2c
to
2870647
Compare
2 similar comments
Update Readme, changelog, and add test Review status: 2 of 8 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
1 similar comment
2 similar comments
Review status: 7 of 11 files reviewed at latest revision, 9 unresolved discussions. docs/basics/i18n.md, line 7 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
update description. docs/basics/i18n.md, line 32 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Not sure I understand your questions.
I update the summary, and hope this will be more clear. docs/basics/i18n.md, line 37 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
These 2 files are generated by docs/basics/i18n.md, line 41 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. lib/react_on_rails/locales_to_js.rb, line 71 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. lib/react_on_rails/locales_to_js.rb, line 74 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. .byebug_history, line 1 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. Comments from Reviewable |
Please either merge or rebase to address the merge conflict. |
Reviewed 5 of 5 files at r5. README.md, line 175 at r4 (raw file):
I think we should consider mentioning that we support an optional automatic conversion of Rails *.yml files. docs/basics/i18n.md, line 32 at r5 (raw file):
finished settings is probably not what you're trying to say. maybe you mean "configured the following settings" lib/react_on_rails/locales_to_js.rb, line 21 at r5 (raw file):
are there a small enough number of files that the performance would never matter? Here's how we do it for the test helper: https://github.com/shakacode/react_on_rails/blob/master/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb#L28 I actually think that's probably not super efficient either. Comments from Reviewable |
Just a few comments remaining. |
d277795
to
24a4d79
Compare
1 similar comment
Review status: 6 of 11 files reviewed at latest revision, 3 unresolved discussions. README.md, line 175 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. docs/basics/i18n.md, line 32 at r5 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. lib/react_on_rails/locales_to_js.rb, line 21 at r5 (raw file): Previously, justin808 (Justin Gordon) wrote…
Try to improve this, and add test. Comments from Reviewable |
Really super awesome! See comments! so close! Reviewed 5 of 5 files at r6. CHANGELOG.md, line 11 at r6 (raw file):
Added... spec/react_on_rails/locales_to_js_spec.rb, line 46 at r6 (raw file):
Let's avoid the sleep! http://stackoverflow.com/questions/32300446/stubbing-time-now-with-rspec Set the time to be one minute ago. Comments from Reviewable |
@justin808 Thank you for patient reviews. Review status: 9 of 11 files reviewed at latest revision, 2 unresolved discussions. CHANGELOG.md, line 11 at r6 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. spec/react_on_rails/locales_to_js_spec.rb, line 46 at r6 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. Comments from Reviewable |
Awesome! I'll ship later today. Reviewed 2 of 2 files at r7. 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
# I18N OPTIONS | ||
################################################################################ | ||
# Replace the following line to the location where you keep translation.js & default.js. | ||
config.i18n_dir = Rails.root.join("client", "app", "libs", "i18n") |
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.
@JasonYCHuang We added this here, with an invalid directory, and later we abort deploying or testing when this directory does not exist.
… 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
This PR is for shakacode/react-webpack-rails-tutorial#340
We need i18n_dir & default_locale in ReactOnRails configuration.
This change is