From: Yuriy Shatrov Date: Tue, 5 Apr 2016 08:24:51 +0000 (+0300) Subject: plurals: correct plural forms for cs and sk locales X-Git-Tag: v2.4.0~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=128afa091715a194e1483f9d606c370cf6ae794d;p=thirdparty%2Fbabel.git plurals: correct plural forms for cs and sk locales Change plural forms for Czech (cs) and Slovak (sk) locales from Plural rule #_7_ to Plural rule #_8_ according to https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals . Fixes https://github.com/python-babel/babel/issues/372 --- diff --git a/babel/messages/plurals.py b/babel/messages/plurals.py index cc7b79e3..38c04ca4 100644 --- a/babel/messages/plurals.py +++ b/babel/messages/plurals.py @@ -75,7 +75,7 @@ PLURALS = { # Cree # 'cr': (), # Czech - 'cs': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'), + 'cs': (3, '((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2)'), # Church Slavic # 'cu': (), # Chuvash @@ -171,7 +171,7 @@ PLURALS = { # Russian 'ru': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'), # Slovak - 'sk': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'), + 'sk': (3, '((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2)'), # Slovenian 'sl': (4, '(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3)'), # Serbian - From Pootle's PO's