Module: I18nOnSteroids::TranslationHelper
- Defined in:
- lib/i18n_on_steroids/translation_helper.rb
Instance Method Summary collapse
- #translate(key, **options) ⇒ Object (also: #t)
Instance Method Details
#translate(key, **options) ⇒ Object Also known as: t
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/i18n_on_steroids/translation_helper.rb', line 5 def translate(key, **) translation = if defined?(super) super(key, **) else I18n.translate(key, **) end if translation.is_a?(String) && (translation.include?("%{") || translation.include?("${")) process_mixed_translation(translation, ) else translation end end |