mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-20 20:42:44 -05:00
11 lines
245 B
JavaScript
11 lines
245 B
JavaScript
MessageFormat.locale.ru = function (n) {
|
|
var r10 = n % 10, r100 = n % 100;
|
|
|
|
if (r10 == 1 && r100 != 11)
|
|
return 'one';
|
|
|
|
if (r10 >= 2 && r10 <= 4 && (r100 < 12 || r100 > 14) && n == Math.floor(n))
|
|
return 'few';
|
|
|
|
return 'other';
|
|
};
|