Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #261 from samleb/master

Fix #261 (Using region code prevents from loading pluralization rules)
  • Loading branch information...
commit 0888635db2a6639f54eeb3bb166843dc090a6fc9 2 parents 2f43159 + dcbf0e5
@kuroda kuroda authored
Showing with 142 additions and 0 deletions.
  1. +19 −0 lib/rails_i18n/common_pluralizations/one_other.rb
  2. +3 −0  rails/pluralization/bg.rb
  3. +3 −0  rails/pluralization/bn.rb
  4. +3 −0  rails/pluralization/ca.rb
  5. +3 −0  rails/pluralization/da.rb
  6. +3 −0  rails/pluralization/de-AT.rb
  7. +3 −0  rails/pluralization/de-CH.rb
  8. +3 −0  rails/pluralization/de.rb
  9. +3 −0  rails/pluralization/el.rb
  10. +3 −0  rails/pluralization/en-AU.rb
  11. +3 −0  rails/pluralization/en-CA.rb
  12. +3 −0  rails/pluralization/en-GB.rb
  13. +3 −0  rails/pluralization/en-IN.rb
  14. +3 −0  rails/pluralization/en.rb
  15. +3 −0  rails/pluralization/eo.rb
  16. +3 −0  rails/pluralization/es-419.rb
  17. +3 −0  rails/pluralization/es-AR.rb
  18. +3 −0  rails/pluralization/es-CL.rb
  19. +3 −0  rails/pluralization/es-CO.rb
  20. +3 −0  rails/pluralization/es-MX.rb
  21. +3 −0  rails/pluralization/es-PE.rb
  22. +3 −0  rails/pluralization/es-VE.rb
  23. +3 −0  rails/pluralization/es.rb
  24. +3 −0  rails/pluralization/et.rb
  25. +3 −0  rails/pluralization/eu.rb
  26. +3 −0  rails/pluralization/fi.rb
  27. +3 −0  rails/pluralization/fr-CA.rb
  28. +3 −0  rails/pluralization/fr-CH.rb
  29. +3 −0  rails/pluralization/gl.rb
  30. +3 −0  rails/pluralization/hi-IN.rb
  31. +3 −0  rails/pluralization/is.rb
  32. +3 −0  rails/pluralization/it-CH.rb
  33. +3 −0  rails/pluralization/it.rb
  34. +3 −0  rails/pluralization/mn.rb
  35. +3 −0  rails/pluralization/nb.rb
  36. +3 −0  rails/pluralization/ne.rb
  37. +3 −0  rails/pluralization/nl.rb
  38. +3 −0  rails/pluralization/nn.rb
  39. +3 −0  rails/pluralization/sv.rb
  40. +3 −0  rails/pluralization/sw.rb
  41. +3 −0  rails/pluralization/zh-CN.rb
  42. +3 −0  rails/pluralization/zh-TW.rb
View
19 lib/rails_i18n/common_pluralizations/one_other.rb
@@ -0,0 +1,19 @@
+# Used as "default" pluralization rule
+
+module RailsI18n
+ module Pluralization
+ module OneOther
+ def self.rule
+ lambda { |n| n == 1 ? :one : :other }
+ end
+
+ def self.with_locale(locale)
+ { locale => {
+ :'i18n' => {
+ :plural => {
+ :keys => [:one, :other],
+ :rule => rule }}}}
+ end
+ end
+ end
+end
View
3  rails/pluralization/bg.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:bg)
View
3  rails/pluralization/bn.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:bn)
View
3  rails/pluralization/ca.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:ca)
View
3  rails/pluralization/da.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:da)
View
3  rails/pluralization/de-AT.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'de-AT')
View
3  rails/pluralization/de-CH.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'de-CH')
View
3  rails/pluralization/de.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:de)
View
3  rails/pluralization/el.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:el)
View
3  rails/pluralization/en-AU.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'en-AU')
View
3  rails/pluralization/en-CA.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'en-CA')
View
3  rails/pluralization/en-GB.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'en-GB')
View
3  rails/pluralization/en-IN.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'en-IN')
View
3  rails/pluralization/en.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:en)
View
3  rails/pluralization/eo.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:eo)
View
3  rails/pluralization/es-419.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-419')
View
3  rails/pluralization/es-AR.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-AR')
View
3  rails/pluralization/es-CL.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-CL')
View
3  rails/pluralization/es-CO.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-CO')
View
3  rails/pluralization/es-MX.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-MX')
View
3  rails/pluralization/es-PE.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-PE')
View
3  rails/pluralization/es-VE.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'es-VE')
View
3  rails/pluralization/es.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:es)
View
3  rails/pluralization/et.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:et)
View
3  rails/pluralization/eu.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:eu)
View
3  rails/pluralization/fi.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:fi)
View
3  rails/pluralization/fr-CA.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_upto_two_other'
+
+::RailsI18n::Pluralization::OneUptoTwoOther.with_locale(:'fr-CA')
View
3  rails/pluralization/fr-CH.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_upto_two_other'
+
+::RailsI18n::Pluralization::OneUptoTwoOther.with_locale(:'fr-CH')
View
3  rails/pluralization/gl.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:gl)
View
3  rails/pluralization/hi-IN.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_with_zero_other'
+
+::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:'hi-IN')
View
3  rails/pluralization/is.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:is)
View
3  rails/pluralization/it-CH.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:'it-CH')
View
3  rails/pluralization/it.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:it)
View
3  rails/pluralization/mn.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:mn)
View
3  rails/pluralization/nb.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:nb)
View
3  rails/pluralization/ne.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:ne)
View
3  rails/pluralization/nl.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:nl)
View
3  rails/pluralization/nn.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:nn)
View
3  rails/pluralization/sv.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:sv)
View
3  rails/pluralization/sw.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/one_other'
+
+::RailsI18n::Pluralization::OneOther.with_locale(:sw)
View
3  rails/pluralization/zh-CN.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/other'
+
+::RailsI18n::Pluralization::Other.with_locale(:'zh-CN')
View
3  rails/pluralization/zh-TW.rb
@@ -0,0 +1,3 @@
+require 'rails_i18n/common_pluralizations/other'
+
+::RailsI18n::Pluralization::Other.with_locale(:'zh-TW')
Please sign in to comment.
Something went wrong with that request. Please try again.