From 1c8d1f8e0db70c181e62349ed7a6c1da042b44cc Mon Sep 17 00:00:00 2001 From: Limon Monte Date: Thu, 19 Nov 2015 09:09:38 +0100 Subject: [PATCH] Add sr-Cyrl language. --- src/js/select2/i18n/sr-Cyrl.js | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/js/select2/i18n/sr-Cyrl.js diff --git a/src/js/select2/i18n/sr-Cyrl.js b/src/js/select2/i18n/sr-Cyrl.js new file mode 100644 index 00000000..4e228c27 --- /dev/null +++ b/src/js/select2/i18n/sr-Cyrl.js @@ -0,0 +1,52 @@ +define(function () { + // Serbian Cyrilic + 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 { + inputTooLong: function (args) { + var overChars = args.input.length - args.maximum; + + var message = 'Обришите ' + overChars + ' симбол'; + + message += ending(overChars, '', 'а', 'а'); + + return message; + }, + inputTooShort: function (args) { + var remainingChars = args.minimum - args.input.length; + + var message = 'Укуцајте бар још ' + remainingChars + ' симбол'; + + message += ending(remainingChars, '', 'а', 'а'); + + return message; + }, + loadingMore: function () { + return 'Преузимање још резултата…'; + }, + maximumSelected: function (args) { + var message = 'Можете изабрати само ' + args.maximum + ' ставк'; + + message += ending(args.maximum, 'у', 'е', 'и'); + + return message; + }, + noResults: function () { + return 'Ништа није пронађено'; + }, + searching: function () { + return 'Претрага…'; + } + }; +});