2013-02-21 13:21:49 +04:00
|
|
|
|
/**
|
2014-01-08 11:48:40 +04:00
|
|
|
|
* Select2 Russian translation.
|
|
|
|
|
*
|
|
|
|
|
* @author Uriy Efremochkin <efremochkin@uriy.me>
|
2013-02-21 13:21:49 +04:00
|
|
|
|
*/
|
|
|
|
|
(function ($) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
2014-04-15 11:20:22 +04:00
|
|
|
|
$.fn.select2.locales['ru'] = {
|
2013-02-21 13:21:49 +04:00
|
|
|
|
formatNoMatches: function () { return "Совпадений не найдено"; },
|
2014-06-05 18:41:23 +04:00
|
|
|
|
formatInputTooShort: function (input, min) { return "Пожалуйста, введите еще хотя бы" + character(min - input.length); },
|
2014-01-08 11:48:40 +04:00
|
|
|
|
formatInputTooLong: function (input, max) { return "Пожалуйста, введите на" + character(input.length - max) + " меньше"; },
|
|
|
|
|
formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); },
|
2014-01-08 13:35:47 +04:00
|
|
|
|
formatLoadMore: function (pageNumber) { return "Загрузка данных…"; },
|
|
|
|
|
formatSearching: function () { return "Поиск…"; }
|
2014-05-16 12:55:03 +04:00
|
|
|
|
};
|
2014-05-15 14:55:44 +04:00
|
|
|
|
|
2014-05-16 13:02:10 +04:00
|
|
|
|
$.extend($.fn.select2.defaults, $.fn.select2.locales['ru']);
|
2014-01-08 11:48:40 +04:00
|
|
|
|
|
|
|
|
|
function character (n) {
|
|
|
|
|
return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов");
|
|
|
|
|
}
|
2013-02-21 13:21:49 +04:00
|
|
|
|
})(jQuery);
|