forked from select2/select2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4e24cf
commit d9d5355
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
define(function () { | ||
// Bosnian | ||
function ending (count, one, some, many) { | ||
if (count % 10 == 1 && count % 100 != 11) { | ||
return one; | ||
} | ||
|
||
if (count % 10 >= 2 && count % 10 <= 4 && | ||
(count % 100 < 12 || count % 100 > 14)) { | ||
return some; | ||
} | ||
|
||
return many; | ||
} | ||
|
||
return { | ||
errorLoading: function () { | ||
return 'Preuzimanje nije uspijelo.'; | ||
}, | ||
inputTooLong: function (args) { | ||
var overChars = args.input.length - args.maximum; | ||
|
||
var message = 'Obrišite ' + overChars + ' simbol'; | ||
|
||
message += ending(overChars, '', 'a', 'a'); | ||
|
||
return message; | ||
}, | ||
inputTooShort: function (args) { | ||
var remainingChars = args.minimum - args.input.length; | ||
|
||
var message = 'Ukucajte bar još ' + remainingChars + ' simbol'; | ||
|
||
message += ending(remainingChars, '', 'a', 'a'); | ||
|
||
return message; | ||
}, | ||
loadingMore: function () { | ||
return 'Preuzimanje još rezultata…'; | ||
}, | ||
maximumSelected: function (args) { | ||
var message = 'Možete izabrati samo ' + args.maximum + ' stavk'; | ||
|
||
message += ending(args.maximum, 'u', 'e', 'i'); | ||
|
||
return message; | ||
}, | ||
noResults: function () { | ||
return 'Ništa nije pronađeno'; | ||
}, | ||
searching: function () { | ||
return 'Pretraga…'; | ||
} | ||
}; | ||
}); |