Skip to content

Commit

Permalink
Update with 'cs' (#269)
Browse files Browse the repository at this point in the history
added lambda for 'west_slavic' and 'hash for 'cs' language
  • Loading branch information
pruzicka committed Nov 25, 2020
1 parent 70760c6 commit 2e7fa1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/locales/utils/p11n.rb
Expand Up @@ -31,6 +31,13 @@
else 'other'
end
end,

west_slavic: lambda do |n|
if n == 1 ; 'one'
elsif [2, 3, 4].include?(n) ; 'few'
else ; 'other'
end
end,

one_two_other: lambda do |n|
if n == 1 ; 'one'
Expand Down Expand Up @@ -60,6 +67,7 @@
# The default pluralization for locales not explicitly listed here
# is the :one_other pluralization proc (used for English)
plurals = Hash.new(p11n[:one_other]).tap do |hash|
hash['cs'] = p11n[:west_slavic]
hash['id'] = p11n[:other]
hash['fr'] = p11n[:one_upto_two_other]
hash['ja'] = p11n[:other]
Expand Down

0 comments on commit 2e7fa1b

Please sign in to comment.