Module: Granite::Controller::Translations

Included in:
Granite::Controller
Defined in:
app/controllers/granite/controller/translations.rb

Instance Method Summary collapse

Instance Method Details

#i18n_scopesObject



4
5
6
# File 'app/controllers/granite/controller/translations.rb', line 4

def i18n_scopes
  Granite::Translations.combine_paths(projector.i18n_scopes, [*action_name, nil])
end

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



8
9
10
11
# File 'app/controllers/granite/controller/translations.rb', line 8

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