Sha256: 83f4ca2cda141fd7b7124ff033e1af782ce2e134eedd3b85eaef0b735a4d3a71
Contents?: true
Size: 656 Bytes
Versions: 79
Compression:
Stored size: 656 Bytes
Contents
# frozen_string_literal: true # Enables cascading I18n definitions # # Example: # # en: # welcome: Gidday! # # Without cascading: # I18n.translate("greetings.welcome") # => "translation missing: en.greetings.welcome" # # With cascading: # # I18n.translate("greetings.welcome") # => "Gidday!" # # For more information: # http://svenfuchs.com/2011/2/11/organizing-translations-with-i18n-cascade-and-i18n-missingtranslations # module CoreExtensions module I18n module AlwaysCascade def translate(key, options = {}) super(key, options.merge(cascade: { offset: 2, skip_root: false })) end alias t translate end end end
Version data entries
79 entries across 79 versions & 1 rubygems