diff --git a/component.json b/component.json index 1ba8df9d..0bd68279 100644 --- a/component.json +++ b/component.json @@ -52,7 +52,7 @@ "select2_locale_sv.js", "select2_locale_th.js", "select2_locale_tr.js", - "select2_locale_ua.js", + "select2_locale_uk.js", "select2_locale_vi.js", "select2_locale_zh-CN.js", "select2_locale_zh-TW.js" diff --git a/select2.js b/select2.js index 5d9c71d4..ff62a638 100644 --- a/select2.js +++ b/select2.js @@ -3246,8 +3246,8 @@ the specific language governing permissions and limitations under the Apache Lic formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1? "" : "s"); }, formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Loading more results..."; }, - formatSearching: function () { return "Searching..."; }, + formatLoadMore: function (pageNumber) { return "Loading more results…"; }, + formatSearching: function () { return "Searching…"; }, minimumResultsForSearch: 0, minimumInputLength: 0, maximumInputLength: null, diff --git a/select2_locale_ar.js b/select2_locale_ar.js index 92c9e239..92d7e397 100644 --- a/select2_locale_ar.js +++ b/select2_locale_ar.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; if (n == 1){ return "الرجاء إدخال حرف واحد على الأكثر"; } return n == 2 ? "الرجاء إدخال حرفين على الأكثر" : "الجاء إدخال " + n + " على الأكثر"; }, formatInputTooLong: function (input, max) { var n = input.length - max; if (n == 1){ return "الرجاء إدخال حرف واحد على الأقل"; } return n == 2 ? "الرجاء إدخال حرفين على الأقل" : "الجاء إدخال " + n + " على الأقل "; }, formatSelectionTooBig: function (limit) { if (n == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return n == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + n + " إختيارات فقط"; }, - formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج..."; }, - formatSearching: function () { return "البحث..."; } + formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; }, + formatSearching: function () { return "البحث…"; } }); })(jQuery); diff --git a/select2_locale_bg.js b/select2_locale_bg.js index 2d8b9ca2..585d28a2 100644 --- a/select2_locale_bg.js +++ b/select2_locale_bg.js @@ -1,17 +1,18 @@ /** - * Select2 translation. + * Select2 Bulgarian translation. * - * Author: Lubomir Vikev + * @author Lubomir Vikev + * @author Uriy Efremochkin */ (function ($) { "use strict"; $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Няма намерени съвпадения"; }, - formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n == 1 ? "" : "а"); }, - formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n == 1? "" : "а"); }, - formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit == 1 ? " избор" : " избора"); }, - formatLoadMore: function (pageNumber) { return "Зареждат се още..."; }, - formatSearching: function () { return "Търсене..."; } + formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n > 1 ? "а" : ""); }, + formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n > 1 ? "а" : ""); }, + formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); }, + formatLoadMore: function (pageNumber) { return "Зареждат се още…"; }, + formatSearching: function () { return "Търсене…"; } }); })(jQuery); diff --git a/select2_locale_ca.js b/select2_locale_ca.js index bdcdaa79..7e19d3ce 100644 --- a/select2_locale_ca.js +++ b/select2_locale_ca.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; }, formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats..."; }, - formatSearching: function () { return "S'està cercant..."; } + formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; }, + formatSearching: function () { return "S'està cercant…"; } }); })(jQuery); diff --git a/select2_locale_cs.js b/select2_locale_cs.js index b3c748c2..376b54a1 100644 --- a/select2_locale_cs.js +++ b/select2_locale_cs.js @@ -43,7 +43,7 @@ return "Můžete zvolit maximálně "+limit+" položek"; } }, - formatLoadMore: function (pageNumber) { return "Načítají se další výsledky..."; }, - formatSearching: function () { return "Vyhledávání..."; } + formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; }, + formatSearching: function () { return "Vyhledávání…"; } }); })(jQuery); diff --git a/select2_locale_de.js b/select2_locale_de.js index 01f94ed4..93b18e81 100644 --- a/select2_locale_de.js +++ b/select2_locale_de.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; }, formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; }, - formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse..."; }, - formatSearching: function () { return "Suche..."; } + formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; }, + formatSearching: function () { return "Suche…"; } }); })(jQuery); \ No newline at end of file diff --git a/select2_locale_el.js b/select2_locale_el.js index 36e0f4d9..e94b02cb 100644 --- a/select2_locale_el.js +++ b/select2_locale_el.js @@ -1,17 +1,17 @@ /** - * Select2 translation. + * Select2 Greek translation. * - * Author: Your Name + * @author Uriy Efremochkin */ (function ($) { "use strict"; $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Δεν βρέθηκαν αποτελέσματα"; }, - formatInputTooShort: function (input, min) { var n = min - input.length; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n == 1 ? "" : "υς") + " χαρακτήρ" + (n == 1 ? "α" : "ες"); }, - formatInputTooLong: function (input, max) { var n = input.length - max; return "Παρακαλούμε διαγράψτε " + n + " χαρακτήρ" + (n == 1 ? "α" : "ες"); }, - formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit == 1 ? "ο" : "α"); }, - formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων..."; }, - formatSearching: function () { return "Αναζήτηση..."; } + formatInputTooShort: function (input, min) { var n = min - input.length; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n > 1 ? "υς" : "") + " χαρακτήρ" + (n > 1 ? "ες" : "α"); }, + formatInputTooLong: function (input, max) { var n = input.length - max; return "Παρακαλούμε διαγράψτε " + n + " χαρακτήρ" + (n > 1 ? "ες" : "α"); }, + formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit > 1 ? "α" : "ο"); }, + formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων…"; }, + formatSearching: function () { return "Αναζήτηση…"; } }); })(jQuery); \ No newline at end of file diff --git a/select2_locale_en.js.template b/select2_locale_en.js.template index f76b3749..3f7b39b5 100644 --- a/select2_locale_en.js.template +++ b/select2_locale_en.js.template @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1 ? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Loading more results..."; }, - formatSearching: function () { return "Searching..."; } + formatLoadMore: function (pageNumber) { return "Loading more results…"; }, + formatSearching: function () { return "Searching…"; } }); })(jQuery); diff --git a/select2_locale_es.js b/select2_locale_es.js index 241584ca..f2b58179 100644 --- a/select2_locale_es.js +++ b/select2_locale_es.js @@ -6,10 +6,10 @@ $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "No se encontraron resultados"; }, - formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "á" : "a") + "cter" + (n == 1? "" : "es"); }, - formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "á" : "a") + "cter" + (n == 1? "" : "es"); }, + formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); }, + formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); }, formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Cargando más resultados..."; }, - formatSearching: function () { return "Buscando..."; } + formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; }, + formatSearching: function () { return "Buscando…"; } }); })(jQuery); diff --git a/select2_locale_eu.js b/select2_locale_eu.js index 05665f5f..1da1a709 100644 --- a/select2_locale_eu.js +++ b/select2_locale_eu.js @@ -34,10 +34,10 @@ } }, formatLoadMore: function (pageNumber) { - return "Emaitza gehiago kargatzen..."; + return "Emaitza gehiago kargatzen…"; }, formatSearching: function () { - return "Bilatzen..."; + return "Bilatzen…"; } }); })(jQuery); diff --git a/select2_locale_fa.js b/select2_locale_fa.js index 5465fc8e..4ac862d4 100644 --- a/select2_locale_fa.js +++ b/select2_locale_fa.js @@ -1,5 +1,5 @@ /** - * Select2 translation. + * Select2 Persian translation. * * Author: Ali Choopan */ @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return " لطفا بیش از"+n+"کاراکتر وارد نمایید "; }, formatInputTooLong: function (input, max) { var n = input.length - max; return " لطفا" + n + " کاراکتر را حذف کنید."; }, formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; }, - formatLoadMore: function (pageNumber) { return "در حال بارگذاری موارد بیشتر ..."; }, + formatLoadMore: function (pageNumber) { return "در حال بارگذاری موارد بیشتر …"; }, formatSearching: function () { return "در حال جستجو"; } }); })(jQuery); diff --git a/select2_locale_fi.js b/select2_locale_fi.js index b056e88a..9bed310f 100644 --- a/select2_locale_fi.js +++ b/select2_locale_fi.js @@ -19,10 +19,10 @@ return "Voit valita ainoastaan " + limit + " kpl"; }, formatLoadMore: function (pageNumber) { - return "Ladataan lisää tuloksia..."; + return "Ladataan lisää tuloksia…"; }, formatSearching: function () { - return "Etsitään..."; + return "Etsitään…"; } }); })(jQuery); diff --git a/select2_locale_fr.js b/select2_locale_fr.js index f8d3e484..d8c87d4b 100644 --- a/select2_locale_fr.js +++ b/select2_locale_fr.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Merci de saisir " + n + " caractère" + (n == 1? "" : "s") + " de plus"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Merci de supprimer " + n + " caractère" + (n == 1? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires..."; }, - formatSearching: function () { return "Recherche en cours..."; } + formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires…"; }, + formatSearching: function () { return "Recherche en cours…"; } }); })(jQuery); diff --git a/select2_locale_gl.js b/select2_locale_gl.js index 1017c202..80326320 100644 --- a/select2_locale_gl.js +++ b/select2_locale_gl.js @@ -34,10 +34,10 @@ } }, formatLoadMore: function (pageNumber) { - return "Cargando máis resultados..."; + return "Cargando máis resultados…"; }, formatSearching: function () { - return "Buscando..."; + return "Buscando…"; } }); })(jQuery); diff --git a/select2_locale_he.js b/select2_locale_he.js index dd72eaa6..00385410 100644 --- a/select2_locale_he.js +++ b/select2_locale_he.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "נא להזין עוד " + n + " תווים נוספים"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "נא להזין פחות " + n + " תווים"; }, formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; }, - formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות..."; }, - formatSearching: function () { return "מחפש..."; } + formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות…"; }, + formatSearching: function () { return "מחפש…"; } }); })(jQuery); diff --git a/select2_locale_hr.js b/select2_locale_hr.js index b0615405..c2937252 100644 --- a/select2_locale_hr.js +++ b/select2_locale_hr.js @@ -1,42 +1,22 @@ /** * Select2 Croatian translation. * - * Author: Edi Modrić + * @author Edi Modrić + * @author Uriy Efremochkin */ (function ($) { "use strict"; - var specialNumbers = { - 1: function(n) { return (n % 100 != 11 ? "znak" : "znakova"); }, - 2: function(n) { return (n % 100 != 12 ? "znaka" : "znakova"); }, - 3: function(n) { return (n % 100 != 13 ? "znaka" : "znakova"); }, - 4: function(n) { return (n % 100 != 14 ? "znaka" : "znakova"); } - }; - $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Nema rezultata"; }, - formatInputTooShort: function (input, min) { - var n = min - input.length; - var nMod10 = n % 10; - - if (nMod10 > 0 && nMod10 < 5) { - return "Unesite još " + n + " " + specialNumbers[nMod10](n); - } - - return "Unesite još " + n + " znakova"; - }, - formatInputTooLong: function (input, max) { - var n = input.length - max; - var nMod10 = n % 10; - - if (nMod10 > 0 && nMod10 < 5) { - return "Unesite " + n + " " + specialNumbers[nMod10](n) + " manje"; - } - - return "Unesite " + n + " znakova manje"; - }, + formatInputTooShort: function (input, min) { return "Unesite još" + character(min - input.length); }, + formatInputTooLong: function (input, max) { return "Unesite" + character(input.length - max) + " manje"; }, formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; }, - formatLoadMore: function (pageNumber) { return "Učitavanje rezultata..."; }, - formatSearching: function () { return "Pretraga..."; } + formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; }, + formatSearching: function () { return "Pretraga…"; } }); + + function character (n) { + return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova"); + } })(jQuery); diff --git a/select2_locale_hu.js b/select2_locale_hu.js index 572dea96..1acfc5f8 100644 --- a/select2_locale_hu.js +++ b/select2_locale_hu.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " kerekterrel több mint kellene."; }, formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; }, - formatLoadMore: function (pageNumber) { return "Töltés..."; }, - formatSearching: function () { return "Keresés..."; } + formatLoadMore: function (pageNumber) { return "Töltés…"; }, + formatSearching: function () { return "Keresés…"; } }); })(jQuery); diff --git a/select2_locale_id.js b/select2_locale_id.js index 59a896ac..54745407 100644 --- a/select2_locale_id.js +++ b/select2_locale_id.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Masukkan " + n + " huruf lagi" + (n == 1 ? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Hapus " + n + " huruf" + (n == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Mengambil data..."; }, - formatSearching: function () { return "Mencari..."; } + formatLoadMore: function (pageNumber) { return "Mengambil data…"; }, + formatSearching: function () { return "Mencari…"; } }); })(jQuery); diff --git a/select2_locale_is.js b/select2_locale_is.js index b10073b5..aecc6cd7 100644 --- a/select2_locale_is.js +++ b/select2_locale_is.js @@ -1,16 +1,15 @@ /** * Select2 Icelandic translation. - * */ (function ($) { "use strict"; $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Ekkert fannst"; }, - formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n == 1 ? "" : "i") + " í viðbót"; }, - formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n == 1 ? "" : "i"); }, + formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n > 1 ? "i" : "") + " í viðbót"; }, + formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n > 1 ? "i" : ""); }, formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; }, - formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður..."; }, - formatSearching: function () { return "Leita..."; } + formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; }, + formatSearching: function () { return "Leita…"; } }); })(jQuery); diff --git a/select2_locale_it.js b/select2_locale_it.js index 98369dda..d4e24de7 100644 --- a/select2_locale_it.js +++ b/select2_locale_it.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; }, formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); }, - formatLoadMore: function (pageNumber) { return "Caricamento in corso..."; }, - formatSearching: function () { return "Ricerca..."; } + formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; }, + formatSearching: function () { return "Ricerca…"; } }); })(jQuery); \ No newline at end of file diff --git a/select2_locale_ka.js b/select2_locale_ka.js index 861b0f50..366cc2d9 100644 --- a/select2_locale_ka.js +++ b/select2_locale_ka.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "გთხოვთ შეიყვანოთ კიდევ " + n + " სიმბოლო"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "გთხოვთ წაშალოთ " + n + " სიმბოლო"; }, formatSelectionTooBig: function (limit) { return "თქვენ შეგიძლიათ მხოლოდ " + limit + " ჩანაწერის მონიშვნა"; }, - formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა..."; }, - formatSearching: function () { return "ძებნა..."; } + formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა…"; }, + formatSearching: function () { return "ძებნა…"; } }); })(jQuery); diff --git a/select2_locale_ko.js b/select2_locale_ko.js index 864906b6..1a84d21e 100644 --- a/select2_locale_ko.js +++ b/select2_locale_ko.js @@ -1,7 +1,7 @@ /** - * Select2 translation. + * Select2 Korean translation. * - * Author: Swen Mun + * @author Swen Mun */ (function ($) { "use strict"; diff --git a/select2_locale_lt.js b/select2_locale_lt.js index dbb1f09d..2e2f950b 100644 --- a/select2_locale_lt.js +++ b/select2_locale_lt.js @@ -1,29 +1,24 @@ /** - * Select2 lithuanian translation. + * Select2 Lithuanian translation. * - * Author: CRONUS Karmalakas + * @author CRONUS Karmalakas + * @author Uriy Efremochkin */ (function ($) { "use strict"; $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Atitikmenų nerasta"; }, - formatInputTooShort: function (input, min) { - var n = min - input.length, - suffix = (n % 10 == 1) && (n % 100 != 11) ? 'į' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'ius' : 'ių'); - return "Įrašykite dar " + n + " simbol" + suffix; - }, - formatInputTooLong: function (input, max) { - var n = input.length - max, - suffix = (n % 10 == 1) && (n % 100 != 11) ? 'į' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'ius' : 'ių'); - return "Pašalinkite " + n + " simbol" + suffix; - }, + formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); }, + formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); }, formatSelectionTooBig: function (limit) { - var n = limit, - suffix = (n % 10 == 1) && (n % 100 != 11) ? 'ą' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'us' : 'ų'); - return "Jūs galite pasirinkti tik " + limit + " element" + suffix; + return "Jūs galite pasirinkti tik " + limit + " element" + ((limit%100 > 9 && limit%100 < 21) || limit%10 == 0 ? "ų" : limit%10 > 1 ? "us" : "ą"); }, - formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų..."; }, - formatSearching: function () { return "Ieškoma..."; } + formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; }, + formatSearching: function () { return "Ieškoma…"; } }); + + function character (n) { + return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į"); + } })(jQuery); diff --git a/select2_locale_lv.js b/select2_locale_lv.js index 2c05cfda..b300ec77 100644 --- a/select2_locale_lv.js +++ b/select2_locale_lv.js @@ -1,16 +1,17 @@ /** - * Select2 Latvian translation + * Select2 Latvian translation. + * + * @author Uriy Efremochkin */ (function ($) { "use strict"; $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Sakritību nav"; }, - formatInputTooShort: function (input, min) { var n = min - input.length; return "Lūdzu ievadiet vēl " + n + " simbol" + (n == 11 ? "us" : (/^\d*[1]$/im.test(n)? "u" : "us")); }, - formatInputTooLong: function (input, max) { var n = input.length - max; return "Lūdzu ievadiet par " + n + " simbol" + (n == 11 ? "iem" : (/^\d*[1]$/im.test(n)? "u" : "iem")) + " mazāk"; }, - formatSelectionTooBig: function (limit) { return "Jūs varat izvēlēties ne vairāk kā " + limit + " element" + (limit == 11 ? "us" : (/^\d*[1]$/im.test(limit)? "u" : "us")); }, - formatLoadMore: function (pageNumber) { return "Datu ielāde..."; }, - formatSearching: function () { return "Meklēšana..."; } + formatInputTooShort: function (input, min) { var n = min - input.length; return "Lūdzu ievadiet vēl " + n + " simbol" + (n == 11 ? "us" : n%10 == 1 ? "u" : "us"); }, + formatInputTooLong: function (input, max) { var n = input.length - max; return "Lūdzu ievadiet par " + n + " simbol" + (n == 11 ? "iem" : n%10 == 1 ? "u" : "iem") + " mazāk"; }, + formatSelectionTooBig: function (limit) { return "Jūs varat izvēlēties ne vairāk kā " + limit + " element" + (limit == 11 ? "us" : limit%10 == 1 ? "u" : "us"); }, + formatLoadMore: function (pageNumber) { return "Datu ielāde…"; }, + formatSearching: function () { return "Meklēšana…"; } }); - })(jQuery); diff --git a/select2_locale_mk.js b/select2_locale_mk.js index 69e3981a..513562c5 100644 --- a/select2_locale_mk.js +++ b/select2_locale_mk.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Ве молиме внесете уште " + n + " карактер" + (n == 1 ? "" : "и"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Ве молиме внесете " + n + " помалку карактер" + (n == 1? "" : "и"); }, formatSelectionTooBig: function (limit) { return "Можете да изберете само " + limit + " ставк" + (limit == 1 ? "а" : "и"); }, - formatLoadMore: function (pageNumber) { return "Вчитување резултати..."; }, - formatSearching: function () { return "Пребарување..."; } + formatLoadMore: function (pageNumber) { return "Вчитување резултати…"; }, + formatSearching: function () { return "Пребарување…"; } }); })(jQuery); \ No newline at end of file diff --git a/select2_locale_ms.js b/select2_locale_ms.js index c7202e1d..262042aa 100644 --- a/select2_locale_ms.js +++ b/select2_locale_ms.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Sila masukkan " + n + " aksara lagi"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Sila hapuskan " + n + " aksara"; }, formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; }, - formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan..."; }, - formatSearching: function () { return "Mencari..."; } + formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; }, + formatSearching: function () { return "Mencari…"; } }); })(jQuery); diff --git a/select2_locale_nl.js b/select2_locale_nl.js index 8061a28e..5b5c4156 100644 --- a/select2_locale_nl.js +++ b/select2_locale_nl.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; }, formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; }, - formatLoadMore: function (pageNumber) { return "Meer resultaten laden..."; }, - formatSearching: function () { return "Zoeken..."; } + formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; }, + formatSearching: function () { return "Zoeken…"; } }); })(jQuery); \ No newline at end of file diff --git a/select2_locale_no.js b/select2_locale_no.js index 0831360f..ab61c082 100644 --- a/select2_locale_no.js +++ b/select2_locale_no.js @@ -11,8 +11,8 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Vennligst skriv inn " + n + (n>1 ? " flere tegn" : " tegn til"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vennligst fjern " + n + " tegn"; }, formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; }, - formatLoadMore: function (pageNumber) { return "Laster flere resultater..."; }, - formatSearching: function () { return "Søker..."; } + formatLoadMore: function (pageNumber) { return "Laster flere resultater…"; }, + formatSearching: function () { return "Søker…"; } }); })(jQuery); diff --git a/select2_locale_pl.js b/select2_locale_pl.js index e4b69ec4..75054e76 100644 --- a/select2_locale_pl.js +++ b/select2_locale_pl.js @@ -1,37 +1,22 @@ /** * Select2 Polish translation. * - * Author: Jan Kondratowicz + * @author Jan Kondratowicz + * @author Uriy Efremochkin */ (function ($) { "use strict"; - - var pl_suffix = function(n, pluralSuffix) { - if(n == 1) return ""; - if((n%100 > 1 && n%100 < 5) || (n%100 > 20 && n%10 > 1 && n%10 < 5)) return pluralSuffix; - return "ów"; - }; $.extend($.fn.select2.defaults, { - formatNoMatches: function () { - return "Brak wyników."; - }, - formatInputTooShort: function (input, min) { - var n = min - input.length; - return "Wpisz jeszcze " + n + " znak" + pl_suffix(n,'i') + "."; - }, - formatInputTooLong: function (input, max) { - var n = input.length - max; - return "Wpisana fraza jest za długa o " + n + " znak" + pl_suffix(n,'i') + "."; - }, - formatSelectionTooBig: function (limit) { - return "Możesz zaznaczyć najwyżej " + limit + " element" + pl_suffix(limit,'y') + "."; - }, - formatLoadMore: function (pageNumber) { - return "Ładowanie wyników..."; - }, - formatSearching: function () { - return "Szukanie..."; - } + formatNoMatches: function () { return "Brak wyników"; }, + formatInputTooShort: function (input, min) { return "Wpisz jeszcze" + character(min - input.length, "znak", "i"); }, + formatInputTooLong: function (input, max) { return "Wpisana fraza jest za długa o" + character(input.length - max, "znak", "i"); }, + formatSelectionTooBig: function (limit) { return "Możesz zaznaczyć najwyżej" + character(limit, "element", "y"); }, + formatLoadMore: function (pageNumber) { return "Ładowanie wyników…"; }, + formatSearching: function () { return "Szukanie…"; } }); + + function character (n, word, pluralSuffix) { + return " " + n + " " + word + (n == 1 ? "" : n%10 < 5 && n%10 > 1 && (n%100 < 5 || n%100 > 20) ? pluralSuffix : "ów"); + } })(jQuery); diff --git a/select2_locale_pt-BR.js b/select2_locale_pt-BR.js index 5b2ff2f0..d60b1827 100644 --- a/select2_locale_pt-BR.js +++ b/select2_locale_pt-BR.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Informe " + n + " caractere" + (n == 1? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caractere" + (n == 1? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Carregando mais resultados..."; }, - formatSearching: function () { return "Buscando..."; } + formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; }, + formatSearching: function () { return "Buscando…"; } }); })(jQuery); diff --git a/select2_locale_pt-PT.js b/select2_locale_pt-PT.js index 1a40e800..cced7cf3 100644 --- a/select2_locale_pt-PT.js +++ b/select2_locale_pt-PT.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); }, formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "A carregar mais resultados..."; }, - formatSearching: function () { return "A pesquisar..."; } + formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; }, + formatSearching: function () { return "A pesquisar…"; } }); })(jQuery); diff --git a/select2_locale_ro.js b/select2_locale_ro.js index 88b3ac41..87eca4cf 100644 --- a/select2_locale_ro.js +++ b/select2_locale_ro.js @@ -9,7 +9,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); }, formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); }, - formatLoadMore: function (pageNumber) { return "Se încarcă..."; }, - formatSearching: function () { return "Căutare..."; } + formatLoadMore: function (pageNumber) { return "Se încarcă…"; }, + formatSearching: function () { return "Căutare…"; } }); })(jQuery); diff --git a/select2_locale_ru.js b/select2_locale_ru.js index 3da956a8..0f45ce0d 100644 --- a/select2_locale_ru.js +++ b/select2_locale_ru.js @@ -1,15 +1,21 @@ /** - * Select2 Russian translation + * Select2 Russian translation. + * + * @author Uriy Efremochkin */ (function ($) { "use strict"; $.extend($.fn.select2.defaults, { formatNoMatches: function () { return "Совпадений не найдено"; }, - formatInputTooShort: function (input, min) { var n = min - input.length; return "Пожалуйста, введите еще " + n + " символ" + (n == 1 ? "" : ((n > 1)&&(n < 5) ? "а" : "ов")); }, - formatInputTooLong: function (input, max) { var n = input.length - max; return "Пожалуйста, введите на " + n + " символ" + (n == 1 ? "" : ((n > 1)&&(n < 5)? "а" : "ов")) + " меньше"; }, - formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit == 1 ? "а" : "ов"); }, - formatLoadMore: function (pageNumber) { return "Загрузка данных..."; }, - formatSearching: function () { return "Поиск..."; } + formatInputTooShort: function (input, min) { return "Пожалуйста, введите еще" + character(min - input.length); }, + formatInputTooLong: function (input, max) { return "Пожалуйста, введите на" + character(input.length - max) + " меньше"; }, + formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); }, + formatLoadMore: function (pageNumber) { return "Загрузка данных…"; }, + formatSearching: function () { return "Поиск…"; } }); + + function character (n) { + return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов"); + } })(jQuery); diff --git a/select2_locale_sk.js b/select2_locale_sk.js index 8d4e46af..772f304a 100644 --- a/select2_locale_sk.js +++ b/select2_locale_sk.js @@ -42,7 +42,7 @@ return "Môžete zvoliť najviac "+limit+" položiek"; } }, - formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky..."; }, - formatSearching: function () { return "Vyhľadávanie..."; } + formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky…"; }, + formatSearching: function () { return "Vyhľadávanie…"; } }); })(jQuery); diff --git a/select2_locale_sv.js b/select2_locale_sv.js index 9f09de30..d611189a 100644 --- a/select2_locale_sv.js +++ b/select2_locale_sv.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; }, formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; }, - formatLoadMore: function (pageNumber) { return "Laddar fler resultat..."; }, - formatSearching: function () { return "Söker..."; } + formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; }, + formatSearching: function () { return "Söker…"; } }); })(jQuery); diff --git a/select2_locale_th.js b/select2_locale_th.js index 6b38b158..df59bdac 100644 --- a/select2_locale_th.js +++ b/select2_locale_th.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; }, formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; }, - formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม..."; }, - formatSearching: function () { return "กำลังค้นข้อมูล..."; } + formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; }, + formatSearching: function () { return "กำลังค้นข้อมูล…"; } }); })(jQuery); diff --git a/select2_locale_tr.js b/select2_locale_tr.js index b47a2fad..f834dad2 100644 --- a/select2_locale_tr.js +++ b/select2_locale_tr.js @@ -11,7 +11,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; }, formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; }, - formatLoadMore: function (pageNumber) { return "Daha fazla..."; }, - formatSearching: function () { return "Aranıyor..."; } + formatLoadMore: function (pageNumber) { return "Daha fazla…"; }, + formatSearching: function () { return "Aranıyor…"; } }); })(jQuery); diff --git a/select2_locale_ua.js b/select2_locale_ua.js deleted file mode 100644 index 58d31e76..00000000 --- a/select2_locale_ua.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Select2 translation. - * - * Author: bigmihail - */ -(function ($) { - "use strict"; - - $.extend($.fn.select2.defaults, { - formatNoMatches: function () { return "Нічого не знайдено"; }, - formatInputTooShort: function (input, min) { var n = min - input.length, s = ["", "и", "ів"], p = [2,0,1,1,1,2]; return "Введіть буль ласка ще " + n + " символ" + s[ (n%100>4 && n%100<=20)? 2 : p[Math.min(n%10, 5)] ]; }, - formatInputTooLong: function (input, max) { var n = input.length - max, s = ["", "и", "ів"], p = [2,0,1,1,1,2]; return "Введіть буль ласка на " + n + " символ" + s[ (n%100>4 && n%100<=20)? 2 : p[Math.min(n%10, 5)] ] + " менше"; }, - formatSelectionTooBig: function (limit) {var s = ["", "и", "ів"], p = [2,0,1,1,1,2]; return "Ви можете вибрати лише " + limit + " елемент" + s[ (limit%100>4 && limit%100<=20)? 2 : p[Math.min(limit%10, 5)] ]; }, - formatLoadMore: function (pageNumber) { return "Завантаження даних..."; }, - formatSearching: function () { return "Пошук..."; } - }); -})(jQuery); diff --git a/select2_locale_uk.js b/select2_locale_uk.js new file mode 100644 index 00000000..6b22e8f2 --- /dev/null +++ b/select2_locale_uk.js @@ -0,0 +1,22 @@ +/** + * Select2 Ukrainian translation. + * + * @author bigmihail + * @author Uriy Efremochkin + */ +(function ($) { + "use strict"; + + $.extend($.fn.select2.defaults, { + formatNoMatches: function () { return "Нічого не знайдено"; }, + formatInputTooShort: function (input, min) { return "Введіть буль ласка ще" + character(min - input.length, "символ"); }, + formatInputTooLong: function (input, max) { return "Введіть буль ласка на" + character(input.length - max, "символ") + " менше"; }, + formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише" + character(limit, "елемент"); }, + formatLoadMore: function (pageNumber) { return "Завантаження даних…"; }, + formatSearching: function () { return "Пошук…"; } + }); + + function character (n, word) { + return " " + n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів"); + } +})(jQuery); diff --git a/select2_locale_vi.js b/select2_locale_vi.js index 0a45dfc9..5dbc2753 100644 --- a/select2_locale_vi.js +++ b/select2_locale_vi.js @@ -11,8 +11,8 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); }, - formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả..."; }, - formatSearching: function () { return "Đang tìm..."; } + formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; }, + formatSearching: function () { return "Đang tìm…"; } }); })(jQuery); diff --git a/select2_locale_zh-CN.js b/select2_locale_zh-CN.js index 49d8e599..6add3c52 100644 --- a/select2_locale_zh-CN.js +++ b/select2_locale_zh-CN.js @@ -8,7 +8,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";}, formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";}, formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; }, - formatLoadMore: function (pageNumber) { return "加载结果中..."; }, - formatSearching: function () { return "搜索中..."; } + formatLoadMore: function (pageNumber) { return "加载结果中…"; }, + formatSearching: function () { return "搜索中…"; } }); })(jQuery); diff --git a/select2_locale_zh-TW.js b/select2_locale_zh-TW.js index 3d447d68..f072381f 100755 --- a/select2_locale_zh-TW.js +++ b/select2_locale_zh-TW.js @@ -8,7 +8,7 @@ formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";}, formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";}, formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; }, - formatLoadMore: function (pageNumber) { return "載入中..."; }, - formatSearching: function () { return "搜尋中..."; } + formatLoadMore: function (pageNumber) { return "載入中…"; }, + formatSearching: function () { return "搜尋中…"; } }); })(jQuery);