提交 | 用户 | 时间
|
58d006
|
1 |
/** |
A |
2 |
* Select2 Croatian translation. |
|
3 |
* |
|
4 |
* Author: Edi Modrić <edi.modric@gmail.com> |
|
5 |
*/ |
|
6 |
(function ($) { |
|
7 |
"use strict"; |
|
8 |
|
|
9 |
var specialNumbers = { |
|
10 |
1: function(n) { return (n % 100 != 11 ? "znak" : "znakova"); }, |
|
11 |
2: function(n) { return (n % 100 != 12 ? "znaka" : "znakova"); }, |
|
12 |
3: function(n) { return (n % 100 != 13 ? "znaka" : "znakova"); }, |
|
13 |
4: function(n) { return (n % 100 != 14 ? "znaka" : "znakova"); } |
|
14 |
}; |
|
15 |
|
|
16 |
$.extend($.fn.select2.defaults, { |
|
17 |
formatNoMatches: function () { return "Nema rezultata"; }, |
|
18 |
formatInputTooShort: function (input, min) { |
|
19 |
var n = min - input.length; |
|
20 |
var nMod10 = n % 10; |
|
21 |
|
|
22 |
if (nMod10 > 0 && nMod10 < 5) { |
|
23 |
return "Unesite još " + n + " " + specialNumbers[nMod10](n); |
|
24 |
} |
|
25 |
|
|
26 |
return "Unesite još " + n + " znakova"; |
|
27 |
}, |
|
28 |
formatInputTooLong: function (input, max) { |
|
29 |
var n = input.length - max; |
|
30 |
var nMod10 = n % 10; |
|
31 |
|
|
32 |
if (nMod10 > 0 && nMod10 < 5) { |
|
33 |
return "Unesite " + n + " " + specialNumbers[nMod10](n) + " manje"; |
|
34 |
} |
|
35 |
|
|
36 |
return "Unesite " + n + " znakova manje"; |
|
37 |
}, |
|
38 |
formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; }, |
|
39 |
formatLoadMore: function (pageNumber) { return "Učitavanje rezultata..."; }, |
|
40 |
formatSearching: function () { return "Pretraga..."; } |
|
41 |
}); |
|
42 |
})(jQuery); |