Fixed custom pluralization for russian
This commit is contained in:
@@ -43,25 +43,22 @@ const i18n = new VueI18n({
|
||||
* @returns a final choice index to select plural word by
|
||||
*/
|
||||
ru: function(choice, choicesLength) {
|
||||
if (choice === 0) {
|
||||
return 0
|
||||
}
|
||||
var n = Math.abs(choice) % 100
|
||||
var n1 = n % 10
|
||||
|
||||
if (n > 10 && n < 20) {
|
||||
return 3
|
||||
}
|
||||
|
||||
if (n1 > 1 && n1 < 5) {
|
||||
return 2
|
||||
}
|
||||
|
||||
if (n1 == 1) {
|
||||
if (n1 > 1 && n1 < 5) {
|
||||
return 1
|
||||
}
|
||||
|
||||
return 3
|
||||
if (n1 == 1) {
|
||||
return 0
|
||||
}
|
||||
|
||||
return 2
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user