Module: Showbuilder::I18nText

Instance Method Summary collapse

Instance Method Details

#show_current_itext(text_id, *args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/showbuilder/i18n_text.rb', line 4

def show_current_itext(text_id, *args)
  case text_id
  when Array
    text_id = text_id.join('_')
  end

  current_text_id = if show_current_itext_base
    "#{show_current_itext_base}.#{text_id}"
  else
    text_id
  end

  show_itext current_text_id, *args
end

#show_current_itext_baseObject



19
20
# File 'lib/showbuilder/i18n_text.rb', line 19

def show_current_itext_base
end

#show_itext(id, *args) ⇒ Object



22
23
24
# File 'lib/showbuilder/i18n_text.rb', line 22

def show_itext(id, *args)
  I18n.t(id, *args)
end