Sha256: e00d24978172ff8f3d9e488c112b4e2182cca67e43fd916d5cb9f79c0526f639
Contents?: true
Size: 660 Bytes
Versions: 15
Compression:
Stored size: 660 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
15 entries across 15 versions & 1 rubygems