aboutsummaryrefslogtreecommitdiffstats
path: root/lib/i18n_fixes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/i18n_fixes.rb')
-rw-r--r--lib/i18n_fixes.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/i18n_fixes.rb b/lib/i18n_fixes.rb
index f75b969c4..bb339fc55 100644
--- a/lib/i18n_fixes.rb
+++ b/lib/i18n_fixes.rb
@@ -6,10 +6,12 @@
# so that we can interpolate our translation strings nicely
def _(key, options = {})
- # Assume the result of doing any translation is html_safe.
- # In other words, we trust the translators.
- translation = FastGettext._(key).html_safe || key
- gettext_interpolate(translation, options)
+ # HACK: We should be going via GettextI18nRails instead of FastGettext below
+ # so that #translations_are_html_safe is respected but calling it directly
+ # doesn't work for me. I'm just marking the resulting string as html_safe.
+ # This whole hacky file should be removed
+ translation = FastGettext._(key) || key
+ gettext_interpolate(translation, options).html_safe
end
INTERPOLATION_RESERVED_KEYS = %w(scope default)