Module: Granite::Projector::Translations

Includes:
ActionView::Helpers::TranslationHelper
Included in:
Granite::Projector
Defined in:
lib/granite/projector/translations.rb

Instance Method Summary collapse

Instance Method Details

#i18n_scopesObject



6
7
8
# File 'lib/granite/projector/translations.rb', line 6

def i18n_scopes
  Granite::Translations.combine_paths(action_class.i18n_scopes, [:"#{projector_name}"])
end

#translate(*args, **options) ⇒ Object Also known as: t



10
11
12
13
# File 'lib/granite/projector/translations.rb', line 10

def translate(*args, **options)
  key, options = Granite::Translations.scope_translation_args(i18n_scopes, *args, **options)
  super(key, **options)
end