From f58e2dd095e2e9e4e42e6d7af229f87e70fd5427 Mon Sep 17 00:00:00 2001 From: Christian Blais Date: Sun, 4 Mar 2018 21:29:54 -0500 Subject: `ActiveSupport::Inflector#ordinal` and `ActiveSupport::Inflector#ordinalize` now support translations through I18n. { fr: { number: { nth: { ordinals: lambda do |_key, number:, **_options| if number.to_i.abs == 1 'er' else 'e' end end, ordinalized: lambda do |_key, number:, **_options| "#{number}#{ActiveSupport::Inflector.ordinal(number)}" end } } } } --- activesupport/lib/active_support/i18n.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/i18n.rb') diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb index d60b3eff30..39dab1cc71 100644 --- a/activesupport/lib/active_support/i18n.rb +++ b/activesupport/lib/active_support/i18n.rb @@ -13,3 +13,4 @@ require "active_support/lazy_load_hooks" ActiveSupport.run_load_hooks(:i18n) I18n.load_path << File.expand_path("locale/en.yml", __dir__) +I18n.load_path << File.expand_path("locale/en.rb", __dir__) -- cgit v1.2.3