Skip to content

Commit daea531

Browse files
committed
Lithuanian l10n improved
1 parent 372ec8d commit daea531

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

select2_locale_lt.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
/**
2-
* Select2 lithuanian translation.
2+
* Select2 Lithuanian translation.
33
*
4-
* Author: CRONUS Karmalakas <cronus dot karmalakas at gmail dot com>
4+
* @author CRONUS Karmalakas <cronus dot karmalakas at gmail dot com>
5+
* @author Uriy Efremochkin <efremochkin@uriy.me>
56
*/
67
(function ($) {
78
"use strict";
89

910
$.extend($.fn.select2.defaults, {
1011
formatNoMatches: function () { return "Atitikmenų nerasta"; },
11-
formatInputTooShort: function (input, min) {
12-
var n = min - input.length,
13-
suffix = (n % 10 == 1) && (n % 100 != 11) ? 'į' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'ius' : 'ių');
14-
return "Įrašykite dar " + n + " simbol" + suffix;
15-
},
16-
formatInputTooLong: function (input, max) {
17-
var n = input.length - max,
18-
suffix = (n % 10 == 1) && (n % 100 != 11) ? 'į' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'ius' : 'ių');
19-
return "Pašalinkite " + n + " simbol" + suffix;
20-
},
12+
formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); },
13+
formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); },
2114
formatSelectionTooBig: function (limit) {
22-
var n = limit,
23-
suffix = (n % 10 == 1) && (n % 100 != 11) ? 'ą' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'us' : 'ų');
24-
return "Jūs galite pasirinkti tik " + limit + " element" + suffix;
15+
return "Jūs galite pasirinkti tik " + limit + " element" + ((limit%100 > 9 && limit%100 < 21) || limit%10 == 0 ? "ų" : limit%10 > 1 ? "us" : "ą");
2516
},
2617
formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų..."; },
2718
formatSearching: function () { return "Ieškoma..."; }
2819
});
20+
21+
function character (n) {
22+
return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į");
23+
}
2924
})(jQuery);

0 commit comments

Comments
 (0)