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.
- data/README.md +5 -0
- data/lib/rails_i18n/common_pluralizations/east_slavic.rb +35 -0
- data/lib/rails_i18n/common_pluralizations/one_two_other.rb +30 -0
- data/lib/rails_i18n/common_pluralizations/one_upto_two_other.rb +19 -0
- data/lib/rails_i18n/common_pluralizations/one_with_zero_other.rb +20 -0
- data/lib/rails_i18n/common_pluralizations/other.rb +17 -0
- data/lib/rails_i18n/common_pluralizations/romanian.rb +27 -0
- data/lib/rails_i18n/common_pluralizations/west_slavic.rb +27 -0
- data/lib/rails_i18n/railtie.rb +18 -5
- data/rails/locale/ja.yml +1 -1
- data/rails/pluralization/ak.rb +3 -0
- data/rails/pluralization/am.rb +3 -0
- data/rails/pluralization/ar.rb +31 -0
- data/rails/pluralization/az.rb +3 -0
- data/rails/pluralization/be.rb +3 -0
- data/rails/pluralization/bh.rb +3 -0
- data/rails/pluralization/bm.rb +3 -0
- data/rails/pluralization/bo.rb +3 -0
- data/rails/pluralization/br.rb +30 -0
- data/rails/pluralization/bs.rb +3 -0
- data/rails/pluralization/cs.rb +3 -0
- data/rails/pluralization/cy.rb +24 -0
- data/rails/pluralization/dz.rb +3 -0
- data/rails/pluralization/fa.rb +3 -0
- data/rails/pluralization/ff.rb +3 -0
- data/rails/pluralization/fil.rb +3 -0
- data/rails/pluralization/fr.rb +3 -0
- data/rails/pluralization/ga.rb +27 -0
- data/rails/pluralization/gd.rb +25 -0
- data/rails/pluralization/guw.rb +3 -0
- data/rails/pluralization/gv.rb +21 -0
- data/rails/pluralization/hi.rb +3 -0
- data/rails/pluralization/hr.rb +3 -0
- data/rails/pluralization/hu.rb +3 -0
- data/rails/pluralization/id.rb +3 -0
- data/rails/pluralization/ig.rb +3 -0
- data/rails/pluralization/ii.rb +3 -0
- data/rails/pluralization/iu.rb +3 -0
- data/rails/pluralization/ja.rb +3 -0
- data/rails/pluralization/jv.rb +3 -0
- data/rails/pluralization/ka.rb +3 -0
- data/rails/pluralization/kab.rb +3 -0
- data/rails/pluralization/kde.rb +3 -0
- data/rails/pluralization/kea.rb +3 -0
- data/rails/pluralization/km.rb +3 -0
- data/rails/pluralization/kn.rb +3 -0
- data/rails/pluralization/ko.rb +3 -0
- data/rails/pluralization/ksh.rb +23 -0
- data/rails/pluralization/kw.rb +3 -0
- data/rails/pluralization/lag.rb +23 -0
- data/rails/pluralization/ln.rb +3 -0
- data/rails/pluralization/lo.rb +3 -0
- data/rails/pluralization/lt.rb +26 -0
- data/rails/pluralization/lv.rb +23 -0
- data/rails/pluralization/mg.rb +3 -0
- data/rails/pluralization/mk.rb +21 -0
- data/rails/pluralization/mo.rb +3 -0
- data/rails/pluralization/ms.rb +3 -0
- data/rails/pluralization/mt.rb +27 -0
- data/rails/pluralization/my.rb +3 -0
- data/rails/pluralization/naq.rb +3 -0
- data/rails/pluralization/nso.rb +3 -0
- data/rails/pluralization/pl.rb +28 -0
- data/rails/pluralization/ro.rb +3 -0
- data/rails/pluralization/root.rb +3 -0
- data/rails/pluralization/ru.rb +3 -0
- data/rails/pluralization/sah.rb +3 -0
- data/rails/pluralization/se.rb +3 -0
- data/rails/pluralization/ses.rb +3 -0
- data/rails/pluralization/sg.rb +3 -0
- data/rails/pluralization/sh.rb +3 -0
- data/rails/pluralization/shi.rb +3 -0
- data/rails/pluralization/sk.rb +3 -0
- data/rails/pluralization/sl.rb +27 -0
- data/rails/pluralization/sma.rb +3 -0
- data/rails/pluralization/smi.rb +3 -0
- data/rails/pluralization/smj.rb +3 -0
- data/rails/pluralization/smn.rb +3 -0
- data/rails/pluralization/sms.rb +3 -0
- data/rails/pluralization/sr.rb +3 -0
- data/rails/pluralization/th.rb +3 -0
- data/rails/pluralization/ti.rb +3 -0
- data/rails/pluralization/tl.rb +3 -0
- data/rails/pluralization/to.rb +3 -0
- data/rails/pluralization/tr.rb +3 -0
- data/rails/pluralization/tzm.rb +21 -0
- data/rails/pluralization/uk.rb +3 -0
- data/rails/pluralization/vi.rb +3 -0
- data/rails/pluralization/wa.rb +3 -0
- data/rails/pluralization/wo.rb +3 -0
- data/rails/pluralization/yo.rb +3 -0
- data/rails/pluralization/zh.rb +3 -0
- data/rails/transliteration/bg.yml +64 -0
- data/rails/transliteration/ru.rb +72 -0
- metadata +107 -24
- data/will_paginate/bg.yml +0 -4
- data/will_paginate/en-GB.yml +0 -18
- data/will_paginate/en-US.yml +0 -18
- data/will_paginate/hu.yml +0 -5
- data/will_paginate/ja.yml +0 -18
- data/will_paginate/nl.yml +0 -5
- data/will_paginate/ro.yml +0 -4
- data/will_paginate/sk.yml +0 -19
@@ -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,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,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,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,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,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,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,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 }}}}
|