Hello community, here is the log from the commit of package rubygem-i18n for openSUSE:Factory checked in at 2020-01-27 20:18:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-i18n (Old) and /work/SRC/openSUSE:Factory/.rubygem-i18n.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-i18n" Mon Jan 27 20:18:10 2020 rev:26 rq:767645 version:1.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-i18n/rubygem-i18n.changes 2019-11-13 13:26:35.743589412 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-i18n.new.26092/rubygem-i18n.changes 2020-01-27 20:18:18.188554231 +0100 @@ -1,0 +2,20 @@ +Tue Jan 14 09:52:29 UTC 2020 - Dan Čermák <[email protected]> + +- New upstream release 1.8.2 + + 1.7.1: + - I18n is now tested with GitHub Actions, instead of Travis CI. + - Fixed issue introduced in v1.7.0 (04a814b) where count option was not preserved - #503 + - #501 adds a comment that explains that you will need to double-splat keyword arguments given to I18n.t to avoid warnings in Ruby 2.7. + + 1.8.0: + - Use Rails' implementation of deep_merge when chaining fallback backends - #499. + + 1.8.1: + - Reverted #499 in #508 due to #507 - missing deep_merge method. + + 1.8.2: + - Restoration of #499 via #509 - deep_merge! & deep_merge methods appear again in the Hash refinement. + - An issue was introduced in v1.7.0 where some translations were returned as hashes, see #510. This was fixed in 1b5e345, and is available in this release. + +------------------------------------------------------------------- Old: ---- i18n-1.7.0.gem New: ---- i18n-1.8.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-i18n.spec ++++++ --- /var/tmp/diff_new_pack.QSjaqi/_old 2020-01-27 20:18:18.920554678 +0100 +++ /var/tmp/diff_new_pack.QSjaqi/_new 2020-01-27 20:18:18.924554680 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-i18n # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-i18n -Version: 1.7.0 +Version: 1.8.2 Release: 0 %define mod_name i18n %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{ruby >= 2.3.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 -Url: https://github.com/ruby-i18n/i18n +URL: https://github.com/ruby-i18n/i18n Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: New wave Internationalization support for Ruby ++++++ i18n-1.7.0.gem -> i18n-1.8.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2019-10-04 08:07:14.000000000 +0200 +++ new/README.md 2020-01-13 02:28:55.000000000 +0100 @@ -1,6 +1,6 @@ # Ruby I18n -[](https://travis-ci.org/ruby-i18n/i18n) +[](https://github.com/ruby-i18n/i18n/actions?query=workflow%3ARuby) Ruby Internationalization and localization solution. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/backend/base.rb new/lib/i18n/backend/base.rb --- old/lib/i18n/backend/base.rb 2019-10-04 08:07:14.000000000 +0200 +++ new/lib/i18n/backend/base.rb 2020-01-13 02:28:55.000000000 +0100 @@ -163,7 +163,7 @@ # not standard with regards to the CLDR pluralization rules. # Other backends can implement more flexible or complex pluralization rules. def pluralize(locale, entry, count) - return entry unless entry.is_a?(Hash) && count + return entry unless entry.is_a?(Hash) && count && entry.values.none? { |v| v.is_a?(Hash) } key = pluralization_key(entry, count) raise InvalidPluralizationData.new(entry, count, key) unless entry.has_key?(key) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/backend/pluralization.rb new/lib/i18n/backend/pluralization.rb --- old/lib/i18n/backend/pluralization.rb 2019-10-04 08:07:14.000000000 +0200 +++ new/lib/i18n/backend/pluralization.rb 2020-01-13 02:28:55.000000000 +0100 @@ -29,7 +29,7 @@ # 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) and count + return entry unless entry.is_a?(Hash) && count pluralizer = pluralizer(locale) if pluralizer.respond_to?(:call) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/tests/link.rb new/lib/i18n/tests/link.rb --- old/lib/i18n/tests/link.rb 2019-10-04 08:07:14.000000000 +0200 +++ new/lib/i18n/tests/link.rb 2020-01-13 02:28:55.000000000 +0100 @@ -26,7 +26,7 @@ } assert_equal('linked', I18n.backend.translate('en', :'foo.link')) end - + test "linked lookup: if a dot-separated key resolves to a dot-separated symbol it looks up the symbol" do I18n.backend.store_translations 'en', { :foo => { :link => :"bar.linked" }, @@ -51,6 +51,16 @@ assert_equal "can't be blank", I18n.t(:"activerecord.errors.messages.blank") assert_equal "can't be blank", I18n.t(:"activerecord.errors.messages.blank") end + + test "linked lookup: a link can resolve with option :count" do + I18n.backend.store_translations 'en', { + :counter => :counted, + :counted => { :foo => { :one => "one", :other => "other" }, :bar => "bar" } + } + assert_equal "one", I18n.t(:'counter.foo', count: 1) + assert_equal "other", I18n.t(:'counter.foo', count: 2) + assert_equal "bar", I18n.t(:'counter.bar', count: 3) + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n/version.rb new/lib/i18n/version.rb --- old/lib/i18n/version.rb 2019-10-04 08:07:14.000000000 +0200 +++ new/lib/i18n/version.rb 2020-01-13 02:28:55.000000000 +0100 @@ -1,5 +1,5 @@ # frozen_string_literal: true module I18n - VERSION = "1.7.0" + VERSION = "1.8.2" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/i18n.rb new/lib/i18n.rb --- old/lib/i18n.rb 2019-10-04 08:07:14.000000000 +0200 +++ new/lib/i18n.rb 2020-01-13 02:28:55.000000000 +0100 @@ -176,6 +176,22 @@ # from the argument values passed to #translate. Therefore your lambdas should # always return the same translations/values per unique combination of argument # values. + # + # *Ruby 2.7+ keyword arguments warning* + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # def translate(key = nil, *, throw: false, raise: false, locale: nil, **options) # TODO deprecate :raise locale ||= config.locale raise Disabled.new('t') if locale == false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-10-04 08:07:14.000000000 +0200 +++ new/metadata 2020-01-13 02:28:55.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: i18n version: !ruby/object:Gem::Version - version: 1.7.0 + version: 1.8.2 platform: ruby authors: - Sven Fuchs @@ -13,7 +13,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2019-10-04 00:00:00.000000000 Z +date: 2020-01-13 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: concurrent-ruby @@ -95,11 +95,15 @@ HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. + If you are upgrading your Rails application from an older version of Rails: + Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. + If you are starting a NEW Rails application, you can ignore this notice. + For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
