Hello community,

here is the log from the commit of package rubygem-i18n for openSUSE:Factory 
checked in at 2019-01-28 20:49:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-i18n (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-i18n.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-i18n"

Mon Jan 28 20:49:26 2019 rev:23 rq:668981 version:1.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-i18n/rubygem-i18n.changes        
2019-01-21 10:52:52.147836279 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-i18n.new.28833/rubygem-i18n.changes     
2019-01-28 20:50:20.693784957 +0100
@@ -1,0 +2,8 @@
+Mon Jan 28 07:53:12 UTC 2019 - mschnit...@suse.com
+
+- updated to version 1.5.3
+
+  * Fix issue where localize would return strange messages if the
+    translation was missing - #464
+
+-------------------------------------------------------------------

Old:
----
  i18n-1.5.2.gem

New:
----
  i18n-1.5.3.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-i18n.spec ++++++
--- /var/tmp/diff_new_pack.EMsQii/_old  2019-01-28 20:50:21.761783830 +0100
+++ /var/tmp/diff_new_pack.EMsQii/_new  2019-01-28 20:50:21.769783822 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-i18n
-Version:        1.5.2
+Version:        1.5.3
 Release:        0
 %define mod_name i18n
 %define mod_full_name %{mod_name}-%{version}

++++++ i18n-1.5.2.gem -> i18n-1.5.3.gem ++++++
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-01-14 05:28:08.000000000 +0100
+++ new/lib/i18n/backend/base.rb        2019-01-21 22:38:30.000000000 +0100
@@ -250,14 +250,16 @@
         def translate_localization_format(locale, object, format, options)
           format.to_s.gsub(/%[aAbBpP]/) do |match|
             case match
-            when '%a' then I18n.t(:"date.abbr_day_names",                  
:locale => locale, :format => format)[object.wday]
-            when '%A' then I18n.t(:"date.day_names",                       
:locale => locale, :format => format)[object.wday]
-            when '%b' then I18n.t(:"date.abbr_month_names",                
:locale => locale, :format => format)[object.mon]
-            when '%B' then I18n.t(:"date.month_names",                     
:locale => locale, :format => format)[object.mon]
-            when '%p' then I18n.t(:"time.#{object.hour < 12 ? :am : :pm}", 
:locale => locale, :format => format).upcase if object.respond_to? :hour
-            when '%P' then I18n.t(:"time.#{object.hour < 12 ? :am : :pm}", 
:locale => locale, :format => format).downcase if object.respond_to? :hour
+            when '%a' then I18n.t!(:"date.abbr_day_names",                  
:locale => locale, :format => format)[object.wday]
+            when '%A' then I18n.t!(:"date.day_names",                       
:locale => locale, :format => format)[object.wday]
+            when '%b' then I18n.t!(:"date.abbr_month_names",                
:locale => locale, :format => format)[object.mon]
+            when '%B' then I18n.t!(:"date.month_names",                     
:locale => locale, :format => format)[object.mon]
+            when '%p' then I18n.t!(:"time.#{object.hour < 12 ? :am : :pm}", 
:locale => locale, :format => format).upcase if object.respond_to? :hour
+            when '%P' then I18n.t!(:"time.#{object.hour < 12 ? :am : :pm}", 
:locale => locale, :format => format).downcase if object.respond_to? :hour
             end
           end
+        rescue MissingTranslationData => e
+          e.message
         end
 
         def pluralization_key(entry, count)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/i18n/tests/localization/date.rb 
new/lib/i18n/tests/localization/date.rb
--- old/lib/i18n/tests/localization/date.rb     2019-01-14 05:28:08.000000000 
+0100
+++ new/lib/i18n/tests/localization/date.rb     2019-01-21 22:38:30.000000000 
+0100
@@ -40,6 +40,10 @@
           assert_equal 'Mar', I18n.l(@date, :format => '%b', :locale => :de)
         end
 
+        test "localize Date: given missing translations it returns the correct 
error message" do
+          assert_equal 'translation missing: fr.date.abbr_month_names', 
I18n.l(@date, :format => '%b', :locale => :fr)
+        end
+
         test "localize Date: given an unknown format it does not fail" do
           assert_nothing_raised { I18n.l(@date, :format => '%x') }
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/i18n/tests/localization/date_time.rb 
new/lib/i18n/tests/localization/date_time.rb
--- old/lib/i18n/tests/localization/date_time.rb        2019-01-14 
05:28:08.000000000 +0100
+++ new/lib/i18n/tests/localization/date_time.rb        2019-01-21 
22:38:30.000000000 +0100
@@ -42,6 +42,10 @@
           assert_equal 'Mar', I18n.l(@datetime, :format => '%b', :locale => 
:de)
         end
 
+        test "localize DateTime: given missing translations it returns the 
correct error message" do
+          assert_equal 'translation missing: fr.date.abbr_month_names', 
I18n.l(@datetime, :format => '%b', :locale => :fr)
+        end
+
         test "localize DateTime: given a meridian indicator format it returns 
the correct meridian indicator" do
           assert_equal 'AM', I18n.l(@datetime, :format => '%p', :locale => :de)
           assert_equal 'PM', I18n.l(@other_datetime, :format => '%p', :locale 
=> :de)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/i18n/tests/localization/time.rb 
new/lib/i18n/tests/localization/time.rb
--- old/lib/i18n/tests/localization/time.rb     2019-01-14 05:28:08.000000000 
+0100
+++ new/lib/i18n/tests/localization/time.rb     2019-01-21 22:38:30.000000000 
+0100
@@ -42,6 +42,10 @@
           assert_equal 'Mar', I18n.l(@time, :format => '%b', :locale => :de)
         end
 
+        test "localize Time: given missing translations it returns the correct 
error message" do
+          assert_equal 'translation missing: fr.date.abbr_month_names', 
I18n.l(@time, :format => '%b', :locale => :fr)
+        end
+
         test "localize Time: given a meridian indicator format it returns the 
correct meridian indicator" do
           assert_equal 'AM', I18n.l(@time, :format => '%p', :locale => :de)
           assert_equal 'PM', I18n.l(@other_time, :format => '%p', :locale => 
:de)
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-01-14 05:28:08.000000000 +0100
+++ new/lib/i18n/version.rb     2019-01-21 22:38:30.000000000 +0100
@@ -1,5 +1,5 @@
 # frozen_string_literal: true
 
 module I18n
-  VERSION = "1.5.2"
+  VERSION = "1.5.3"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-01-14 05:28:08.000000000 +0100
+++ new/metadata        2019-01-21 22:38:30.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: i18n
 version: !ruby/object:Gem::Version
-  version: 1.5.2
+  version: 1.5.3
 platform: ruby
 authors:
 - Sven Fuchs
@@ -13,7 +13,7 @@
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2019-01-14 00:00:00.000000000 Z
+date: 2019-01-21 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   requirement: !ruby/object:Gem::Requirement


Reply via email to