Sha256: ebe873d7d5be0b230ce358cbad505adbc530161ba463321ecc953a1ad53b9a51
Contents?: true
Size: 571 Bytes
Versions: 4
Compression:
Stored size: 571 Bytes
Contents
require 'action_view/helpers/tag_helper' module ActionView module Helpers module TranslationHelper def translate(key, options = {}) options[:raise] = true I18n.translate(key, options) rescue I18n::MissingTranslationData => e keys = I18n.send(:normalize_translation_keys, e.locale, e.key, e.options[:scope]) content_tag('span', keys.join(', '), :class => 'translation_missing') end alias :t :translate def localize(*args) I18n.localize *args end alias :l :localize end end end
Version data entries
4 entries across 3 versions & 2 rubygems