Module: Trestle::I18nHelper

Defined in:
app/helpers/trestle/i18n_helper.rb

Instance Method Summary collapse

Instance Method Details

#i18n_javascript_translationsObject



3
4
5
6
7
8
9
10
11
# File 'app/helpers/trestle/i18n_helper.rb', line 3

def i18n_javascript_translations
  Trestle.config.javascript_i18n_keys.map { |key|
    begin
      [key, t(key, raise: true)]
    rescue I18n::MissingTranslationData
      nil
    end
  }.compact
end