Localized js is now served as json (#784)

This commit is contained in:
Ahmad Farhat
2019-09-06 10:56:53 -04:00
committed by Jesus Federico
parent 061b69f962
commit 390ccf71c2
3 changed files with 10 additions and 25 deletions

View File

@ -102,7 +102,7 @@ module ApplicationHelper
# Return all the translations available in the client side through javascript
def current_translations
@translations ||= I18n.backend.send(:translations)
@translations[I18n.locale].with_indifferent_access[:javascript] || {}
@translations[I18n.locale].with_indifferent_access
end
# Returns the page that the logo redirects to when clicked on