translations.js
43 lines
| 1.5 KiB
| application/javascript
|
JavascriptLexer
r1 | // translate select2 components | |||
select2Locales = { | ||||
formatLoadMore: function(pageNumber) { | ||||
r325 | return _gettext("Loading more results..."); | |||
r1 | }, | |||
formatSearching: function() { | ||||
r325 | return _gettext("Searching..."); | |||
r1 | }, | |||
formatNoMatches: function() { | ||||
r325 | return _gettext("No matches found"); | |||
r1 | }, | |||
formatAjaxError: function(jqXHR, textStatus, errorThrown) { | ||||
r325 | return _gettext("Loading failed"); | |||
r1 | }, | |||
formatMatches: function(matches) { | ||||
if (matches === 1) { | ||||
r325 | return _gettext("One result is available, press enter to select it."); | |||
r1 | } | |||
r325 | return _gettext("{0} results are available, use up and down arrow keys to navigate.").format(matches); | |||
r1 | }, | |||
formatInputTooShort: function(input, min) { | ||||
var n = min - input.length; | ||||
r325 | if (n === 1) { | |||
return _gettext("Please enter {0} or more character").format(n); | ||||
} | ||||
return _gettext("Please enter {0} or more characters").format(n); | ||||
r1 | }, | |||
formatInputTooLong: function(input, max) { | ||||
var n = input.length - max; | ||||
r325 | if (n === 1) { | |||
return _gettext("Please delete {0} character").format(n); | ||||
} | ||||
return _gettext("Please delete {0} characters").format(n); | ||||
r1 | }, | |||
formatSelectionTooBig: function(limit) { | ||||
r325 | if (limit === 1) { | |||
return _gettext("You can only select {0} item").format(limit); | ||||
} | ||||
return _gettext("You can only select {0} items").format(limit); | ||||
r1 | } | |||
}; | ||||
$.extend($.fn.select2.defaults, select2Locales); | ||||