Sha256: d2d6553f38c2e2071ec44332d1b43b359524176bcda6b30ea030acda7362dc40
Contents?: true
Size: 562 Bytes
Versions: 6
Compression:
Stored size: 562 Bytes
Contents
require 'i18n' require 'active_support/core_ext/array/extract_options' module Spree class TranslationHelperWrapper # :nodoc: include ActionView::Helpers::TranslationHelper end class << self # Add spree namespace and delegate to Rails TranslationHelper for some nice # extra functionality. e.g return reasonable strings for missing translations def translate(key, options = {}) options[:scope] = [:spree, *options[:scope]] TranslationHelperWrapper.new.translate(key, options) end alias_method :t, :translate end end
Version data entries
6 entries across 6 versions & 1 rubygems