@formatjs/intl-pluralrules 6.3.16 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +12 -1
- package/index.js +9 -1
- package/index.js.map +1 -1
- package/locale-data/af.js +2 -2
- package/locale-data/ak.js +2 -2
- package/locale-data/am.js +2 -2
- package/locale-data/an.js +2 -2
- package/locale-data/ar.js +32 -16
- package/locale-data/ars.js +32 -16
- package/locale-data/as.js +14 -14
- package/locale-data/asa.js +2 -2
- package/locale-data/az.js +26 -10
- package/locale-data/bal.js +4 -4
- package/locale-data/be.js +26 -10
- package/locale-data/bem.js +2 -2
- package/locale-data/bez.js +2 -2
- package/locale-data/bg.js +2 -2
- package/locale-data/bho.js +2 -2
- package/locale-data/blo.js +14 -14
- package/locale-data/bn.js +14 -14
- package/locale-data/br.js +28 -12
- package/locale-data/brx.js +2 -2
- package/locale-data/bs.js +22 -6
- package/locale-data/ca.js +28 -12
- package/locale-data/ce.js +2 -2
- package/locale-data/ceb.js +18 -2
- package/locale-data/cgg.js +2 -2
- package/locale-data/chr.js +2 -2
- package/locale-data/ckb.js +2 -2
- package/locale-data/cs.js +4 -4
- package/locale-data/csw.js +2 -2
- package/locale-data/cv.js +6 -6
- package/locale-data/cy.js +32 -32
- package/locale-data/da.js +2 -2
- package/locale-data/doi.js +2 -2
- package/locale-data/dsb.js +24 -8
- package/locale-data/dv.js +2 -2
- package/locale-data/ee.js +2 -2
- package/locale-data/el.js +2 -2
- package/locale-data/en.js +24 -8
- package/locale-data/eo.js +2 -2
- package/locale-data/es.js +22 -6
- package/locale-data/eu.js +2 -2
- package/locale-data/fa.js +2 -2
- package/locale-data/fil.js +20 -4
- package/locale-data/fo.js +2 -2
- package/locale-data/fr.js +22 -6
- package/locale-data/fur.js +2 -2
- package/locale-data/ga.js +14 -14
- package/locale-data/gd.js +16 -16
- package/locale-data/gsw.js +2 -2
- package/locale-data/gu.js +14 -14
- package/locale-data/guw.js +2 -2
- package/locale-data/gv.js +26 -10
- package/locale-data/ha.js +2 -2
- package/locale-data/haw.js +2 -2
- package/locale-data/hi.js +14 -14
- package/locale-data/hr.js +22 -6
- package/locale-data/hsb.js +24 -8
- package/locale-data/hu.js +4 -4
- package/locale-data/hy.js +2 -2
- package/locale-data/is.js +18 -2
- package/locale-data/it.js +22 -6
- package/locale-data/iu.js +4 -4
- package/locale-data/jgo.js +2 -2
- package/locale-data/jmc.js +2 -2
- package/locale-data/ka.js +22 -6
- package/locale-data/kaj.js +2 -2
- package/locale-data/kcg.js +2 -2
- package/locale-data/kk.js +20 -4
- package/locale-data/kkj.js +2 -2
- package/locale-data/kl.js +2 -2
- package/locale-data/kn.js +2 -2
- package/locale-data/kok-Latn.js +10 -10
- package/locale-data/kok.js +10 -10
- package/locale-data/ks.js +2 -2
- package/locale-data/ksb.js +2 -2
- package/locale-data/ksh.js +6 -6
- package/locale-data/ku.js +2 -2
- package/locale-data/kw.js +38 -22
- package/locale-data/ky.js +2 -2
- package/locale-data/lag.js +6 -6
- package/locale-data/lb.js +2 -2
- package/locale-data/lg.js +2 -2
- package/locale-data/lij.js +2 -2
- package/locale-data/lld.js +22 -6
- package/locale-data/ln.js +2 -2
- package/locale-data/lo.js +2 -2
- package/locale-data/lt.js +22 -6
- package/locale-data/lv.js +22 -6
- package/locale-data/mas.js +2 -2
- package/locale-data/mg.js +2 -2
- package/locale-data/mgo.js +2 -2
- package/locale-data/mk.js +26 -10
- package/locale-data/ml.js +2 -2
- package/locale-data/mn.js +2 -2
- package/locale-data/mo.js +22 -6
- package/locale-data/mr.js +10 -10
- package/locale-data/ms.js +2 -2
- package/locale-data/mt.js +28 -12
- package/locale-data/nah.js +2 -2
- package/locale-data/naq.js +4 -4
- package/locale-data/nb.js +2 -2
- package/locale-data/nd.js +2 -2
- package/locale-data/ne.js +4 -4
- package/locale-data/nn.js +2 -2
- package/locale-data/nnh.js +2 -2
- package/locale-data/no.js +2 -2
- package/locale-data/nr.js +2 -2
- package/locale-data/nso.js +2 -2
- package/locale-data/ny.js +2 -2
- package/locale-data/nyn.js +2 -2
- package/locale-data/om.js +2 -2
- package/locale-data/or.js +14 -14
- package/locale-data/os.js +2 -2
- package/locale-data/pa.js +2 -2
- package/locale-data/pap.js +2 -2
- package/locale-data/pcm.js +2 -2
- package/locale-data/pl.js +24 -8
- package/locale-data/prg.js +22 -6
- package/locale-data/ps.js +2 -2
- package/locale-data/pt-PT.js +20 -4
- package/locale-data/pt.js +20 -4
- package/locale-data/rm.js +2 -2
- package/locale-data/ro.js +22 -6
- package/locale-data/rof.js +2 -2
- package/locale-data/ru.js +24 -8
- package/locale-data/rwk.js +2 -2
- package/locale-data/saq.js +2 -2
- package/locale-data/sat.js +4 -4
- package/locale-data/sc.js +2 -2
- package/locale-data/scn.js +22 -6
- package/locale-data/sd.js +2 -2
- package/locale-data/sdh.js +2 -2
- package/locale-data/se.js +4 -4
- package/locale-data/seh.js +2 -2
- package/locale-data/sgs.js +26 -10
- package/locale-data/sh.js +22 -6
- package/locale-data/shi.js +6 -6
- package/locale-data/si.js +2 -2
- package/locale-data/sk.js +4 -4
- package/locale-data/sl.js +24 -8
- package/locale-data/sma.js +4 -4
- package/locale-data/smi.js +4 -4
- package/locale-data/smj.js +4 -4
- package/locale-data/smn.js +4 -4
- package/locale-data/sms.js +4 -4
- package/locale-data/sn.js +2 -2
- package/locale-data/so.js +2 -2
- package/locale-data/sq.js +24 -8
- package/locale-data/sr.js +22 -6
- package/locale-data/ss.js +2 -2
- package/locale-data/ssy.js +2 -2
- package/locale-data/st.js +2 -2
- package/locale-data/sv.js +18 -2
- package/locale-data/syr.js +2 -2
- package/locale-data/ta.js +2 -2
- package/locale-data/te.js +2 -2
- package/locale-data/teo.js +2 -2
- package/locale-data/ti.js +2 -2
- package/locale-data/tig.js +2 -2
- package/locale-data/tk.js +20 -4
- package/locale-data/tl.js +20 -4
- package/locale-data/tn.js +2 -2
- package/locale-data/tr.js +2 -2
- package/locale-data/ts.js +2 -2
- package/locale-data/tzm.js +2 -2
- package/locale-data/ug.js +2 -2
- package/locale-data/uk.js +26 -10
- package/locale-data/uz.js +2 -2
- package/locale-data/ve.js +2 -2
- package/locale-data/vec.js +22 -6
- package/locale-data/vi.js +2 -2
- package/locale-data/vo.js +2 -2
- package/locale-data/vun.js +2 -2
- package/locale-data/wa.js +2 -2
- package/locale-data/wae.js +2 -2
- package/locale-data/xh.js +2 -2
- package/locale-data/xog.js +2 -2
- package/locale-data/zu.js +2 -2
- package/package.json +2 -2
- package/polyfill-force.js +9 -1
- package/polyfill-force.js.map +1 -1
- package/polyfill.iife.js +2077 -3435
- package/polyfill.js +9 -1
- package/polyfill.js.map +1 -1
- package/should-polyfill.js.map +1 -1
package/locale-data/rwk.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
15
|
}
|
|
16
16
|
return "other";
|
|
@@ -25,7 +25,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
25
25
|
if (isOrdinal) {
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
if (n === 1)
|
|
28
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
29
29
|
return "one";
|
|
30
30
|
}
|
|
31
31
|
return "other";
|
package/locale-data/saq.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
15
|
}
|
|
16
16
|
return "other";
|
|
@@ -25,7 +25,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
25
25
|
if (isOrdinal) {
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
if (n === 1)
|
|
28
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
29
29
|
return "one";
|
|
30
30
|
}
|
|
31
31
|
return "other";
|
package/locale-data/sat.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/sc.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
const i = Math.floor(Math.abs(parseFloat(integerPart)));
|
|
11
11
|
const v = decimalPart.length;
|
|
12
12
|
if (isOrdinal) {
|
|
13
|
-
if ((((n === 11 || n === 8) || n === 80) || n === 800))
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && (((n === 11 || n === 8) || n === 80) || n === 800)))
|
|
14
14
|
return "many";
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
@@ -29,7 +29,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
29
29
|
const i = Math.floor(Math.abs(parseFloat(integerPart)));
|
|
30
30
|
const v = decimalPart.length;
|
|
31
31
|
if (isOrdinal) {
|
|
32
|
-
if ((((n === 11 || n === 8) || n === 80) || n === 800))
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && (((n === 11 || n === 8) || n === 80) || n === 800)))
|
|
33
33
|
return "many";
|
|
34
34
|
}
|
|
35
35
|
else {
|
package/locale-data/scn.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
|
|
4
4
|
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["many","one","other"],"ordinal":["many","other"]},"compactExponents":{"short":{"3":3,"4":3,"5":3,"6":6,"7":6,"8":6,"9":9,"10":9,"11":9,"12":12,"13":12,"14":12},"long":{"3":3,"4":3,"5":3,"6":6,"7":6,"8":6,"9":9,"10":9,"11":9,"12":12,"13":12,"14":12}},"fn":function(num, isOrdinal, exponent = 0) {
|
|
5
|
+
function modDigits(digits, divisor) {
|
|
6
|
+
let value = 0;
|
|
7
|
+
for (let index = 0; index < digits.length; index++) {
|
|
8
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
9
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
5
13
|
const numStr = String(num);
|
|
6
14
|
const parts = numStr.split(".");
|
|
7
15
|
const integerPart = parts[0];
|
|
@@ -11,19 +19,27 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
11
19
|
const v = decimalPart.length;
|
|
12
20
|
const e = exponent;
|
|
13
21
|
if (isOrdinal) {
|
|
14
|
-
if ((((n === 11 || n === 8) || (n >= 80 && n <= 89)) || (n >= 800 && n <= 899)))
|
|
22
|
+
if ((!/[1-9]/.test(decimalPart) && (((n === 11 || n === 8) || (n >= 80 && n <= 89)) || (n >= 800 && n <= 899))))
|
|
15
23
|
return "many";
|
|
16
24
|
}
|
|
17
25
|
else {
|
|
18
|
-
if (e === 0 && i !== 0 && (i % 1000000) === 0 && v === 0 || (e < 0 || e > 5))
|
|
19
|
-
return "many";
|
|
20
26
|
if (i === 1 && v === 0)
|
|
21
27
|
return "one";
|
|
28
|
+
if (e === 0 && i !== 0 && modDigits(integerPart, 1000000) === 0 && v === 0 || (e < 0 || e > 5))
|
|
29
|
+
return "many";
|
|
22
30
|
}
|
|
23
31
|
return "other";
|
|
24
32
|
},"pluralRanges":{"cardinal":{"one_other":"other","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"scn"})
|
|
25
33
|
} else {
|
|
26
34
|
(globalThis.__FORMATJS_PLURALRULES_DATA__ = globalThis.__FORMATJS_PLURALRULES_DATA__ || []).push({"data":{"categories":{"cardinal":["many","one","other"],"ordinal":["many","other"]},"compactExponents":{"short":{"3":3,"4":3,"5":3,"6":6,"7":6,"8":6,"9":9,"10":9,"11":9,"12":12,"13":12,"14":12},"long":{"3":3,"4":3,"5":3,"6":6,"7":6,"8":6,"9":9,"10":9,"11":9,"12":12,"13":12,"14":12}},"fn":function(num, isOrdinal, exponent = 0) {
|
|
35
|
+
function modDigits(digits, divisor) {
|
|
36
|
+
let value = 0;
|
|
37
|
+
for (let index = 0; index < digits.length; index++) {
|
|
38
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
39
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
40
|
+
}
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
27
43
|
const numStr = String(num);
|
|
28
44
|
const parts = numStr.split(".");
|
|
29
45
|
const integerPart = parts[0];
|
|
@@ -33,14 +49,14 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
33
49
|
const v = decimalPart.length;
|
|
34
50
|
const e = exponent;
|
|
35
51
|
if (isOrdinal) {
|
|
36
|
-
if ((((n === 11 || n === 8) || (n >= 80 && n <= 89)) || (n >= 800 && n <= 899)))
|
|
52
|
+
if ((!/[1-9]/.test(decimalPart) && (((n === 11 || n === 8) || (n >= 80 && n <= 89)) || (n >= 800 && n <= 899))))
|
|
37
53
|
return "many";
|
|
38
54
|
}
|
|
39
55
|
else {
|
|
40
|
-
if (e === 0 && i !== 0 && (i % 1000000) === 0 && v === 0 || (e < 0 || e > 5))
|
|
41
|
-
return "many";
|
|
42
56
|
if (i === 1 && v === 0)
|
|
43
57
|
return "one";
|
|
58
|
+
if (e === 0 && i !== 0 && modDigits(integerPart, 1000000) === 0 && v === 0 || (e < 0 || e > 5))
|
|
59
|
+
return "many";
|
|
44
60
|
}
|
|
45
61
|
return "other";
|
|
46
62
|
},"pluralRanges":{"cardinal":{"one_other":"other","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"scn"})
|
package/locale-data/sd.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
15
|
}
|
|
16
16
|
return "other";
|
|
@@ -25,7 +25,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
25
25
|
if (isOrdinal) {
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
if (n === 1)
|
|
28
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
29
29
|
return "one";
|
|
30
30
|
}
|
|
31
31
|
return "other";
|
package/locale-data/sdh.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
15
|
}
|
|
16
16
|
return "other";
|
|
@@ -25,7 +25,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
25
25
|
if (isOrdinal) {
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
if (n === 1)
|
|
28
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
29
29
|
return "one";
|
|
30
30
|
}
|
|
31
31
|
return "other";
|
package/locale-data/se.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/seh.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
15
|
}
|
|
16
16
|
return "other";
|
|
@@ -25,7 +25,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
25
25
|
if (isOrdinal) {
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
if (n === 1)
|
|
28
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
29
29
|
return "one";
|
|
30
30
|
}
|
|
31
31
|
return "other";
|
package/locale-data/sgs.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
|
|
4
4
|
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["few","many","one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
|
|
5
|
+
function modDigits(digits, divisor) {
|
|
6
|
+
let value = 0;
|
|
7
|
+
for (let index = 0; index < digits.length; index++) {
|
|
8
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
9
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
5
13
|
const numStr = String(num);
|
|
6
14
|
const parts = numStr.split(".");
|
|
7
15
|
const integerPart = parts[0];
|
|
@@ -12,19 +20,27 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
12
20
|
if (isOrdinal) {
|
|
13
21
|
}
|
|
14
22
|
else {
|
|
15
|
-
if (
|
|
23
|
+
if ((!/[1-9]/.test(decimalPart) && modDigits(integerPart, 10) === 1) && (/[1-9]/.test(decimalPart) || modDigits(integerPart, 100) !== 11))
|
|
24
|
+
return "one";
|
|
25
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
26
|
+
return "two";
|
|
27
|
+
if ((/[1-9]/.test(decimalPart) || n !== 2) && (!/[1-9]/.test(decimalPart) && (modDigits(integerPart, 10) >= 2 && modDigits(integerPart, 10) <= 9)) && (/[1-9]/.test(decimalPart) || (modDigits(integerPart, 100) < 11 || modDigits(integerPart, 100) > 19)))
|
|
16
28
|
return "few";
|
|
17
29
|
if (f !== 0)
|
|
18
30
|
return "many";
|
|
19
|
-
if ((n % 10) === 1 && (n % 100) !== 11)
|
|
20
|
-
return "one";
|
|
21
|
-
if (n === 2)
|
|
22
|
-
return "two";
|
|
23
31
|
}
|
|
24
32
|
return "other";
|
|
25
33
|
}},"locale":"sgs"})
|
|
26
34
|
} else {
|
|
27
35
|
(globalThis.__FORMATJS_PLURALRULES_DATA__ = globalThis.__FORMATJS_PLURALRULES_DATA__ || []).push({"data":{"categories":{"cardinal":["few","many","one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
|
|
36
|
+
function modDigits(digits, divisor) {
|
|
37
|
+
let value = 0;
|
|
38
|
+
for (let index = 0; index < digits.length; index++) {
|
|
39
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
40
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
28
44
|
const numStr = String(num);
|
|
29
45
|
const parts = numStr.split(".");
|
|
30
46
|
const integerPart = parts[0];
|
|
@@ -35,14 +51,14 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
35
51
|
if (isOrdinal) {
|
|
36
52
|
}
|
|
37
53
|
else {
|
|
38
|
-
if (
|
|
54
|
+
if ((!/[1-9]/.test(decimalPart) && modDigits(integerPart, 10) === 1) && (/[1-9]/.test(decimalPart) || modDigits(integerPart, 100) !== 11))
|
|
55
|
+
return "one";
|
|
56
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
57
|
+
return "two";
|
|
58
|
+
if ((/[1-9]/.test(decimalPart) || n !== 2) && (!/[1-9]/.test(decimalPart) && (modDigits(integerPart, 10) >= 2 && modDigits(integerPart, 10) <= 9)) && (/[1-9]/.test(decimalPart) || (modDigits(integerPart, 100) < 11 || modDigits(integerPart, 100) > 19)))
|
|
39
59
|
return "few";
|
|
40
60
|
if (f !== 0)
|
|
41
61
|
return "many";
|
|
42
|
-
if ((n % 10) === 1 && (n % 100) !== 11)
|
|
43
|
-
return "one";
|
|
44
|
-
if (n === 2)
|
|
45
|
-
return "two";
|
|
46
62
|
}
|
|
47
63
|
return "other";
|
|
48
64
|
}},"locale":"sgs"})
|
package/locale-data/sh.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
|
|
4
4
|
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["few","one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
|
|
5
|
+
function modDigits(digits, divisor) {
|
|
6
|
+
let value = 0;
|
|
7
|
+
for (let index = 0; index < digits.length; index++) {
|
|
8
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
9
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
5
13
|
const numStr = String(num);
|
|
6
14
|
const parts = numStr.split(".");
|
|
7
15
|
const integerPart = parts[0];
|
|
@@ -12,15 +20,23 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
12
20
|
if (isOrdinal) {
|
|
13
21
|
}
|
|
14
22
|
else {
|
|
15
|
-
if (v === 0 && (
|
|
16
|
-
return "few";
|
|
17
|
-
if (v === 0 && (i % 10) === 1 && (i % 100) !== 11 || (f % 10) === 1 && (f % 100) !== 11)
|
|
23
|
+
if (v === 0 && modDigits(integerPart, 10) === 1 && modDigits(integerPart, 100) !== 11 || modDigits(decimalPart, 10) === 1 && modDigits(decimalPart, 100) !== 11)
|
|
18
24
|
return "one";
|
|
25
|
+
if (v === 0 && (modDigits(integerPart, 10) >= 2 && modDigits(integerPart, 10) <= 4) && (modDigits(integerPart, 100) < 12 || modDigits(integerPart, 100) > 14) || (modDigits(decimalPart, 10) >= 2 && modDigits(decimalPart, 10) <= 4) && (modDigits(decimalPart, 100) < 12 || modDigits(decimalPart, 100) > 14))
|
|
26
|
+
return "few";
|
|
19
27
|
}
|
|
20
28
|
return "other";
|
|
21
29
|
}},"locale":"sh"})
|
|
22
30
|
} else {
|
|
23
31
|
(globalThis.__FORMATJS_PLURALRULES_DATA__ = globalThis.__FORMATJS_PLURALRULES_DATA__ || []).push({"data":{"categories":{"cardinal":["few","one","other"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
|
|
32
|
+
function modDigits(digits, divisor) {
|
|
33
|
+
let value = 0;
|
|
34
|
+
for (let index = 0; index < digits.length; index++) {
|
|
35
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
36
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
24
40
|
const numStr = String(num);
|
|
25
41
|
const parts = numStr.split(".");
|
|
26
42
|
const integerPart = parts[0];
|
|
@@ -31,10 +47,10 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
31
47
|
if (isOrdinal) {
|
|
32
48
|
}
|
|
33
49
|
else {
|
|
34
|
-
if (v === 0 && (
|
|
35
|
-
return "few";
|
|
36
|
-
if (v === 0 && (i % 10) === 1 && (i % 100) !== 11 || (f % 10) === 1 && (f % 100) !== 11)
|
|
50
|
+
if (v === 0 && modDigits(integerPart, 10) === 1 && modDigits(integerPart, 100) !== 11 || modDigits(decimalPart, 10) === 1 && modDigits(decimalPart, 100) !== 11)
|
|
37
51
|
return "one";
|
|
52
|
+
if (v === 0 && (modDigits(integerPart, 10) >= 2 && modDigits(integerPart, 10) <= 4) && (modDigits(integerPart, 100) < 12 || modDigits(integerPart, 100) > 14) || (modDigits(decimalPart, 10) >= 2 && modDigits(decimalPart, 10) <= 4) && (modDigits(decimalPart, 100) < 12 || modDigits(decimalPart, 100) > 14))
|
|
53
|
+
return "few";
|
|
38
54
|
}
|
|
39
55
|
return "other";
|
|
40
56
|
}},"locale":"sh"})
|
package/locale-data/shi.js
CHANGED
|
@@ -11,10 +11,10 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
11
11
|
if (isOrdinal) {
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
|
-
if (
|
|
15
|
-
return "few";
|
|
16
|
-
if (i === 0 || n === 1)
|
|
14
|
+
if (i === 0 || (!/[1-9]/.test(decimalPart) && n === 1))
|
|
17
15
|
return "one";
|
|
16
|
+
if ((!/[1-9]/.test(decimalPart) && (n >= 2 && n <= 10)))
|
|
17
|
+
return "few";
|
|
18
18
|
}
|
|
19
19
|
return "other";
|
|
20
20
|
}},"locale":"shi"})
|
|
@@ -29,10 +29,10 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
29
29
|
if (isOrdinal) {
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
if (
|
|
33
|
-
return "few";
|
|
34
|
-
if (i === 0 || n === 1)
|
|
32
|
+
if (i === 0 || (!/[1-9]/.test(decimalPart) && n === 1))
|
|
35
33
|
return "one";
|
|
34
|
+
if ((!/[1-9]/.test(decimalPart) && (n >= 2 && n <= 10)))
|
|
35
|
+
return "few";
|
|
36
36
|
}
|
|
37
37
|
return "other";
|
|
38
38
|
}},"locale":"shi"})
|
package/locale-data/si.js
CHANGED
|
@@ -13,7 +13,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
13
13
|
if (isOrdinal) {
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
|
-
if ((n === 0 || n === 1) || i === 0 && f === 1)
|
|
16
|
+
if ((!/[1-9]/.test(decimalPart) && (n === 0 || n === 1)) || i === 0 && f === 1)
|
|
17
17
|
return "one";
|
|
18
18
|
}
|
|
19
19
|
return "other";
|
|
@@ -31,7 +31,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
31
31
|
if (isOrdinal) {
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
if ((n === 0 || n === 1) || i === 0 && f === 1)
|
|
34
|
+
if ((!/[1-9]/.test(decimalPart) && (n === 0 || n === 1)) || i === 0 && f === 1)
|
|
35
35
|
return "one";
|
|
36
36
|
}
|
|
37
37
|
return "other";
|
package/locale-data/sk.js
CHANGED
|
@@ -11,12 +11,12 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
11
11
|
if (isOrdinal) {
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
|
+
if (i === 1 && v === 0)
|
|
15
|
+
return "one";
|
|
14
16
|
if ((i >= 2 && i <= 4) && v === 0)
|
|
15
17
|
return "few";
|
|
16
18
|
if (v !== 0)
|
|
17
19
|
return "many";
|
|
18
|
-
if (i === 1 && v === 0)
|
|
19
|
-
return "one";
|
|
20
20
|
}
|
|
21
21
|
return "other";
|
|
22
22
|
},"pluralRanges":{"cardinal":{"few_few":"few","few_many":"many","few_other":"other","many_few":"few","many_many":"many","many_one":"one","many_other":"other","one_few":"few","one_many":"many","one_other":"other","other_few":"few","other_many":"many","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"sk"})
|
|
@@ -31,12 +31,12 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
31
31
|
if (isOrdinal) {
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
+
if (i === 1 && v === 0)
|
|
35
|
+
return "one";
|
|
34
36
|
if ((i >= 2 && i <= 4) && v === 0)
|
|
35
37
|
return "few";
|
|
36
38
|
if (v !== 0)
|
|
37
39
|
return "many";
|
|
38
|
-
if (i === 1 && v === 0)
|
|
39
|
-
return "one";
|
|
40
40
|
}
|
|
41
41
|
return "other";
|
|
42
42
|
},"pluralRanges":{"cardinal":{"few_few":"few","few_many":"many","few_other":"other","many_few":"few","many_many":"many","many_one":"one","many_other":"other","one_few":"few","one_many":"many","one_other":"other","other_few":"few","other_many":"many","other_one":"one","other_other":"other"},"ordinal":{}}},"locale":"sk"})
|
package/locale-data/sl.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') {
|
|
4
4
|
Intl.PluralRules.__addLocaleData({"data":{"categories":{"cardinal":["few","one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
|
|
5
|
+
function modDigits(digits, divisor) {
|
|
6
|
+
let value = 0;
|
|
7
|
+
for (let index = 0; index < digits.length; index++) {
|
|
8
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
9
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
5
13
|
const numStr = String(num);
|
|
6
14
|
const parts = numStr.split(".");
|
|
7
15
|
const integerPart = parts[0];
|
|
@@ -11,17 +19,25 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
11
19
|
if (isOrdinal) {
|
|
12
20
|
}
|
|
13
21
|
else {
|
|
14
|
-
if (v === 0 && (
|
|
15
|
-
return "few";
|
|
16
|
-
if (v === 0 && (i % 100) === 1)
|
|
22
|
+
if (v === 0 && modDigits(integerPart, 100) === 1)
|
|
17
23
|
return "one";
|
|
18
|
-
if (v === 0 && (
|
|
24
|
+
if (v === 0 && modDigits(integerPart, 100) === 2)
|
|
19
25
|
return "two";
|
|
26
|
+
if (v === 0 && (modDigits(integerPart, 100) >= 3 && modDigits(integerPart, 100) <= 4) || v !== 0)
|
|
27
|
+
return "few";
|
|
20
28
|
}
|
|
21
29
|
return "other";
|
|
22
30
|
},"pluralRanges":{"cardinal":{"few_few":"few","few_one":"few","few_other":"other","few_two":"two","one_few":"few","one_one":"few","one_other":"other","one_two":"two","other_few":"few","other_one":"few","other_other":"other","other_two":"two","two_few":"few","two_one":"few","two_other":"other","two_two":"two"},"ordinal":{}}},"locale":"sl"})
|
|
23
31
|
} else {
|
|
24
32
|
(globalThis.__FORMATJS_PLURALRULES_DATA__ = globalThis.__FORMATJS_PLURALRULES_DATA__ || []).push({"data":{"categories":{"cardinal":["few","one","other","two"],"ordinal":["other"]},"fn":function(num, isOrdinal, exponent = 0) {
|
|
33
|
+
function modDigits(digits, divisor) {
|
|
34
|
+
let value = 0;
|
|
35
|
+
for (let index = 0; index < digits.length; index++) {
|
|
36
|
+
const digit = digits.charCodeAt(index) - 48;
|
|
37
|
+
if (digit >= 0 && digit <= 9) value = (value * 10 + digit) % divisor;
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
25
41
|
const numStr = String(num);
|
|
26
42
|
const parts = numStr.split(".");
|
|
27
43
|
const integerPart = parts[0];
|
|
@@ -31,12 +47,12 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
31
47
|
if (isOrdinal) {
|
|
32
48
|
}
|
|
33
49
|
else {
|
|
34
|
-
if (v === 0 && (
|
|
35
|
-
return "few";
|
|
36
|
-
if (v === 0 && (i % 100) === 1)
|
|
50
|
+
if (v === 0 && modDigits(integerPart, 100) === 1)
|
|
37
51
|
return "one";
|
|
38
|
-
if (v === 0 && (
|
|
52
|
+
if (v === 0 && modDigits(integerPart, 100) === 2)
|
|
39
53
|
return "two";
|
|
54
|
+
if (v === 0 && (modDigits(integerPart, 100) >= 3 && modDigits(integerPart, 100) <= 4) || v !== 0)
|
|
55
|
+
return "few";
|
|
40
56
|
}
|
|
41
57
|
return "other";
|
|
42
58
|
},"pluralRanges":{"cardinal":{"few_few":"few","few_one":"few","few_other":"other","few_two":"two","one_few":"few","one_one":"few","one_other":"other","one_two":"two","other_few":"few","other_one":"few","other_other":"other","other_two":"two","two_few":"few","two_one":"few","two_other":"other","two_two":"two"},"ordinal":{}}},"locale":"sl"})
|
package/locale-data/sma.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/smi.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/smj.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/smn.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/sms.js
CHANGED
|
@@ -10,9 +10,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
|
-
if (n === 2)
|
|
15
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
16
16
|
return "two";
|
|
17
17
|
}
|
|
18
18
|
return "other";
|
|
@@ -27,9 +27,9 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
27
27
|
if (isOrdinal) {
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
if (n === 1)
|
|
30
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
31
31
|
return "one";
|
|
32
|
-
if (n === 2)
|
|
32
|
+
if ((!/[1-9]/.test(decimalPart) && n === 2))
|
|
33
33
|
return "two";
|
|
34
34
|
}
|
|
35
35
|
return "other";
|
package/locale-data/sn.js
CHANGED
|
@@ -10,7 +10,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
10
10
|
if (isOrdinal) {
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
if (n === 1)
|
|
13
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
14
14
|
return "one";
|
|
15
15
|
}
|
|
16
16
|
return "other";
|
|
@@ -25,7 +25,7 @@ if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function')
|
|
|
25
25
|
if (isOrdinal) {
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
if (n === 1)
|
|
28
|
+
if ((!/[1-9]/.test(decimalPart) && n === 1))
|
|
29
29
|
return "one";
|
|
30
30
|
}
|
|
31
31
|
return "other";
|