Sha256: 6370d27959db69cecb9f37b8b1fda80bd537d2c62ad5136aa71eafcd86bcaa9c
Contents?: true
Size: 434 Bytes
Versions: 19
Compression:
Stored size: 434 Bytes
Contents
module Refinery module TranslationHelper # Overrides Rails' core I18n.t() function to produce a more helpful error message. # The default one wreaks havoc with CSS and makes it hard to understand the problem. def t(key, options = {}) if (val = super) =~ /class.+?translation_missing/ val = val.to_s.gsub(/<span[^>]*>/, 'i18n: ').gsub('</span>', '').gsub(', ', '.') end val end end end
Version data entries
19 entries across 19 versions & 1 rubygems