-
Notifications
You must be signed in to change notification settings - Fork 384
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 an i18n functionality to change language using a dropdown in real time. #340
Conversation
@JasonYCHuang This looks amazing. @martyphee Could you give me a hand with this review? Review status: 0 of 23 files reviewed at latest revision, 1 unresolved discussion. public/javascripts/i18n.js, line 1 at r1 (raw file):
@JasonYCHuang Should we put this inside the React on Rails source code? Where did this file come from? Rails? Comments from Reviewable |
@justin808 quote from https://github.com/fnando/i18n-js
I will check whether it can be removed or not. |
Looks good. I was wondering about the js file also. Seems like it's included twice. Once with the Gem and then package.json. Review status: 0 of 23 files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
@justin808 @martyphee This file is generated by the gem automatically. Therefore, I think that putting What do you think about this? |
@alexfedoseev suggested we consider: https://github.com/yahoo/react-intl @JasonYCHuang Yes, gitignore a generated file! |
@justin808 good suggestions, I will take a look on |
@JasonYCHuang @martyphee @alexfedoseev @robwise Once we decide that that https://github.com/yahoo/react-intl is not the way to go for a rails app, it probably makes sense to merge this. Agree, everybody? Or will this make the example too complicated, and it should be left as a PR to demonstrate this? I do think that i18n is an increasingly important basic thing for all apps to handle. |
@justin808 Internationalization seems like a front end issue to me. Since you've largely supporting having node & javascript handle front end issues, I'd think that you'd want to see internationalization handled by https://github.com/yahoo/react-intl or https://github.com/i18next/i18next. Awesome PR, btw, @JasonYCHuang |
7fdf4aa
to
3c0d60c
Compare
@justin808 I add If users want to use Meanwhile, I find there is no need to use PS: Not sure why the test is fail. It is pass on my local. I will take a look later. |
@JasonYCHuang OMG! This is so great! I'm starting to think that we could hoist some of this into the react-on-rails npm package in case one wants to get some of the translation files as defined by Rails. However, for many apps, they might not need the rails translations, and so just having some great docs and this example will suffice. CC: @alexfedoseev @robwise @martyphee @alleycat-at-git Reviewed 20 of 23 files at r1, 4 of 4 files at r2, 13 of 20 files at r3. client/app/bundles/comments/common/i18nHelper.jsx, line 28 at r3 (raw file):
Should default messages be here? If we were going to give the i18n files to a team of translators...should we put the defaults into a separate file? Maybe yes. Maybe no. There are probably tradeoffs. Possibly if the developers only have to work on this one file, that's better. client/app/bundles/comments/common/i18nHelper.jsx, line 110 at r3 (raw file):
We're using lodash freely in this project, so this could be much simpler using lodash. However, if we may want to host this up to the react-on-rails npm library, then this is the way to go. CC: @alexfedoseev @robwise client/app/bundles/comments/components/CommentBox/CommentBox.jsx, line 44 at r3 (raw file):
are we losing the Loading... indicator? this should only show when a remote call is happening. client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx, line 18 at r3 (raw file):
this should be from '/libs' rather than lots of ../../... client/app/bundles/comments/components/SimpleCommentScreen/SimpleCommentScreen.jsx, line 53 at r3 (raw file):
@robwise @alexfedoseev should we use bind here or a fat arrow function? It's actually not clear to me on why we are calling bind. This seems really to be a curry. config/initializers/react_on_rails.rb, line 17 at r3 (raw file):
@JasonYCHuang @robwise @alexfedoseev This doesn't seem right in that we pass the locale strings in the rails context every time. These should be built using a rake task that puts these into the generated files directory, and ideally, they should be lazily loaded as needed. (System.import?) @martyphee, please review. Essentially, if we had lots of translations, every page we render will have tons of rails context data to get parsed by the browser. Comments from Reviewable |
@justin808 Thanks for great suggestions. I also have questions in my mind while doing this branch. Review status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks broke. client/app/bundles/comments/common/i18nHelper.jsx, line 28 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…> Should default messages be here? > > If we were going to give the i18n files to a team of translators...should we put the defaults into a separate file? > > Maybe yes. Maybe no. There are probably tradeoffs. > > Possibly if the developers only have to work on this one file, that's better.
How about a rake task to convert
|
We can screen hero or video chat if you like [email protected]. Review status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks broke. client/app/bundles/comments/common/i18nHelper.jsx, line 28 at r3 (raw file): Previously, JasonYCHuang (Jason Huang) wrote…> Yes, it is better to have this in separate files. > > ```react-intl``` doesn't support tree-structure translations as what we do on rails. > We need a place to transform and keep default ```en.yml``` into the format like this, not hard-coding it. > > How about a rake task to convert ```config/locales/en.yml```, and generate a ```defaultMessages``` into ```client/app/libs```?config/initializers/react_on_rails.rb, line 17 at r3 (raw file): Previously, JasonYCHuang (Jason Huang) wrote…> Agree. A rake task converts ```config/locales/*.yml``` into JS files. > How about putting these JS files in ```client/app/libs``` with ```defaultMessages```?We can first make this work here, and then add to React on Rails if the rake task is generic enough. Comments from Reviewable |
4abaed1
to
2bd8531
Compare
bcaf362
to
ac0aa3f
Compare
Review status: 10 of 23 files reviewed at latest revision, 7 unresolved discussions, some commit checks broke. client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx, line 18 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. client/app/bundles/comments/components/SimpleCommentScreen/SimpleCommentScreen.jsx, line 53 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. remove curry syntax. config/initializers/react_on_rails.rb, line 17 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. client/app/bundles/comments/common/i18nHelper.jsx, line 28 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
Use rake to generate translations & default translations. client/app/bundles/comments/common/i18nHelper.jsx, line 110 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
I put locales-preprocessing into rake, and lodash is no longer needed here. Comments from Reviewable |
ps: remove i18n-js to speed up development. If it is needed, we can add it back later. |
@JasonYCHuang AWESOME!!!!
what do you mean by this?
Rake task should go with these and many tests needed for code inside the rake task. Create a new module or class with the logic. Rake tasks should be tiny. We'll want to run this rake task during pre-compile. This will have to run before the webpack processes. Another issue is that developers need to know to run this once and any time that the localization files changes. I'm not sure how best to handle this. I guess for development, it's OK if the Rails server builds this file on startup if needed. We have code in the test helper to run a task if required We can do that for the localization files as well. Thinking more about this, we need the localization files created for testing as well. Hmmm.... It will be nice to make this super smooth, like we did for the dependency of tests on the JS files. Reviewed 19 of 21 files at r4. Gemfile.lock, line 12 at r4 (raw file):
I'll merge this in for a release before merging this PR! client/.eslintignore, line 4 at r4 (raw file):
missing new line client/app/bundles/comments/startup/clientRegistration.jsx, line 11 at r4 (raw file):
You can have this init in the i18nHelper and only run init once. Save some value to check if this has been run. Then you don't don't need to run the init here. Another option would be to make this a webpack entry point. However, I think listing all the main entry points in this one file is best. client/app/libs/i18n/i18nHelper.jsx, line 12 at r4 (raw file):
We can run this here, and check that we only run this once. lib/tasks/i18n.rake, line 3 at r4 (raw file):
we should aim to put this into React on Rails lib/tasks/i18n.rake, line 6 at r4 (raw file):
where is translations defined lib/tasks/i18n.rake, line 13 at r4 (raw file):
what is the effect of putting these methods in the namespace block? lib/tasks/i18n.rake, line 31 at r4 (raw file):
all this logic should go into it's own module with tests lib/tasks/i18n.rake, line 75 at r4 (raw file):
this can go into the config lib/tasks/i18n.rake, line 83 at r4 (raw file):
instead of %q( blah
blah
) use a <<JS
blah
blah
JS lib/tasks/i18n.rake, line 92 at r4 (raw file):
missing new line Comments from Reviewable |
Before, the PR contained two different approaches using As you suggested, I will move Rake task to Thanks for great feedbacks. Really learn a lot from your suggestions. Review status: all files reviewed at latest revision, 16 unresolved discussions, some commit checks broke. client/app/bundles/comments/components/CommentBox/CommentBox.jsx, line 44 at r3 (raw file): Previously, justin808 (Justin Gordon) wrote…
Done. Comments from Reviewable |
Review status: all files reviewed at latest revision, 18 unresolved discussions, some commit checks broke. Gemfile, line 41 at r10 (raw file): Previously, justin808 (Justin Gordon) wrote…
done Gemfile.lock, line 12 at r10 (raw file): Previously, justin808 (Justin Gordon) wrote…
done Procfile.static.trace, line 5 at r10 (raw file): Previously, justin808 (Justin Gordon) wrote…
we have We need another Comments from Reviewable |
+1 for Review status: all files reviewed at latest revision, 18 unresolved discussions, some commit checks broke. Gemfile.lock, line 12 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Set gemfile.lock back to the original one. client/.eslintignore, line 4 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Added them to .eslintignore client/app/libs/i18n/default.js, line 5 at r5 (raw file): Previously, justin808 (Justin Gordon) wrote…
done client/app/libs/i18n/i18nHelper.jsx, line 12 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
done client/app/libs/i18n/translations.js, line 1 at r5 (raw file): Previously, justin808 (Justin Gordon) wrote…
done config/initializers/assets.rb, line 20 at r1 (raw file): Previously, justin808 (Justin Gordon) wrote…
done lib/tasks/i18n.rake, line 3 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
put this inside the React on Rails source code lib/tasks/i18n.rake, line 6 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
put this inside the React on Rails source code as a rake task lib/tasks/i18n.rake, line 13 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
done lib/tasks/i18n.rake, line 31 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
done lib/tasks/i18n.rake, line 75 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
done lib/tasks/i18n.rake, line 83 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
done lib/tasks/i18n.rake, line 92 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
done public/javascripts/i18n.js, line 1 at r1 (raw file): Previously, justin808 (Justin Gordon) wrote…
put this inside the React on Rails source code. Comments from Reviewable |
We would do it here for testing: # You can replace this implementation with your own for use by the
# ReactOnRails::TestHelper.ensure_assets_compiled helper
module ReactOnRails
module TestHelper
class WebpackAssetsCompiler
def compile_assets
puts "\nBuilding Webpack assets..."
build_output = `cd client && #{ReactOnRails.configuration.npm_build_test_command}`
raise "Error in building assets!\n#{build_output}" unless Utils.last_process_completed_successfully?
puts "Completed building Webpack assets."
end
end
end
end And here for production: https://github.com/shakacode/react_on_rails/blob/master/lib/tasks/assets.rake#L53
Review status: all files reviewed at latest revision, 18 unresolved discussions, some commit checks broke. Comments from Reviewable |
For Another question is: should we call the rake task in different places, and make it scattered in 3 files? Review status: all files reviewed at latest revision, 18 unresolved discussions, some commit checks broke. Comments from Reviewable |
We can try to remove that line actually...let's see.
Yes
|
This looks good. We'll have to try this out after I cut the new release. Just one small change to add regarding testing. See the other PR. Reviewed 4 of 4 files at r11. Comments from Reviewable |
52ae6f1
to
dc9c8bb
Compare
Please update to React on Rails 6.7.0 and I'll merge this. |
Actually,please use 6.7.1. |
Reviewed 3 of 3 files at r12. .travis.yml, line 33 at r12 (raw file):
we should run the locales before this... but I think we can probably just remove this line Comments from Reviewable |
Travis failure: RESTART_PHANTOMJS = Capybara using driver: selenium_firefox Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 11449 Edit a comment from classic page when edit is submitted with blank fields ERROR when compiling base_js_code! See file tmp/base_js_code.js to correlate line numbers of error. Error is Error: Cannot find module "libs/i18n/default" webpackMissingModule ((execjs):39338:81) Object.(execjs) (:39338:175) __webpack_require__ ((execjs):55:30) Object.(execjs) (:34317:21) __webpack_require__ ((execjs):55:30) Object.(execjs) (:34195:20) __webpack_require__ ((execjs):55:30) Object.(execjs) (:34059:23) Object.(execjs) (:34136:31) __webpack_require__ ((execjs):55:30) /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:167:in `eval_unsafe' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:167:in `block (2 levels) in eval' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:217:in `timeout' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:166:in `block in eval' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:63:in `block in with_lock' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:63:in `synchronize' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:63:in `with_lock' /home/travis/.rvm/gems/ruby-2.3.1/gems/mini_racer-0.1.7/lib/mini_racer.rb:164:in `eval' /home/travis/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:10:in `block in initialize' /home/travis/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:66:in `translate' /home/travis/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/mini_racer_runtime.rb:9:in `initialize' /home/travis/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in `new' /home/travis/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/runtime.rb:57:in `compile' /home/travis/.rvm/gems/ruby-2.3.1/gems/execjs-2.7.0/lib/execjs/module.rb:27:in `compile' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/lib/react_on_rails/server_rendering_pool/exec.rb:91:in `create_js_context' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/lib/react_on_rails/server_rendering_pool/exec.rb:10:in `block in reset_pool' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool/timed_stack.rb:170:in `try_create' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool/timed_stack.rb:82:in `block (2 levels) in pop' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool/timed_stack.rb:78:in `loop' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool/timed_stack.rb:78:in `block in pop' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool/timed_stack.rb:77:in `synchronize' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool/timed_stack.rb:77:in `pop' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool.rb:89:in `checkout' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool.rb:61:in `block in with' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool.rb:60:in `handle_interrupt' /home/travis/.rvm/gems/ruby-2.3.1/gems/connection_pool-2.2.1/lib/connection_pool.rb:60:in `with' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/lib/react_on_rails/server_rendering_pool/exec.rb:72:in `eval_js' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/lib/react_on_rails/server_rendering_pool/exec.rb:36:in `server_render_js_with_console_logging' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/lib/react_on_rails/server_rendering_pool.rb:21:in `method_missing' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/app/helpers/react_on_rails_helper.rb:305:in `server_rendered_react_component_html' /home/travis/.rvm/gems/ruby-2.3.1/gems/react_on_rails-6.7.1/app/helpers/react_on_rails_helper.rb:115:in `react_component' /home/travis/build/shakacode/react-webpack-rails-tutorial/app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__4530883444687778251_70170606158920' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/template.rb:159:in `block in render' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/notifications.rb:166:in `instrument' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/template.rb:354:in `instrument' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/template.rb:157:in `render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/renderer/template_renderer.rb:66:in `render_with_layout' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/renderer/template_renderer.rb:52:in `render_template' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/renderer/template_renderer.rb:14:in `render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/renderer/renderer.rb:42:in `render_template' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/renderer/renderer.rb:23:in `render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/rendering.rb:103:in `_render_template' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/streaming.rb:217:in `_render_template' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/rendering.rb:83:in `render_to_body' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/rendering.rb:52:in `render_to_body' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/renderers.rb:142:in `render_to_body' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/abstract_controller/rendering.rb:26:in `render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/rendering.rb:36:in `render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/core_ext/benchmark.rb:12:in `block in ms' /home/travis/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/core_ext/benchmark.rb:12:in `ms' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/instrumentation.rb:44:in `block in render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime' /home/travis/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.1/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/instrumentation.rb:43:in `render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/implicit_render.rb:36:in `default_render' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `tap' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/abstract_controller/base.rb:188:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:126:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:455:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/abstract_controller/callbacks.rb:19:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/rescue.rb:20:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/notifications.rb:164:in `block in instrument' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/notifications.rb:164:in `instrument' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal/params_wrapper.rb:248:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/abstract_controller/base.rb:126:in `process' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionview-5.0.1/lib/action_view/rendering.rb:30:in `process' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal.rb:190:in `dispatch' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_controller/metal.rb:262:in `dispatch' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/routing/route_set.rb:32:in `serve' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/journey/router.rb:39:in `block in serve' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/journey/router.rb:26:in `each' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/journey/router.rb:26:in `serve' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/routing/route_set.rb:725:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/etag.rb:25:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/conditional_get.rb:25:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/head.rb:12:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:222:in `context' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:216:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/cookies.rb:613:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:97:in `__run_callbacks__' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:750:in `_run_call_callbacks' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/callbacks.rb:36:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/railties-5.0.1/lib/rails/rack/logger.rb:36:in `call_app' /home/travis/.rvm/gems/ruby-2.3.1/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `block in call' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `block in tagged' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:26:in `tagged' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/tagged_logging.rb:69:in `tagged' /home/travis/.rvm/gems/ruby-2.3.1/gems/railties-5.0.1/lib/rails/rack/logger.rb:24:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.1/lib/action_dispatch/middleware/static.rb:136:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/railties-5.0.1/lib/rails/engine.rb:522:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/urlmap.rb:68:in `block in call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/urlmap.rb:53:in `each' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/urlmap.rb:53:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/capybara-2.7.1/lib/capybara/server.rb:43:in `call' /home/travis/.rvm/gems/ruby-2.3.1/gems/rack-2.0.1/lib/rack/handler/webrick.rb:86:in `service' /home/travis/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service' /home/travis/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run' /home/travis/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread' ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ react_renderer.rb: 92 wrote file tmp/base_js_code.js ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
8ae7224
to
e5ed7a7
Compare
@@ -29,7 +29,6 @@ install: | |||
- npm install npm@latest -g | |||
- npm --version | |||
- npm install | |||
- npm run build:client && npm run build:server |
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.
rake locales
npm run build:test
```
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.
done
2c0b0f6
to
b134b0a
Compare
Just need to DRY up line from package.json and client/package.json Reviewed 2 of 2 files at r13. package.json, line 21 at r13 (raw file):
We really don't need this duplicated scripts here... There is already a build:test in the Comments from Reviewable |
Reviewed 2 of 2 files at r14. Comments from Reviewable |
Add an i18n functionality to
React Router Demo
,React Demo
andSimple React
tabs.You can now change language using the dropdown in real time.
issue #120
This change is