Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bump i18n from 1.6.0 to 1.7.0 in /Library/Homebrew #6535

Merged
merged 2 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GEM
hpricot (0.8.6)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.6.0)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.3)
json (2.2.0)
Expand Down
122 changes: 61 additions & 61 deletions Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,65 @@
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.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.12.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thread_safe-0.3.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-1.2.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-5.2.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/backports-3.15.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/concurrent-ruby-1.1.5/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/i18n-1.7.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/minitest-5.12.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/thread_safe-0.3.6/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/tzinfo-1.2.5/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/activesupport-5.2.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/ast-2.4.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/backports-3.15.0/lib"
$:.unshift "#{path}/"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/connection_pool-2.2.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/json-2.2.0"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/json-2.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.3.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.10.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.16.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tins-1.21.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/term-ansicolor-1.7.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-0.20.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/coveralls-0.8.23/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/diff-lcs-1.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.6"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unf_ext-0.0.7.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unf-0.1.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/domain_name-0.5.20190701/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/hpricot-0.8.6"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/hpricot-0.8.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/http-cookie-1.0.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.3"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/jaro_winkler-1.5.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-data-3.2019.0904/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mime-types-3.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-digest_auth-1.4.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/net-http-persistent-3.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mini_portile2-2.4.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.4"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/nokogiri-1.10.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ntlm-http-0.1.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mechanize-2.7.6/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mustache-1.1.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.17.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-2.29.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.6.5.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/universal-darwin-18/2.3.0/rdiscount-2.2.0.1"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rdiscount-2.2.0.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ronn-0.7.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-support-3.8.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-core-3.8.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-expectations-3.8.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-mocks-3.8.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-3.8.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-its-1.3.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-retry-0.6.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.75.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.5.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.36.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/connection_pool-2.2.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/extensions/universal-darwin-19/2.6.0/json-2.2.0"
$:.unshift "#{path}/../ruby/2.3.0/gems/json-2.2.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/docile-1.3.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/simplecov-html-0.10.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/simplecov-0.16.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/tins-1.21.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/term-ansicolor-1.7.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/thor-0.20.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/coveralls-0.8.23/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/diff-lcs-1.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.6"
$:.unshift "#{path}/../ruby/2.3.0/gems/unf_ext-0.0.7.6/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/unf-0.1.4/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/domain_name-0.5.20190701/lib"
$:.unshift "#{path}/../ruby/2.3.0/extensions/universal-darwin-19/2.6.0/hpricot-0.8.6"
$:.unshift "#{path}/../ruby/2.3.0/gems/hpricot-0.8.6/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/http-cookie-1.0.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/extensions/universal-darwin-19/2.6.0/jaro_winkler-1.5.3"
$:.unshift "#{path}/../ruby/2.3.0/gems/jaro_winkler-1.5.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/mime-types-data-3.2019.0904/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/mime-types-3.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/net-http-digest_auth-1.4.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/net-http-persistent-3.1.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/mini_portile2-2.4.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/extensions/universal-darwin-19/2.6.0/nokogiri-1.10.4"
$:.unshift "#{path}/../ruby/2.3.0/gems/nokogiri-1.10.4/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/ntlm-http-0.1.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/webrobots-0.1.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/mechanize-2.7.6/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/mustache-1.1.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/parallel-1.17.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/parallel_tests-2.29.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/parser-2.6.5.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/plist-3.5.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rainbow-3.0.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/extensions/universal-darwin-19/2.6.0/rdiscount-2.2.0.1"
$:.unshift "#{path}/../ruby/2.3.0/gems/rdiscount-2.2.0.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/ronn-0.7.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-support-3.8.3/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-core-3.8.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-expectations-3.8.5/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-mocks-3.8.2/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-3.8.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-its-1.3.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-retry-0.6.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rspec-wait-0.0.9/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/ruby-progressbar-1.10.1/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/unicode-display_width-1.6.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rubocop-0.75.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rubocop-performance-1.5.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/rubocop-rspec-1.36.0/lib"
$:.unshift "#{path}/../ruby/2.3.0/gems/ruby-macho-2.2.0/lib"
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def eager_load!
# *PLURALIZATION*
#
# Translation data can contain pluralized translations. Pluralized translations
# are arrays of singluar/plural versions of translations like <tt>['Foo', 'Foos']</tt>.
# are arrays of singular/plural versions of translations like <tt>['Foo', 'Foos']</tt>.
#
# Note that <tt>I18n::Backend::Simple</tt> only supports an algorithm for English
# pluralization rules. Other algorithms can be supported by custom backends.
Expand Down Expand Up @@ -173,7 +173,7 @@ def eager_load!
#
# It is recommended to use/implement lambdas in an "idempotent" way. E.g. when
# a cache layer is put in front of I18n.translate it will generate a cache key
# from the argument values passed to #translate. Therefor your lambdas should
# from the argument values passed to #translate. Therefore your lambdas should
# always return the same translations/values per unique combination of argument
# values.
def translate(key = nil, *, throw: false, raise: false, locale: nil, **options) # TODO deprecate :raise
Expand Down Expand Up @@ -202,7 +202,7 @@ def translate(key = nil, *, throw: false, raise: false, locale: nil, **options)
# Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
# this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
def translate!(key, options = EMPTY_HASH)
translate(key, options.merge(:raise => true))
translate(key, **options.merge(:raise => true))
end
alias :t! :translate!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def localize(locale, object, format = :default, options = EMPTY_HASH)
key = format
type = object.respond_to?(:sec) ? 'time' : 'date'
options = options.merge(:raise => true, :object => object, :locale => locale)
format = I18n.t(:"#{type}.formats.#{key}", options)
format = I18n.t(:"#{type}.formats.#{key}", **options)
end

