1
0
mirror of synced 2024-11-22 04:56:08 +03:00

Fixed broken lithuanian translation

This closes https://github.com/select2/select2/issues/4301.

Signed-off-by: Kevin Brown <kevin@kevin-brown.com>
This commit is contained in:
Aurelijus Rožėnas 2016-04-12 14:28:52 +03:00 committed by Kevin Brown
parent 5a831afb9a
commit 5b5eddd183

View File

@ -1,14 +1,12 @@
define(function () {
// Italian
function ending (count, first, second, third) {
if ((count % 100 > 9 && count % 100 < 21) || count % 10 === 0) {
if (count % 10 > 1) {
return second;
} else {
return third;
}
// rules from http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#lt
function ending(count, one, few, other) {
if (count % 10 === 1 && (count % 100 < 11 || count % 100 > 19)) {
return one;
} else if ((count % 10 >= 2 && count % 10 <= 9) && (count % 100 < 11 || count % 100 > 19)) {
return few;
} else {
return first;
return other;
}
}
@ -18,7 +16,7 @@ define(function () {
var message = 'Pašalinkite ' + overChars + ' simbol';
message += ending(overChars, 'ių', 'ius', ');
message += ending(overChars, 'į', 'ius', 'ių');
return message;
},
@ -27,7 +25,7 @@ define(function () {
var message = 'Įrašykite dar ' + remainingChars + ' simbol';
message += ending(remainingChars, 'ių', 'ius', ');
message += ending(remainingChars, 'į', 'ius', 'ių');
return message;
},
@ -37,7 +35,7 @@ define(function () {
maximumSelected: function (args) {
var message = 'Jūs galite pasirinkti tik ' + args.maximum + ' element';
message += ending(args.maximum, 'ų', 'us', ');
message += ending(args.maximum, 'ą', 'us', ');
return message;
},