I read about it for several days and nothing works. I saw a lot of documentation on this issue, but not a single work around works for me. I have:
Rails 5.0.1
* sprockets (3.7.1)
* sprockets-rails (3.2.0)
* i18n (0.7.0)
* i18n-js (3.0.0.rc15)
configurations / i18n-js.yml
translations:
- file: "app/assets/javascripts/application/i18n/translations.js"
only: '*.js*'
configurations / application.rb
config.middleware.use I18n::JS::Middleware
When I add new translations to the corresponding yml file, i18n / translations.js is not updated to include new .yml translations.
For example, in en.yml:
en:
form_error:
tos_check: "You must agree to Lexody Terms of Use to continue."
choose_city: "Please select a city from the menu."
cancel_reason: "Please provide a reason for cancelling."
$('.prompt').html('<p style="color:
returns: [missing "en.form_error.cancel_reason" translation]
I tried:
Removing translations.js and launching rake i18n:js:export
rake tmp:cache:clear
rake assets:precompile
Does anyone have any other solution that I can try? Thank!!
source
share