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