Skip to content

Commit e88d890

Browse files
committed
Merge pull request select2#1101 from jkondratowicz/master
Add Polish translation
2 parents 2f69290 + a7bfe53 commit e88d890

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

select2_locale_pl.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Select2 Polish translation.
3+
*
4+
* Author: Jan Kondratowicz <jan@kondratowicz.pl>
5+
*/
6+
(function ($) {
7+
"use strict";
8+
9+
var pl_suffix = function(n) {
10+
if(n == 1) return "";
11+
if((n%100 > 1 && n%100 < 5) || (n%100 > 20 && n%10 > 1 && n%10 < 5)) return "i";
12+
return "ów";
13+
};
14+
15+
$.extend($.fn.select2.defaults, {
16+
formatNoMatches: function () {
17+
return "Brak wyników.";
18+
},
19+
formatInputTooShort: function (input, min) {
20+
var n = min - input.length;
21+
return "Wpisz jeszcze " + n + " znak" + pl_suffix(n) + ".";
22+
},
23+
formatInputTooLong: function (input, max) {
24+
var n = input.length - max;
25+
return "Wpisana fraza jest za długa o " + n + " znak" + pl_suffix(n) + ".";
26+
},
27+
formatSelectionTooBig: function (limit) {
28+
return "Możesz zaznaczyć najwyżej " + limit + " element" + pl_suffix(limit) + ".";
29+
},
30+
formatLoadMore: function (pageNumber) {
31+
return "Ładowanie wyników...";
32+
},
33+
formatSearching: function () {
34+
return "Szukanie...";
35+
}
36+
});
37+
})(jQuery);

0 commit comments

Comments
 (0)