Module: Fortitude::Widget::Localization

Extended by:
ActiveSupport::Concern
Included in:
Fortitude::Widget
Defined in:
lib/fortitude/widget/localization.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

LOCALIZED_CONTENT_PREFIX =
"localized_content_"

Instance Method Summary collapse

Instance Method Details

#_fortitude_t_with_translation_base(key, *args) ⇒ Object

INTERNAL USE ONLY



37
38
39
40
41
42
43
44
# File 'lib/fortitude/widget/localization.rb', line 37

def _fortitude_t_with_translation_base(key, *args)
  base = self.class.translation_base
  if base && key.to_s =~ /^\./
    invoke_helper(:t, "#{base}#{key}", *args)
  else
    invoke_helper(:t, key, *args)
  end
end

#_fortitude_t_without_translation_base(*args) ⇒ Object Also known as: t

INTERNAL USE ONLY



47
48
49
# File 'lib/fortitude/widget/localization.rb', line 47

def _fortitude_t_without_translation_base(*args)
  invoke_helper(:t, *args)
end

#ttext(key, *args) ⇒ Object

PUBLIC API



81
82
83
# File 'lib/fortitude/widget/localization.rb', line 81

def ttext(key, *args)
  tag_text t(".#{key}", *args)
end