From 2e7fa1bf3c6cab37578a2fe45bc99edb48460a0b Mon Sep 17 00:00:00 2001 From: pruzicka Date: Wed, 25 Nov 2020 05:10:50 +0100 Subject: [PATCH] Update with 'cs' (#269) added lambda for 'west_slavic' and 'hash for 'cs' language --- lib/locales/utils/p11n.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/locales/utils/p11n.rb b/lib/locales/utils/p11n.rb index 4767c8f73..a0b441be9 100644 --- a/lib/locales/utils/p11n.rb +++ b/lib/locales/utils/p11n.rb @@ -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' @@ -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]