Module: Hexx::Services::TranslationDSL
- Included in:
- Base
- Defined in:
- lib/hexx-services/translation_dsl.rb
Overview
The module provides features to do translations in the current service’s scope
Instance Method Summary collapse
-
#translate(name, **options) ⇒ Object
Translates a name in the scope of the current service.
Instance Method Details
#translate(name, options) ⇒ String #translate(name, *) ⇒ String
Translates a name in the scope of the current service
38 39 40 41 |
# File 'lib/hexx-services/translation_dsl.rb', line 38 def translate(name, **) return name.to_s unless name.instance_of? Symbol I18n.t name, .merge(scope: [:services, self.class.pathname.to_sym]) end |