File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ) ;
You can’t perform that action at this time.
0 commit comments