Rails I18n-js: missing translation

I am using I18n-js gem to localize js files. I installed it using the gem Readme, and it worked for the first time.

The problem is that I am adding new translations to my translations.js file using the rake rake i18n:js:export command, which do not appear in my templates - only missing translation (development and production have the same situation), although translations.js contains all new translations.

application.js

 //= require i18n //= require i18n/translations 

What did I miss? If you need more information, comment on this. Thanks

+6
source share
2 answers

Run rake tmp:clear

I faced the same problem, and this team solved it.

+8
source

Unfortunately, I did not find a better solution:

Add = javascript_include_tag 'translations' to the view file

remove //= require i18n/translations from application.js

0
source

Source: https://habr.com/ru/post/981575/


All Articles