Pavel
Pavel

Reputation: 1974

Rails I18n-js: missing translation

I'm using I18n-js gem for localiztion of js files. I've installed it with help of gem Readme and it worked for the first time.

The problem is when I add new translations to my translations.js file with rake task rake i18n:js:export translations not showing in my templates - only missing translation (development and production has same situation), although translations.js contents all the new translations.

application.js

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

What did I miss? If you need more information please comment about it. Thanks

Upvotes: 9

Views: 4074

Answers (2)

oansari
oansari

Reputation: 325

Run rake tmp:clear

I faced the same issue and this command solved it.

Upvotes: 13

Pavel
Pavel

Reputation: 1974

Unfortunately I haven't found better solution:

Add = javascript_include_tag 'translations' to the view file

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

Upvotes: 0

Related Questions