Sha256: 8e77fd8ee4a9d505c010e6c6faaf42e08da649f92af6f27187877aa1050d1321

Contents?: true

Size: 784 Bytes

Versions: 25

Compression:

Stored size: 784 Bytes

Contents

filename = "#{File.dirname(__FILE__)}/../active_model/locale.rb"
translations = eval(IO.read(File.expand_path(filename)), binding, filename)
translations[:en][:activerecord] = translations[:en].delete(:activemodel)

# Only ActiveRecord 2.3.5+ can pull i18n >= 0.1.3 from system-wide gems (and
# therefore possibly have I18n::VERSION available)
begin
  require 'i18n/version'
rescue Exception => ex
end unless ::ActiveRecord::VERSION::MAJOR == 2 && (::ActiveRecord::VERSION::MINOR < 3 || ::ActiveRecord::VERSION::TINY < 5)

# Only i18n 0.4.0+ has the new %{key} syntax
if !defined?(I18n::VERSION) || I18n::VERSION < '0.4.0'
  translations[:en][:activerecord][:errors][:messages].each do |key, message|
    message.gsub!('%{', '{{')
    message.gsub!('}', '}}')
  end
end

translations

Version data entries

25 entries across 25 versions & 10 rubygems

Version Path
state_machine_updated_for_ruby_3_2-2.0.0 lib/state_machine/integrations/active_record/locale.rb
enum_state_machine-0.8.0 lib/enum_state_machine/integrations/active_record/locale.rb
enum_state_machine-0.7.0 lib/enum_state_machine/integrations/active_record/locale.rb
telvue_state_machine-1.2.3 lib/state_machine/integrations/active_record/locale.rb
enum_state_machine-0.6.0 lib/enum_state_machine/integrations/active_record/locale.rb
telvue_state_machine-1.2.2 lib/state_machine/integrations/active_record/locale.rb
state_machine_deuxito-0.0.1 lib/state_machine/integrations/active_record/locale.rb
enum_state_machine-0.5.0 lib/enum_state_machine/integrations/active_record/locale.rb
enum_state_machine-0.4.1 lib/enum_state_machine/integrations/active_record/locale.rb
telvue_state_machine-1.2.1 lib/state_machine/integrations/active_record/locale.rb
cm-state_machine-1.2.0.1 lib/state_machine/integrations/active_record/locale.rb
enum_state_machine-0.4.0 lib/enum_state_machine/integrations/active_record/locale.rb
enum_state_machine-0.3.0 lib/enum_state_machine/integrations/active_record/locale.rb
enum_state_machine-0.2.0 lib/enum_state_machine/integrations/active_record/locale.rb
enum_state_machine-0.1.1 lib/enum_state_machine/integrations/active_record/locale.rb
enum_state_machine-0.1.0 lib/enum_state_machine/integrations/active_record/locale.rb
spree-state_machine-2.0.0.beta4 lib/state_machine/integrations/active_record/locale.rb
spree-state_machine-2.0.0.beta3 lib/state_machine/integrations/active_record/locale.rb
spree-state_machine-2.0.0.beta2 lib/state_machine/integrations/active_record/locale.rb
spree-state_machine-2.0.0.beta1 lib/state_machine/integrations/active_record/locale.rb