From 5b001b2719aa90ccd8da783ba66ffa0d658a8de7 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:10:10 +0000 Subject: [PATCH] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../lib/i18n/backend/pluralization.rb | 55 ------------ .../{i18n-1.10.0 => i18n-1.11.0}/lib/i18n.rb | 26 +++--- .../lib/i18n/backend.rb | 0 .../lib/i18n/backend/base.rb | 0 .../lib/i18n/backend/cache.rb | 0 .../lib/i18n/backend/cache_file.rb | 0 .../lib/i18n/backend/cascade.rb | 0 .../lib/i18n/backend/chain.rb | 0 .../lib/i18n/backend/fallbacks.rb | 2 +- .../lib/i18n/backend/flatten.rb | 0 .../lib/i18n/backend/gettext.rb | 0 .../i18n/backend/interpolation_compiler.rb | 0 .../lib/i18n/backend/key_value.rb | 0 .../lib/i18n/backend/lazy_loadable.rb | 0 .../lib/i18n/backend/memoize.rb | 0 .../lib/i18n/backend/metadata.rb | 0 .../lib/i18n/backend/pluralization.rb | 90 +++++++++++++++++++ .../lib/i18n/backend/simple.rb | 0 .../lib/i18n/backend/transliterator.rb | 0 .../lib/i18n/config.rb | 4 +- .../lib/i18n/exceptions.rb | 2 +- .../lib/i18n/gettext.rb | 0 .../lib/i18n/gettext/helpers.rb | 0 .../lib/i18n/gettext/po_parser.rb | 0 .../lib/i18n/interpolate/ruby.rb | 0 .../lib/i18n/locale.rb | 0 .../lib/i18n/locale/fallbacks.rb | 0 .../lib/i18n/locale/tag.rb | 0 .../lib/i18n/locale/tag/parents.rb | 0 .../lib/i18n/locale/tag/rfc4646.rb | 0 .../lib/i18n/locale/tag/simple.rb | 2 +- .../lib/i18n/middleware.rb | 0 .../lib/i18n/utils.rb | 0 .../lib/i18n/version.rb | 2 +- 35 files changed, 113 insertions(+), 72 deletions(-) delete mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/pluralization.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/base.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/cache.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/cache_file.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/cascade.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/chain.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/fallbacks.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/flatten.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/gettext.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/interpolation_compiler.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/key_value.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/lazy_loadable.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/memoize.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/metadata.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/pluralization.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/simple.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/backend/transliterator.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/config.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/exceptions.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/gettext.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/gettext/helpers.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/gettext/po_parser.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/interpolate/ruby.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/locale.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/locale/fallbacks.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/locale/tag.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/locale/tag/parents.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/locale/tag/rfc4646.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/locale/tag/simple.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/middleware.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/utils.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{i18n-1.10.0 => i18n-1.11.0}/lib/i18n/version.rb (69%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 74f4026086..d2b195fdde 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -4,7 +4,7 @@ ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' ruby_version = RbConfig::CONFIG["ruby_version"] path = File.expand_path('..', __FILE__) $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.10.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.0/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/pluralization.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/pluralization.rb deleted file mode 100644 index b60265711f..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/pluralization.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# I18n Pluralization are useful when you want your application to -# customize pluralization rules. -# -# To enable locale specific pluralizations you can simply include the -# Pluralization module to the Simple backend - or whatever other backend you -# are using. -# -# I18n::Backend::Simple.include(I18n::Backend::Pluralization) -# -# You also need to make sure to provide pluralization algorithms to the -# backend, i.e. include them to your I18n.load_path accordingly. -module I18n - module Backend - module Pluralization - # Overwrites the Base backend translate method so that it will check the - # translation meta data space (:i18n) for a locale specific pluralization - # rule and use it to pluralize the given entry. I.e. the library expects - # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') - # - # Pluralization rules are expected to respond to #call(count) and - # return a pluralization key. Valid keys depend on the translation data - # hash (entry) but it is generally recommended to follow CLDR's style, - # i.e., return one of the keys :zero, :one, :few, :many, :other. - # - # The :zero key is always picked directly when count equals 0 AND the - # translation data has the key :zero. This way translators are free to - # either pick a special :zero translation even for languages where the - # pluralizer does not return a :zero key. - def pluralize(locale, entry, count) - return entry unless entry.is_a?(Hash) && count - - pluralizer = pluralizer(locale) - if pluralizer.respond_to?(:call) - key = count == 0 && entry.has_key?(:zero) ? :zero : pluralizer.call(count) - raise InvalidPluralizationData.new(entry, count, key) unless entry.has_key?(key) - entry[key] - else - super - end - end - - protected - - def pluralizers - @pluralizers ||= {} - end - - def pluralizer(locale) - pluralizers[locale] ||= I18n.t(:'i18n.plural.rule', :locale => locale, :resolve => false) - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n.rb index e197e2b1c9..d3369704ab 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n.rb @@ -214,18 +214,12 @@ module I18n backend = config.backend - result = catch(:exception) do - if key.is_a?(Array) - key.map { |k| backend.translate(locale, k, options) } - else - backend.translate(locale, key, options) + if key.is_a?(Array) + key.map do |k| + translate_key(k, throw, raise, locale, backend, options) end - end - - if result.is_a?(MissingTranslation) - handle_exception((throw && :throw || raise && :raise), result, locale, key, options) else - result + translate_key(key, throw, raise, locale, backend, options) end end alias :t :translate @@ -364,6 +358,18 @@ module I18n private + def translate_key(key, throw, raise, locale, backend, options) + result = catch(:exception) do + backend.translate(locale, key, options) + end + + if result.is_a?(MissingTranslation) + handle_exception((throw && :throw || raise && :raise), result, locale, key, options) + else + result + end + end + # Any exceptions thrown in translate will be sent to the @@exception_handler # which can be a Symbol, a Proc or any other Object unless they're forced to # be raised or thrown (MissingTranslation). diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/base.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/base.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/base.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/base.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/cache.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/cache.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/cache.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/cache.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/cache_file.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/cache_file.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/cache_file.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/cache_file.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/cascade.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/cascade.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/cascade.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/cascade.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/fallbacks.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/fallbacks.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/fallbacks.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/fallbacks.rb index 7afbfe3a22..6d4d6e138d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/fallbacks.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/fallbacks.rb @@ -107,7 +107,7 @@ module I18n private # Overwrite on_fallback to add specified logic when the fallback succeeds. - def on_fallback(_original_locale, _fallback_locale, _key, _optoins) + def on_fallback(_original_locale, _fallback_locale, _key, _options) nil end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/flatten.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/flatten.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/flatten.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/flatten.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/gettext.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/gettext.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/gettext.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/gettext.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/interpolation_compiler.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/interpolation_compiler.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/interpolation_compiler.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/interpolation_compiler.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/key_value.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/key_value.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/key_value.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/key_value.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/lazy_loadable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/lazy_loadable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/lazy_loadable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/lazy_loadable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/memoize.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/memoize.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/memoize.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/memoize.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/metadata.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/metadata.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/metadata.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/metadata.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/pluralization.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/pluralization.rb new file mode 100644 index 0000000000..381ac13f9a --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/pluralization.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# I18n Pluralization are useful when you want your application to +# customize pluralization rules. +# +# To enable locale specific pluralizations you can simply include the +# Pluralization module to the Simple backend - or whatever other backend you +# are using. +# +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# +# You also need to make sure to provide pluralization algorithms to the +# backend, i.e. include them to your I18n.load_path accordingly. +module I18n + module Backend + module Pluralization + # Overwrites the Base backend translate method so that it will check the + # translation meta data space (:i18n) for a locale specific pluralization + # rule and use it to pluralize the given entry. I.e., the library expects + # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') + # + # Pluralization rules are expected to respond to #call(count) and + # return a pluralization key. Valid keys depend on the pluralization + # rules for the locale, as defined in the CLDR. + # As of v41, 6 locale-specific plural categories are defined: + # :few, :many, :one, :other, :two, :zero + # + # n.b., The :one plural category does not imply the number 1. + # Instead, :one is a category for any number that behaves like 1 in + # that locale. For example, in some locales, :one is used for numbers + # that end in "1" (like 1, 21, 151) but that don't end in + # 11 (like 11, 111, 10311). + # Similar notes apply to the :two, and :zero plural categories. + # + # If you want to have different strings for the categories of count == 0 + # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car") + # use the explicit `"0"` and `"1"` keys. + # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules + def pluralize(locale, entry, count) + return entry unless entry.is_a?(Hash) && count + + pluralizer = pluralizer(locale) + if pluralizer.respond_to?(:call) + # "0" and "1" are special cases + # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules + if count == 0 || count == 1 + value = entry[symbolic_count(count)] + return value if value + end + + # Lateral Inheritance of "count" attribute (http://www.unicode.org/reports/tr35/#Lateral_Inheritance): + # > If there is no value for a path, and that path has a [@count="x"] attribute and value, then: + # > 1. If "x" is numeric, the path falls back to the path with [@count=«the plural rules category for x for that locale»], within that the same locale. + # > 2. If "x" is anything but "other", it falls back to a path [@count="other"], within that the same locale. + # > 3. If "x" is "other", it falls back to the path that is completely missing the count item, within that the same locale. + # Note: We don't yet implement #3 above, since we haven't decided how lateral inheritance attributes should be represented. + plural_rule_category = pluralizer.call(count) + + value = if entry.has_key?(plural_rule_category) || entry.has_key?(:other) + entry[plural_rule_category] || entry[:other] + else + raise InvalidPluralizationData.new(entry, count, plural_rule_category) + end + else + super + end + end + + protected + + def pluralizers + @pluralizers ||= {} + end + + def pluralizer(locale) + pluralizers[locale] ||= I18n.t(:'i18n.plural.rule', :locale => locale, :resolve => false) + end + + private + + # Normalizes categories of 0.0 and 1.0 + # and returns the symbolic version + def symbolic_count(count) + count = 0 if count == 0 + count = 1 if count == 1 + count.to_s.to_sym + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/simple.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/simple.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/simple.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/simple.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/transliterator.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/transliterator.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/backend/transliterator.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/backend/transliterator.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/config.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/config.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/config.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/config.rb index ea3dd1ee72..9878e02e70 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/config.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/config.rb @@ -38,7 +38,7 @@ module I18n end # Returns an array of locales for which translations are available. - # Unless you explicitely set these through I18n.available_locales= + # Unless you explicitly set these through I18n.available_locales= # the call will be delegated to the backend. def available_locales @@available_locales ||= nil @@ -106,7 +106,7 @@ module I18n # if you don't care about arity. # # == Example: - # You can supress raising an exception and return string instead: + # You can suppress raising an exception and return string instead: # # I18n.config.missing_interpolation_argument_handler = Proc.new do |key| # "#{key} is missing" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/exceptions.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/exceptions.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/exceptions.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/exceptions.rb index f66e2076c8..74db4d34fc 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/exceptions.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/exceptions.rb @@ -24,7 +24,7 @@ module I18n been set is likely to display text from the wrong locale to some users. If you have a legitimate reason to access i18n data outside of the user flow, you can do so by passing - the desired locale explictly with the `locale` argument, e.g. `I18n.#{method}(..., locale: :en)` + the desired locale explicitly with the `locale` argument, e.g. `I18n.#{method}(..., locale: :en)` MESSAGE end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/gettext.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/gettext.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/gettext.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/gettext.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/gettext/helpers.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/gettext/helpers.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/gettext/helpers.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/gettext/helpers.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/gettext/po_parser.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/gettext/po_parser.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/gettext/po_parser.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/gettext/po_parser.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/interpolate/ruby.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/interpolate/ruby.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/interpolate/ruby.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/interpolate/ruby.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/fallbacks.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/fallbacks.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/fallbacks.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/fallbacks.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/parents.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/parents.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/parents.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/parents.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/rfc4646.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/rfc4646.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/rfc4646.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/rfc4646.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/simple.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/simple.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/simple.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/simple.rb index 6d9ab565cc..18d55c2861 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/locale/tag/simple.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/locale/tag/simple.rb @@ -1,5 +1,5 @@ # Simple Locale tag implementation that computes subtags by simply splitting -# the locale tag at '-' occurences. +# the locale tag at '-' occurrences. module I18n module Locale module Tag diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/middleware.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/middleware.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/middleware.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/middleware.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/utils.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/utils.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/utils.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/utils.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/version.rb similarity index 69% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/version.rb index bc754ba526..656c6a9d5d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.10.0/lib/i18n/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.11.0/lib/i18n/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module I18n - VERSION = "1.10.0" + VERSION = "1.11.0" end