Sha256: 63d583791db686610d2e44b68613492e2319093453e3ace87a724809801b1d51

Contents?: true

Size: 378 Bytes

Versions: 20

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true

require 'avm/patches/i18n'

class Object
  def translate(entry_suffix, values = {})
    ::I18n.translate(translate_entry_full(entry_suffix), values)
  end

  def translate_entry_full(entry_suffix)
    "#{translate_entry_self_prefix}.#{entry_suffix}"
  end

  def translate_entry_self_prefix
    self.class.name.underscore.gsub('/', '.')
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
avm-tools-0.78.0 lib/avm/patches/object/i18n.rb
avm-tools-0.77.0 lib/avm/patches/object/i18n.rb
avm-tools-0.76.1 lib/avm/patches/object/i18n.rb
avm-tools-0.76.0 lib/avm/patches/object/i18n.rb
avm-tools-0.75.1 lib/avm/patches/object/i18n.rb
avm-tools-0.75.0 lib/avm/patches/object/i18n.rb
avm-tools-0.74.1 lib/avm/patches/object/i18n.rb
avm-tools-0.74.0 lib/avm/patches/object/i18n.rb
avm-tools-0.73.0 lib/avm/patches/object/i18n.rb
avm-tools-0.72.0 lib/avm/patches/object/i18n.rb
avm-tools-0.71.0 lib/avm/patches/object/i18n.rb
avm-tools-0.70.2 lib/avm/patches/object/i18n.rb
avm-tools-0.70.1 lib/avm/patches/object/i18n.rb
avm-tools-0.70.0 lib/avm/patches/object/i18n.rb
avm-tools-0.69.3 lib/avm/patches/object/i18n.rb
avm-tools-0.69.2 lib/avm/patches/object/i18n.rb
avm-tools-0.69.1 lib/avm/patches/object/i18n.rb
avm-tools-0.69.0 lib/avm/patches/object/i18n.rb
avm-tools-0.68.0 lib/avm/patches/object/i18n.rb
avm-tools-0.67.0 lib/avm/patches/object/i18n.rb