fix(common): use correct ICU plural for locale mk (#24659)
PR Close #24659
This commit is contained in:

committed by
Jason Aden

parent
abed2cd52c
commit
39c8baea31
@ -2947,7 +2947,7 @@ export const locale_lv = [
|
||||
function plural_mk(n: number): number {
|
||||
let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length,
|
||||
f = parseInt(n.toString().replace(/^[^.]*\.?/, ''), 10) || 0;
|
||||
if (v === 0 && i % 10 === 1 || f % 10 === 1) return 1;
|
||||
if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11)) return 1;
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ const u = undefined;
|
||||
function plural(n: number): number {
|
||||
let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length,
|
||||
f = parseInt(n.toString().replace(/^[^.]*\.?/, ''), 10) || 0;
|
||||
if (v === 0 && i % 10 === 1 || f % 10 === 1) return 1;
|
||||
if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11)) return 1;
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user