]> git.openstreetmap.org Git - rails.git/commitdiff
Update rails-i18n to 0.5.1
authorTom Hughes <tom@compton.nu>
Fri, 2 Mar 2012 09:19:12 +0000 (09:19 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 2 Mar 2012 09:19:12 +0000 (09:19 +0000)
This update allows us to drop our pluralization support, as rails-i18n
now takes care of that, and for a far wider range of locales.

Gemfile
Gemfile.lock
config/initializers/i18n.rb
config/pluralizers.rb [deleted file]

diff --git a/Gemfile b/Gemfile
index d05f544b82b99bb9d9114b83e3f4e1f614b11570..74f6009b671349105da6cbb870d9fe725748e75f 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -11,7 +11,7 @@ gem 'pg'
 gem 'jquery-rails'
 
 # Load rails plugins
 gem 'jquery-rails'
 
 # Load rails plugins
-gem 'rails-i18n'
+gem 'rails-i18n', ">= 0.5.1"
 gem 'dynamic_form'
 gem 'rinku', '>= 1.2.2', :require => 'rails_rinku'
 gem 'oauth-plugin', '>= 0.4.0.pre7'
 gem 'dynamic_form'
 gem 'rinku', '>= 1.2.2', :require => 'rails_rinku'
 gem 'oauth-plugin', '>= 0.4.0.pre7'
index 6028ebf4c3b494ddbbab20730c759d965e5ad14e..56efbdc7ee8ae690a86610dd92abe9565fefecd1 100644 (file)
@@ -108,7 +108,7 @@ GEM
       activesupport (= 3.2.1)
       bundler (~> 1.0)
       railties (= 3.2.1)
       activesupport (= 3.2.1)
       bundler (~> 1.0)
       railties (= 3.2.1)
-    rails-i18n (0.4.0)
+    rails-i18n (0.5.1)
       i18n (~> 0.5)
     railties (3.2.1)
       actionpack (= 3.2.1)
       i18n (~> 0.5)
     railties (3.2.1)
       actionpack (= 3.2.1)
@@ -167,7 +167,7 @@ DEPENDENCIES
   paperclip (~> 2.0)
   pg
   rails (= 3.2.1)
   paperclip (~> 2.0)
   pg
   rails (= 3.2.1)
-  rails-i18n
+  rails-i18n (>= 0.5.1)
   rinku (>= 1.2.2)
   sanitize
   sass-rails (~> 3.2.3)
   rinku (>= 1.2.2)
   sanitize
   sass-rails (~> 3.2.3)
index 3c3ba872c2c33e851e5bc3a7f1ddaa0d49d0764b..7aafc91ebdbb7c0c26f01af95b18d89f7c0fadb4 100644 (file)
@@ -18,10 +18,7 @@ module I18n
   end
 end
 
   end
 end
 
-I18n::Backend::Simple.include(I18n::Backend::Pluralization)
 I18n::Backend::Simple.include(I18n::Backend::PluralizationFallback)
 I18n::Backend::Simple.include(I18n::Backend::PluralizationFallback)
-I18n.load_path << "#{Rails.root}/config/pluralizers.rb"
-
 I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
 
 I18n.fallbacks.map("no" => "nb")
 I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
 
 I18n.fallbacks.map("no" => "nb")
diff --git a/config/pluralizers.rb b/config/pluralizers.rb
deleted file mode 100644 (file)
index 6e0c741..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-  :ar => {
-    :i18n => {
-      :plural => {
-        :rule => lambda { |count|
-          case count
-            when 1 then :one
-            when 2 then :two
-            else case count % 100
-                   when 3..10 then :few
-                   when 11..99 then :many
-                   else :other
-                 end
-          end
-        } 
-      }
-    }
-  },
-  :ru => {
-    :i18n => {
-      :plural => {
-        :rule => lambda { |count|
-          case count % 100
-            when 11,12,13,14 then :many
-            else case count % 10
-                   when 1 then :one
-                   when 2,3,4 then :few
-                   when 5,6,7,8,9,0 then :many
-                   else :other
-                 end
-          end
-        }
-      }
-    }
-  },
-  :sl => {
-    :i18n => {
-      :plural => {
-        :rule => lambda { |count|
-          case count % 100
-            when 1 then :one
-            when 2 then :two
-            when 3,4 then :few
-            else :other
-          end
-        }
-      }
-    }
-  }
-}