From 1c8d1f8e0db70c181e62349ed7a6c1da042b44cc Mon Sep 17 00:00:00 2001 From: Limon Monte Date: Thu, 19 Nov 2015 09:09:38 +0100 Subject: [PATCH 1/2] 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 'Претрага…'; + } + }; +}); From 410916510d8cceb4919b3295f9b9d962c671184e Mon Sep 17 00:00:00 2001 From: Limon Monte Date: Fri, 20 Nov 2015 11:39:35 +0100 Subject: [PATCH 2/2] Add errorLoading error message to sr, sr-Latin and hr languages. --- src/js/select2/i18n/hr.js | 3 +++ src/js/select2/i18n/sr-Cyrl.js | 3 +++ src/js/select2/i18n/sr.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/js/select2/i18n/hr.js b/src/js/select2/i18n/hr.js index fb900629..81462a5c 100644 --- a/src/js/select2/i18n/hr.js +++ b/src/js/select2/i18n/hr.js @@ -15,6 +15,9 @@ define(function () { } return { + errorLoading: function () { + return 'Preuzimanje nije uspjelo.'; + }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/sr-Cyrl.js b/src/js/select2/i18n/sr-Cyrl.js index 4e228c27..c61184e3 100644 --- a/src/js/select2/i18n/sr-Cyrl.js +++ b/src/js/select2/i18n/sr-Cyrl.js @@ -14,6 +14,9 @@ define(function () { } return { + errorLoading: function () { + return 'Преузимање није успело.'; + }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/sr.js b/src/js/select2/i18n/sr.js index 32e27d59..7821b2b8 100644 --- a/src/js/select2/i18n/sr.js +++ b/src/js/select2/i18n/sr.js @@ -14,6 +14,9 @@ define(function () { } return { + errorLoading: function () { + return 'Preuzimanje nije uspelo.'; + }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum;