Module: I18nHoverKeys::Overrides
- Defined in:
- lib/i18n_hover_keys/overrides.rb
Instance Method Summary collapse
- #translate(key, **options) ⇒ Object (also: #t)
Instance Method Details
#translate(key, **options) ⇒ Object Also known as: t
3 4 5 6 7 8 |
# File 'lib/i18n_hover_keys/overrides.rb', line 3 def translate(key, **) translation = super(key, **) return translation unless translation.is_a?(String) "<span data-i18n-key='#{key}'>#{translation}</span>".html_safe end |