Module: Lit::FrontendHelper::TranslationKeyWrapper

Included in:
Lit::FrontendHelper
Defined in:
app/helpers/lit/frontend_helper.rb

Instance Method Summary collapse

Instance Method Details

#t(key, options = {}) ⇒ Object



15
16
17
# File 'app/helpers/lit/frontend_helper.rb', line 15

def t(key, options = {})
  translate(key, options)
end

#translate(key, options = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'app/helpers/lit/frontend_helper.rb', line 5

def translate(key, options = {})
  options = options.with_indifferent_access
  key = scope_key_by_partial(key)
  ret = super(key, options)
  if !options[:skip_lit] && lit_authorized?
    ret = get_translateable_span(key, ret)
  end
  ret
end