diff --git a/lib/noticed/translation.rb b/lib/noticed/translation.rb index 44571def..0810157b 100644 --- a/lib/noticed/translation.rb +++ b/lib/noticed/translation.rb @@ -2,8 +2,6 @@ module Noticed module Translation extend ActiveSupport::Concern - include ActiveSupport::HtmlSafeTranslation if defined?(ActiveSupport::HtmlSafeTranslation) - # Returns the +i18n_scope+ for the class. Overwrite if you want custom lookup. def i18n_scope :notifications @@ -14,8 +12,8 @@ def class_scope end def translate(key, **options) - if defined?(super) - super scope_translation_key(key), **options + if defined?(::ActiveSupport::HtmlSafeTranslation) + ActiveSupport::HtmlSafeTranslation.translate scope_translation_key(key), **options else I18n.translate scope_translation_key(key), **options end