From 1022d8872c491ca4a8db94b09bd160f6575e66ad Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Sat, 18 Jun 2022 00:17:15 +0200 Subject: [PATCH] FIX: Add missing pluralization rules for Bosnian (#17131) --- lib/javascripts/locale/bs.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/javascripts/locale/bs.js diff --git a/lib/javascripts/locale/bs.js b/lib/javascripts/locale/bs.js new file mode 100644 index 00000000000..e2c139ddf96 --- /dev/null +++ b/lib/javascripts/locale/bs.js @@ -0,0 +1,10 @@ +MessageFormat.locale.bs = function (n) { + if ((n % 10) == 1 && (n % 100) != 11) { + return 'one'; + } + if ((n % 10) >= 2 && (n % 10) <= 4 && + ((n % 100) < 12 || (n % 100) > 14) && n == Math.floor(n)) { + return 'few'; + } + return 'other'; +};