Module: Precious::Views::LocaleHelpers

Included in:
Layout
Defined in:
lib/gollum/views/helpers/locale_helpers.rb

Constant Summary collapse

NO_METHOD_MESSAGE =
'Argument must be a view method'
YAML_VARIABLE_REGEXP =
/\%\{[\w]+\}/

Instance Method Summary collapse

Instance Method Details

#tObject

Returns all I18n translation strings for the current view class. This method support YAML arguments. For example:

last_edited: This content was last edited at %{date}.

Where the ‘date` argument must be a method available on the current class.

Use this interface within Mustache templates to render any user interface strings in the current locale. For example:

{{ t.last_edited }}


20
21
22
# File 'lib/gollum/views/helpers/locale_helpers.rb', line 20

def t
  autofill I18n.t(locale_klass_name)
end