From: And-re Date: Thu, 21 Nov 2013 13:11:51 +0000 (+0100) Subject: Fix plural function for Polish language X-Git-Tag: 2.5.0^2~27^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=114dc59902b56355fffe74cd77d2a51f4240ba02;p=thirdparty%2Fmoment.git Fix plural function for Polish language Current version: moment.duration(112, "years").humanize(); // 112 lata moment.duration(213, "years").humanize(); // 213 lata New version: moment.duration(112, "years").humanize(); // 112 lat moment.duration(213, "years").humanize(); // 213 lat Real examples: https://pl.wikipedia.org/wiki/Lista_najstarszych_ludzi_w_Polsce --- diff --git a/lang/pl.js b/lang/pl.js index 4ee33462c..97770d2ad 100644 --- a/lang/pl.js +++ b/lang/pl.js @@ -15,7 +15,7 @@ monthsSubjective = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"); function plural(n) { - return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1); + return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); } function translate(number, withoutSuffix, key) {