From 389aa1ab970807a9454c4755598c7455cd5ccf93 Mon Sep 17 00:00:00 2001 From: alexweissman Date: Sun, 24 Sep 2017 16:42:12 -0400 Subject: [PATCH] Add Bosnian (bs) --- CHANGELOG.md | 6 ++++- src/js/select2/i18n/bs.js | 55 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/js/select2/i18n/bs.js diff --git a/CHANGELOG.md b/CHANGELOG.md index f9c10f39..c3ac4041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ ### Translations - Spanish translation: Update the 'errorLoading' message (#5032) - +- Fix typo in Romanian (#5005) +- Add translations for lower and upper Sorbian (`dsb` and `hsb`) (#4949) +- Updates to Slovak (#4915) +- Fixed Norwegian `inputTooShort` message (#4896) +- Add Bosnian translation (`bs`) (#4504) ## 4.0.4 diff --git a/src/js/select2/i18n/bs.js b/src/js/select2/i18n/bs.js new file mode 100644 index 00000000..4446a0ee --- /dev/null +++ b/src/js/select2/i18n/bs.js @@ -0,0 +1,55 @@ +define(function () { + // Bosnian + function ending (count, one, some, many) { + if (count % 10 == 1 && count % 100 != 11) { + return one; + } + + if (count % 10 >= 2 && count % 10 <= 4 && + (count % 100 < 12 || count % 100 > 14)) { + return some; + } + + return many; + } + + return { + errorLoading: function () { + return 'Preuzimanje nije uspijelo.'; + }, + inputTooLong: function (args) { + var overChars = args.input.length - args.maximum; + + var message = 'Obrišite ' + overChars + ' simbol'; + + message += ending(overChars, '', 'a', 'a'); + + return message; + }, + inputTooShort: function (args) { + var remainingChars = args.minimum - args.input.length; + + var message = 'Ukucajte bar još ' + remainingChars + ' simbol'; + + message += ending(remainingChars, '', 'a', 'a'); + + return message; + }, + loadingMore: function () { + return 'Preuzimanje još rezultata…'; + }, + maximumSelected: function (args) { + var message = 'Možete izabrati samo ' + args.maximum + ' stavk'; + + message += ending(args.maximum, 'u', 'e', 'i'); + + return message; + }, + noResults: function () { + return 'Ništa nije pronađeno'; + }, + searching: function () { + return 'Pretraga…'; + } + }; +});