-
Hey everyone, This gem is great, thanks to the maintainers and contributors for working on it. I got the following error after running a When I run rails_app/config/application.rb:30:in `<class:Application>': uninitialized constant I18n::JS (NameError)
config.middleware.use I18n::JS::Middleware
^^^^ I haven't changed any code at all in the app and the # Enables translations to be available on JavaScript files.
config.middleware.use I18n::JS::Middleware Here's what the
The Gemfile includes the dependency:
The JavaScript is bundled with Removing the dependency gets the app to work but I would like to keep using the gem to pass translations over to the JavaScript side of things. If anyone has any tips on how to get past this or could share their thoughts I would appreciate it! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Looks like you're migrating from v3 to v4. V4 works totally different and has no middleware. Please take a look at this document to know the differences: https://github.com/fnando/i18n-js/blob/main/MIGRATING_FROM_V3_TO_V4.md |
Beta Was this translation helpful? Give feedback.
Looks like you're migrating from v3 to v4. V4 works totally different and has no middleware. Please take a look at this document to know the differences: https://github.com/fnando/i18n-js/blob/main/MIGRATING_FROM_V3_TO_V4.md