format = translate_localization_format(locale, object, format, options)
Expand Down Expand Up @@ -122,7 +122,7 @@ def subtrees?
# first translation that can be resolved. Otherwise it tries to resolve
# the translation directly.
def default(locale, object, subject, options = EMPTY_HASH)
options = options.dup.reject { |key, value| key == :default }
options = options.reject { |key, value| key == :default }
case subject
when Array
subject.each do |item|
Expand All @@ -143,7 +143,7 @@ def resolve(locale, object, subject, options = EMPTY_HASH)
result = catch(:exception) do
case subject
when Symbol
I18n.translate(subject, options.merge(:locale => locale, :throw => true))
I18n.translate(subject, **options.merge(:locale => locale, :throw => true))
when Proc
date_or_time = options.delete(:object) || object
resolve(locale, object, subject.call(date_or_time, options))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ def init_translations
end

def translations
backends.first.instance_eval do
init_translations unless initialized?
translations
backends.reverse.each_with_object({}) do |backend, memo|
partial_translations = backend.instance_eval do
init_translations unless initialized?
translations
end

memo.deep_merge!(partial_translations)
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ module Backend
class Simple
using I18n::HashRefinements

(class << self; self; end).class_eval { public :include }

module Implementation
include Base

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def N_(msgsid)
end

def gettext(msgid, options = EMPTY_HASH)
I18n.t(msgid, { :default => msgid, :separator => '|' }.merge(options))
I18n.t(msgid, **{:default => msgid, :separator => '|'}.merge(options))
end
alias _ gettext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module I18n
DEFAULT_INTERPOLATION_PATTERNS = [
/%%/,
/%\{(\w+)\}/, # matches placeholders like "%{foo}"
/%\{([\w|]+)\}/, # matches placeholders like "%{foo} or %{foo|word}"
/%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%<foo>.d"
].freeze
INTERPOLATION_PATTERN = Regexp.union(DEFAULT_INTERPOLATION_PATTERNS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def defaults=(defaults)

def [](locale)
raise InvalidLocale.new(locale) if locale.nil?
raise Disabled.new('fallback#[]') if locale == false
locale = locale.to_sym
super || store(locale, compute(locale))
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module I18n
VERSION = "1.6.0"
VERSION = "1.7.0"
end