rails-i18n 0.4.0 → 0.5.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/README.md +5 -0
  2. data/lib/rails_i18n/common_pluralizations/east_slavic.rb +35 -0
  3. data/lib/rails_i18n/common_pluralizations/one_two_other.rb +30 -0
  4. data/lib/rails_i18n/common_pluralizations/one_upto_two_other.rb +19 -0
  5. data/lib/rails_i18n/common_pluralizations/one_with_zero_other.rb +20 -0
  6. data/lib/rails_i18n/common_pluralizations/other.rb +17 -0
  7. data/lib/rails_i18n/common_pluralizations/romanian.rb +27 -0
  8. data/lib/rails_i18n/common_pluralizations/west_slavic.rb +27 -0
  9. data/lib/rails_i18n/railtie.rb +18 -5
  10. data/rails/locale/ja.yml +1 -1
  11. data/rails/pluralization/ak.rb +3 -0
  12. data/rails/pluralization/am.rb +3 -0
  13. data/rails/pluralization/ar.rb +31 -0
  14. data/rails/pluralization/az.rb +3 -0
  15. data/rails/pluralization/be.rb +3 -0
  16. data/rails/pluralization/bh.rb +3 -0
  17. data/rails/pluralization/bm.rb +3 -0
  18. data/rails/pluralization/bo.rb +3 -0
  19. data/rails/pluralization/br.rb +30 -0
  20. data/rails/pluralization/bs.rb +3 -0
  21. data/rails/pluralization/cs.rb +3 -0
  22. data/rails/pluralization/cy.rb +24 -0
  23. data/rails/pluralization/dz.rb +3 -0
  24. data/rails/pluralization/fa.rb +3 -0
  25. data/rails/pluralization/ff.rb +3 -0
  26. data/rails/pluralization/fil.rb +3 -0
  27. data/rails/pluralization/fr.rb +3 -0
  28. data/rails/pluralization/ga.rb +27 -0
  29. data/rails/pluralization/gd.rb +25 -0
  30. data/rails/pluralization/guw.rb +3 -0
  31. data/rails/pluralization/gv.rb +21 -0
  32. data/rails/pluralization/hi.rb +3 -0
  33. data/rails/pluralization/hr.rb +3 -0
  34. data/rails/pluralization/hu.rb +3 -0
  35. data/rails/pluralization/id.rb +3 -0
  36. data/rails/pluralization/ig.rb +3 -0
  37. data/rails/pluralization/ii.rb +3 -0
  38. data/rails/pluralization/iu.rb +3 -0
  39. data/rails/pluralization/ja.rb +3 -0
  40. data/rails/pluralization/jv.rb +3 -0
  41. data/rails/pluralization/ka.rb +3 -0
  42. data/rails/pluralization/kab.rb +3 -0
  43. data/rails/pluralization/kde.rb +3 -0
  44. data/rails/pluralization/kea.rb +3 -0
  45. data/rails/pluralization/km.rb +3 -0
  46. data/rails/pluralization/kn.rb +3 -0
  47. data/rails/pluralization/ko.rb +3 -0
  48. data/rails/pluralization/ksh.rb +23 -0
  49. data/rails/pluralization/kw.rb +3 -0
  50. data/rails/pluralization/lag.rb +23 -0
  51. data/rails/pluralization/ln.rb +3 -0
  52. data/rails/pluralization/lo.rb +3 -0
  53. data/rails/pluralization/lt.rb +26 -0
  54. data/rails/pluralization/lv.rb +23 -0
  55. data/rails/pluralization/mg.rb +3 -0
  56. data/rails/pluralization/mk.rb +21 -0
  57. data/rails/pluralization/mo.rb +3 -0
  58. data/rails/pluralization/ms.rb +3 -0
  59. data/rails/pluralization/mt.rb +27 -0
  60. data/rails/pluralization/my.rb +3 -0
  61. data/rails/pluralization/naq.rb +3 -0
  62. data/rails/pluralization/nso.rb +3 -0
  63. data/rails/pluralization/pl.rb +28 -0
  64. data/rails/pluralization/ro.rb +3 -0
  65. data/rails/pluralization/root.rb +3 -0
  66. data/rails/pluralization/ru.rb +3 -0
  67. data/rails/pluralization/sah.rb +3 -0
  68. data/rails/pluralization/se.rb +3 -0
  69. data/rails/pluralization/ses.rb +3 -0
  70. data/rails/pluralization/sg.rb +3 -0
  71. data/rails/pluralization/sh.rb +3 -0
  72. data/rails/pluralization/shi.rb +3 -0
  73. data/rails/pluralization/sk.rb +3 -0
  74. data/rails/pluralization/sl.rb +27 -0
  75. data/rails/pluralization/sma.rb +3 -0
  76. data/rails/pluralization/smi.rb +3 -0
  77. data/rails/pluralization/smj.rb +3 -0
  78. data/rails/pluralization/smn.rb +3 -0
  79. data/rails/pluralization/sms.rb +3 -0
  80. data/rails/pluralization/sr.rb +3 -0
  81. data/rails/pluralization/th.rb +3 -0
  82. data/rails/pluralization/ti.rb +3 -0
  83. data/rails/pluralization/tl.rb +3 -0
  84. data/rails/pluralization/to.rb +3 -0
  85. data/rails/pluralization/tr.rb +3 -0
  86. data/rails/pluralization/tzm.rb +21 -0
  87. data/rails/pluralization/uk.rb +3 -0
  88. data/rails/pluralization/vi.rb +3 -0
  89. data/rails/pluralization/wa.rb +3 -0
  90. data/rails/pluralization/wo.rb +3 -0
  91. data/rails/pluralization/yo.rb +3 -0
  92. data/rails/pluralization/zh.rb +3 -0
  93. data/rails/transliteration/bg.yml +64 -0
  94. data/rails/transliteration/ru.rb +72 -0
  95. metadata +107 -24
  96. data/will_paginate/bg.yml +0 -4
  97. data/will_paginate/en-GB.yml +0 -18
  98. data/will_paginate/en-US.yml +0 -18
  99. data/will_paginate/hu.yml +0 -5
  100. data/will_paginate/ja.yml +0 -18
  101. data/will_paginate/nl.yml +0 -5
  102. data/will_paginate/ro.yml +0 -4
  103. data/will_paginate/sk.yml +0 -19
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_with_zero_other'
2
+
3
+ ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:guw)
@@ -0,0 +1,21 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Manx
4
+ def self.rule
5
+ lambda do |n|
6
+ if [1, 2].include?(n % 10) || n % 20 == 0
7
+ :one
8
+ else
9
+ :other
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ { :gv => {
18
+ :'i18n' => {
19
+ :plural => {
20
+ :keys => [:one, :other],
21
+ :rule => RailsI18n::Pluralization::Manx.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_with_zero_other'
2
+
3
+ ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:hi)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/east_slavic'
2
+
3
+ ::RailsI18n::Pluralization::EastSlavic.with_locale(:hr)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:hu)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:id)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ig)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ii)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:iu)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ja)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:jv)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ka)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_upto_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneUptoTwoOther.with_locale(:kab)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:kde)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:kea)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:km)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:kn)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ko)
@@ -0,0 +1,23 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Colognian
4
+ def self.rule
5
+ lambda do |n|
6
+ if n == 0
7
+ :zero
8
+ elsif n == 1
9
+ :one
10
+ else
11
+ :other
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ { :ksh => {
20
+ :'i18n' => {
21
+ :plural => {
22
+ :keys => [:zero, :one, :other],
23
+ :rule => RailsI18n::Pluralization::Colognian.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:kw)
@@ -0,0 +1,23 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Langi
4
+ def self.rule
5
+ lambda do |n|
6
+ if n == 0
7
+ :zero
8
+ elsif (0...2).cover?(n)
9
+ :one
10
+ else
11
+ :other
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ { :lag => {
20
+ :'i18n' => {
21
+ :plural => {
22
+ :keys => [:zero, :one, :other],
23
+ :rule => RailsI18n::Pluralization::Langi.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_with_zero_other'
2
+
3
+ ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:ln)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:lo)
@@ -0,0 +1,26 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Lithuanian
4
+ def self.rule
5
+ lambda do |n|
6
+ mod10 = n % 10
7
+ mod100 = n % 100
8
+
9
+ if mod10 == 1 && !(11..19).to_a.include?(mod100)
10
+ :one
11
+ elsif (2..9).to_a.include?(mod10) && !(11..19).to_a.include?(mod100)
12
+ :few
13
+ else
14
+ :other
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ { :lt => {
23
+ :'i18n' => {
24
+ :plural => {
25
+ :keys => [:one, :few, :other],
26
+ :rule => RailsI18n::Pluralization::Lithuanian.rule }}}}
@@ -0,0 +1,23 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Latvian
4
+ def self.rule
5
+ lambda do |n|
6
+ if n == 0
7
+ :zero
8
+ elsif n % 10 == 1 && n % 100 != 11
9
+ :one
10
+ else
11
+ :other
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ { :lv => {
20
+ :'i18n' => {
21
+ :plural => {
22
+ :keys => [:zero, :one, :other],
23
+ :rule => RailsI18n::Pluralization::Latvian.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_with_zero_other'
2
+
3
+ ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:mg)
@@ -0,0 +1,21 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Macedonian
4
+ def self.rule
5
+ lambda do |n|
6
+ if n % 10 == 1 && n != 11
7
+ :one
8
+ else
9
+ :other
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ { :mk => {
18
+ :'i18n' => {
19
+ :plural => {
20
+ :keys => [:one, :other],
21
+ :rule => RailsI18n::Pluralization::Macedonian.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/romanian'
2
+
3
+ ::RailsI18n::Pluralization::Romanian.with_locale(:mo)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ms)
@@ -0,0 +1,27 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Maltese
4
+ def self.rule
5
+ lambda do |n|
6
+ mod100 = n % 100
7
+
8
+ if n == 1
9
+ :one
10
+ elsif n == 0 || (2..10).to_a.include?(mod100)
11
+ :few
12
+ elsif (11..19).to_a.include?(mod100)
13
+ :many
14
+ else
15
+ :other
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ { :mt => {
24
+ :'i18n' => {
25
+ :plural => {
26
+ :keys => [:one, :few, :many, :other],
27
+ :rule => RailsI18n::Pluralization::Maltese.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:my)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:naq)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_with_zero_other'
2
+
3
+ ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:nso)
@@ -0,0 +1,28 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Polish
4
+ def self.rule
5
+ lambda do |n|
6
+ mod10 = n % 10
7
+ mod100 = n % 100
8
+
9
+ if n == 1
10
+ :one
11
+ elsif [2, 3, 4].include?(mod10) && ![12, 13, 14].include?(mod100)
12
+ :few
13
+ elsif ([0, 1] + (5..9).to_a).include?(mod10) || [12, 13, 14].include?(mod100)
14
+ :many
15
+ else
16
+ :other
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ { :pl => {
25
+ :'i18n' => {
26
+ :plural => {
27
+ :keys => [:one, :few, :many, :other],
28
+ :rule => RailsI18n::Pluralization::Polish.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/romanian'
2
+
3
+ ::RailsI18n::Pluralization::Romanian.with_locale(:ro)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:root)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/east_slavic'
2
+
3
+ ::RailsI18n::Pluralization::EastSlavic.with_locale(:ru)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:sah)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:se)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:ses)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:sg)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/east_slavic'
2
+
3
+ ::RailsI18n::Pluralization::EastSlavic.with_locale(:sh)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_with_zero_other'
2
+
3
+ ::RailsI18n::Pluralization::OneWithZeroOther.with_locale(:shi)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/west_slavic'
2
+
3
+ ::RailsI18n::Pluralization::WestSlavic.with_locale(:sk)
@@ -0,0 +1,27 @@
1
+ module RailsI18n
2
+ module Pluralization
3
+ module Slovenian
4
+ def self.rule
5
+ lambda do |n|
6
+ mod100 = n % 100
7
+
8
+ if mod100 == 1
9
+ :one
10
+ elsif mod100 == 2
11
+ :two
12
+ elsif mod100 == 3 || mod100 == 4
13
+ :few
14
+ else
15
+ :other
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ { :sl => {
24
+ :'i18n' => {
25
+ :plural => {
26
+ :keys => [:one, :two, :few, :other],
27
+ :rule => RailsI18n::Pluralization::Slovenian.rule }}}}
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:sma)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:smi)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:smj)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:smn)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/one_two_other'
2
+
3
+ ::RailsI18n::Pluralization::OneTwoOther.with_locale(:sms)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/east_slavic'
2
+
3
+ ::RailsI18n::Pluralization::EastSlavic.with_locale(:sr)
@@ -0,0 +1,3 @@
1
+ require 'rails_i18n/common_pluralizations/other'
2
+
3
+ ::RailsI18n::Pluralization::Other.with_locale(:th)