@lingui/format-po-gettext 5.9.2 → 6.0.0-next.1

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.
@@ -1,19 +1,3117 @@
1
1
  import { parse } from '@messageformat/parser';
2
- import pluralsCldr from 'plurals-cldr';
3
2
  import PO from 'pofile';
4
- import gettextPlurals from 'node-gettext/lib/plurals';
5
3
  import { generateMessageId } from '@lingui/message-utils/generateMessageId';
6
4
  import { formatter as formatter$1 } from '@lingui/format-po';
7
- import cardinals from 'cldr-core/supplemental/plurals.json';
8
5
 
9
- function renameKeys(rules) {
10
- const result = {};
11
- Object.keys(rules).forEach((k) => {
12
- const newKey = k.match(/[^-]+$/)[0];
13
- result[newKey] = rules[k];
14
- });
15
- return result;
16
- }
6
+ const af = {
7
+ name: "Afrikaans",
8
+ formula: "n != 1",
9
+ plurals: 2,
10
+ cases: [
11
+ "one",
12
+ "other"
13
+ ],
14
+ examples: {
15
+ one: "1",
16
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
17
+ }
18
+ };
19
+ const ak = {
20
+ name: "Akan",
21
+ formula: "n > 1",
22
+ plurals: 2,
23
+ cases: [
24
+ "one",
25
+ "other"
26
+ ],
27
+ examples: {
28
+ one: "0, 1",
29
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
30
+ }
31
+ };
32
+ const am = {
33
+ name: "Amharic",
34
+ formula: "n > 1",
35
+ plurals: 2,
36
+ cases: [
37
+ "one",
38
+ "other"
39
+ ],
40
+ examples: {
41
+ one: "0, 1",
42
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
43
+ }
44
+ };
45
+ const an = {
46
+ name: "Aragonese",
47
+ formula: "n != 1",
48
+ plurals: 2,
49
+ cases: [
50
+ "one",
51
+ "other"
52
+ ],
53
+ examples: {
54
+ one: "1",
55
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
56
+ }
57
+ };
58
+ const ar = {
59
+ name: "Arabic",
60
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n % 100 >= 3 && n % 100 <= 10) ? 3 : ((n % 100 >= 11 && n % 100 <= 99) ? 4 : 5))))",
61
+ plurals: 6,
62
+ cases: [
63
+ "zero",
64
+ "one",
65
+ "two",
66
+ "few",
67
+ "many",
68
+ "other"
69
+ ],
70
+ examples: {
71
+ zero: "0",
72
+ one: "1",
73
+ two: "2",
74
+ few: "3~10, 103~110, 1003, …",
75
+ many: "11~26, 111, 1011, …",
76
+ other: "100~102, 200~202, 300~302, 400~402, 500~502, 600, 1000, 10000, 100000, 1000000, …"
77
+ }
78
+ };
79
+ const ars = {
80
+ name: "Najdi Arabic",
81
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n % 100 >= 3 && n % 100 <= 10) ? 3 : ((n % 100 >= 11 && n % 100 <= 99) ? 4 : 5))))",
82
+ plurals: 6,
83
+ cases: [
84
+ "zero",
85
+ "one",
86
+ "two",
87
+ "few",
88
+ "many",
89
+ "other"
90
+ ],
91
+ examples: {
92
+ zero: "0",
93
+ one: "1",
94
+ two: "2",
95
+ few: "3~10, 103~110, 1003, …",
96
+ many: "11~26, 111, 1011, …",
97
+ other: "100~102, 200~202, 300~302, 400~402, 500~502, 600, 1000, 10000, 100000, 1000000, …"
98
+ }
99
+ };
100
+ const as = {
101
+ name: "Assamese",
102
+ formula: "n > 1",
103
+ plurals: 2,
104
+ cases: [
105
+ "one",
106
+ "other"
107
+ ],
108
+ examples: {
109
+ one: "0, 1",
110
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
111
+ }
112
+ };
113
+ const asa = {
114
+ name: "Asu",
115
+ formula: "n != 1",
116
+ plurals: 2,
117
+ cases: [
118
+ "one",
119
+ "other"
120
+ ],
121
+ examples: {
122
+ one: "1",
123
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
124
+ }
125
+ };
126
+ const ast = {
127
+ name: "Asturian",
128
+ formula: "n != 1",
129
+ plurals: 2,
130
+ cases: [
131
+ "one",
132
+ "other"
133
+ ],
134
+ examples: {
135
+ one: "1",
136
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
137
+ }
138
+ };
139
+ const az = {
140
+ name: "Azerbaijani",
141
+ formula: "n != 1",
142
+ plurals: 2,
143
+ cases: [
144
+ "one",
145
+ "other"
146
+ ],
147
+ examples: {
148
+ one: "1",
149
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
150
+ }
151
+ };
152
+ const bal = {
153
+ name: "Baluchi",
154
+ formula: "n != 1",
155
+ plurals: 2,
156
+ cases: [
157
+ "one",
158
+ "other"
159
+ ],
160
+ examples: {
161
+ one: "1",
162
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
163
+ }
164
+ };
165
+ const be = {
166
+ name: "Belarusian",
167
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
168
+ plurals: 3,
169
+ cases: [
170
+ "one",
171
+ "few",
172
+ "other"
173
+ ],
174
+ examples: {
175
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
176
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
177
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
178
+ }
179
+ };
180
+ const bem = {
181
+ name: "Bemba",
182
+ formula: "n != 1",
183
+ plurals: 2,
184
+ cases: [
185
+ "one",
186
+ "other"
187
+ ],
188
+ examples: {
189
+ one: "1",
190
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
191
+ }
192
+ };
193
+ const bez = {
194
+ name: "Bena",
195
+ formula: "n != 1",
196
+ plurals: 2,
197
+ cases: [
198
+ "one",
199
+ "other"
200
+ ],
201
+ examples: {
202
+ one: "1",
203
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
204
+ }
205
+ };
206
+ const bg = {
207
+ name: "Bulgarian",
208
+ formula: "n != 1",
209
+ plurals: 2,
210
+ cases: [
211
+ "one",
212
+ "other"
213
+ ],
214
+ examples: {
215
+ one: "1",
216
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
217
+ }
218
+ };
219
+ const bho = {
220
+ name: "Bhojpuri",
221
+ formula: "n > 1",
222
+ plurals: 2,
223
+ cases: [
224
+ "one",
225
+ "other"
226
+ ],
227
+ examples: {
228
+ one: "0, 1",
229
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
230
+ }
231
+ };
232
+ const blo = {
233
+ name: "Anii",
234
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : 2)",
235
+ plurals: 3,
236
+ cases: [
237
+ "zero",
238
+ "one",
239
+ "other"
240
+ ],
241
+ examples: {
242
+ zero: "0",
243
+ one: "1",
244
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
245
+ }
246
+ };
247
+ const bm = {
248
+ name: "Bambara",
249
+ formula: "0",
250
+ plurals: 1,
251
+ cases: [
252
+ "other"
253
+ ],
254
+ examples: {
255
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
256
+ }
257
+ };
258
+ const bn = {
259
+ name: "Bangla",
260
+ formula: "n > 1",
261
+ plurals: 2,
262
+ cases: [
263
+ "one",
264
+ "other"
265
+ ],
266
+ examples: {
267
+ one: "0, 1",
268
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
269
+ }
270
+ };
271
+ const bo = {
272
+ name: "Tibetan",
273
+ formula: "0",
274
+ plurals: 1,
275
+ cases: [
276
+ "other"
277
+ ],
278
+ examples: {
279
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
280
+ }
281
+ };
282
+ const br = {
283
+ name: "Breton",
284
+ formula: "(n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) ? 0 : ((n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) ? 1 : ((((n % 10 == 3 || n % 10 == 4) || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) ? 2 : ((n != 0 && n % 1000000 == 0) ? 3 : 4)))",
285
+ plurals: 5,
286
+ cases: [
287
+ "one",
288
+ "two",
289
+ "few",
290
+ "many",
291
+ "other"
292
+ ],
293
+ examples: {
294
+ one: "1, 21, 31, 41, 51, 61, 81, 101, 1001, …",
295
+ two: "2, 22, 32, 42, 52, 62, 82, 102, 1002, …",
296
+ few: "3, 4, 9, 23, 24, 29, 33, 34, 39, 43, 44, 49, 103, 1003, …",
297
+ many: "1000000, …",
298
+ other: "0, 5~8, 10~20, 100, 1000, 10000, 100000, …"
299
+ }
300
+ };
301
+ const brx = {
302
+ name: "Bodo",
303
+ formula: "n != 1",
304
+ plurals: 2,
305
+ cases: [
306
+ "one",
307
+ "other"
308
+ ],
309
+ examples: {
310
+ one: "1",
311
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
312
+ }
313
+ };
314
+ const bs = {
315
+ name: "Bosnian",
316
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
317
+ plurals: 3,
318
+ cases: [
319
+ "one",
320
+ "few",
321
+ "other"
322
+ ],
323
+ examples: {
324
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
325
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
326
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
327
+ }
328
+ };
329
+ const ca = {
330
+ name: "Catalan",
331
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
332
+ plurals: 3,
333
+ cases: [
334
+ "one",
335
+ "many",
336
+ "other"
337
+ ],
338
+ examples: {
339
+ one: "1",
340
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
341
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
342
+ }
343
+ };
344
+ const ce = {
345
+ name: "Chechen",
346
+ formula: "n != 1",
347
+ plurals: 2,
348
+ cases: [
349
+ "one",
350
+ "other"
351
+ ],
352
+ examples: {
353
+ one: "1",
354
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
355
+ }
356
+ };
357
+ const ceb = {
358
+ name: "Cebuano",
359
+ formula: "n != 1 && n != 2 && n != 3 && (n % 10 == 4 || n % 10 == 6 || n % 10 == 9)",
360
+ plurals: 2,
361
+ cases: [
362
+ "one",
363
+ "other"
364
+ ],
365
+ examples: {
366
+ one: "0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, …",
367
+ other: "4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, …"
368
+ }
369
+ };
370
+ const cgg = {
371
+ name: "Chiga",
372
+ formula: "n != 1",
373
+ plurals: 2,
374
+ cases: [
375
+ "one",
376
+ "other"
377
+ ],
378
+ examples: {
379
+ one: "1",
380
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
381
+ }
382
+ };
383
+ const chr = {
384
+ name: "Cherokee",
385
+ formula: "n != 1",
386
+ plurals: 2,
387
+ cases: [
388
+ "one",
389
+ "other"
390
+ ],
391
+ examples: {
392
+ one: "1",
393
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
394
+ }
395
+ };
396
+ const ckb = {
397
+ name: "Central Kurdish",
398
+ formula: "n != 1",
399
+ plurals: 2,
400
+ cases: [
401
+ "one",
402
+ "other"
403
+ ],
404
+ examples: {
405
+ one: "1",
406
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
407
+ }
408
+ };
409
+ const cs = {
410
+ name: "Czech",
411
+ formula: "(n == 1) ? 0 : ((n >= 2 && n <= 4) ? 1 : 2)",
412
+ plurals: 3,
413
+ cases: [
414
+ "one",
415
+ "few",
416
+ "other"
417
+ ],
418
+ examples: {
419
+ one: "1",
420
+ few: "2~4",
421
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
422
+ }
423
+ };
424
+ const csw = {
425
+ name: "Swampy Cree",
426
+ formula: "n > 1",
427
+ plurals: 2,
428
+ cases: [
429
+ "one",
430
+ "other"
431
+ ],
432
+ examples: {
433
+ one: "0, 1",
434
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
435
+ }
436
+ };
437
+ const cy = {
438
+ name: "Welsh",
439
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n == 3) ? 3 : ((n == 6) ? 4 : 5))))",
440
+ plurals: 6,
441
+ cases: [
442
+ "zero",
443
+ "one",
444
+ "two",
445
+ "few",
446
+ "many",
447
+ "other"
448
+ ],
449
+ examples: {
450
+ zero: "0",
451
+ one: "1",
452
+ two: "2",
453
+ few: "3",
454
+ many: "6",
455
+ other: "4, 5, 7~20, 100, 1000, 10000, 100000, 1000000, …"
456
+ }
457
+ };
458
+ const da = {
459
+ name: "Danish",
460
+ formula: "n != 1",
461
+ plurals: 2,
462
+ cases: [
463
+ "one",
464
+ "other"
465
+ ],
466
+ examples: {
467
+ one: "1",
468
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
469
+ }
470
+ };
471
+ const de = {
472
+ name: "German",
473
+ formula: "n != 1",
474
+ plurals: 2,
475
+ cases: [
476
+ "one",
477
+ "other"
478
+ ],
479
+ examples: {
480
+ one: "1",
481
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
482
+ }
483
+ };
484
+ const doi = {
485
+ name: "Dogri",
486
+ formula: "n > 1",
487
+ plurals: 2,
488
+ cases: [
489
+ "one",
490
+ "other"
491
+ ],
492
+ examples: {
493
+ one: "0, 1",
494
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
495
+ }
496
+ };
497
+ const dsb = {
498
+ name: "Lower Sorbian",
499
+ formula: "(n % 100 == 1) ? 0 : ((n % 100 == 2) ? 1 : ((n % 100 == 3 || n % 100 == 4) ? 2 : 3))",
500
+ plurals: 4,
501
+ cases: [
502
+ "one",
503
+ "two",
504
+ "few",
505
+ "other"
506
+ ],
507
+ examples: {
508
+ one: "1, 101, 201, 301, 401, 501, 601, 701, 1001, …",
509
+ two: "2, 102, 202, 302, 402, 502, 602, 702, 1002, …",
510
+ few: "3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, …",
511
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
512
+ }
513
+ };
514
+ const dv = {
515
+ name: "Divehi",
516
+ formula: "n != 1",
517
+ plurals: 2,
518
+ cases: [
519
+ "one",
520
+ "other"
521
+ ],
522
+ examples: {
523
+ one: "1",
524
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
525
+ }
526
+ };
527
+ const dz = {
528
+ name: "Dzongkha",
529
+ formula: "0",
530
+ plurals: 1,
531
+ cases: [
532
+ "other"
533
+ ],
534
+ examples: {
535
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
536
+ }
537
+ };
538
+ const ee = {
539
+ name: "Ewe",
540
+ formula: "n != 1",
541
+ plurals: 2,
542
+ cases: [
543
+ "one",
544
+ "other"
545
+ ],
546
+ examples: {
547
+ one: "1",
548
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
549
+ }
550
+ };
551
+ const el = {
552
+ name: "Greek",
553
+ formula: "n != 1",
554
+ plurals: 2,
555
+ cases: [
556
+ "one",
557
+ "other"
558
+ ],
559
+ examples: {
560
+ one: "1",
561
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
562
+ }
563
+ };
564
+ const en = {
565
+ name: "English",
566
+ formula: "n != 1",
567
+ plurals: 2,
568
+ cases: [
569
+ "one",
570
+ "other"
571
+ ],
572
+ examples: {
573
+ one: "1",
574
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
575
+ }
576
+ };
577
+ const eo = {
578
+ name: "Esperanto",
579
+ formula: "n != 1",
580
+ plurals: 2,
581
+ cases: [
582
+ "one",
583
+ "other"
584
+ ],
585
+ examples: {
586
+ one: "1",
587
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
588
+ }
589
+ };
590
+ const es = {
591
+ name: "Spanish",
592
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
593
+ plurals: 3,
594
+ cases: [
595
+ "one",
596
+ "many",
597
+ "other"
598
+ ],
599
+ examples: {
600
+ one: "1",
601
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
602
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
603
+ }
604
+ };
605
+ const et = {
606
+ name: "Estonian",
607
+ formula: "n != 1",
608
+ plurals: 2,
609
+ cases: [
610
+ "one",
611
+ "other"
612
+ ],
613
+ examples: {
614
+ one: "1",
615
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
616
+ }
617
+ };
618
+ const eu = {
619
+ name: "Basque",
620
+ formula: "n != 1",
621
+ plurals: 2,
622
+ cases: [
623
+ "one",
624
+ "other"
625
+ ],
626
+ examples: {
627
+ one: "1",
628
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
629
+ }
630
+ };
631
+ const fa = {
632
+ name: "Persian",
633
+ formula: "n > 1",
634
+ plurals: 2,
635
+ cases: [
636
+ "one",
637
+ "other"
638
+ ],
639
+ examples: {
640
+ one: "0, 1",
641
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
642
+ }
643
+ };
644
+ const ff = {
645
+ name: "Fula",
646
+ formula: "n > 1",
647
+ plurals: 2,
648
+ cases: [
649
+ "one",
650
+ "other"
651
+ ],
652
+ examples: {
653
+ one: "0, 1",
654
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
655
+ }
656
+ };
657
+ const fi = {
658
+ name: "Finnish",
659
+ formula: "n != 1",
660
+ plurals: 2,
661
+ cases: [
662
+ "one",
663
+ "other"
664
+ ],
665
+ examples: {
666
+ one: "1",
667
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
668
+ }
669
+ };
670
+ const fil = {
671
+ name: "Filipino",
672
+ formula: "n != 1 && n != 2 && n != 3 && (n % 10 == 4 || n % 10 == 6 || n % 10 == 9)",
673
+ plurals: 2,
674
+ cases: [
675
+ "one",
676
+ "other"
677
+ ],
678
+ examples: {
679
+ one: "0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, …",
680
+ other: "4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, …"
681
+ }
682
+ };
683
+ const fo = {
684
+ name: "Faroese",
685
+ formula: "n != 1",
686
+ plurals: 2,
687
+ cases: [
688
+ "one",
689
+ "other"
690
+ ],
691
+ examples: {
692
+ one: "1",
693
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
694
+ }
695
+ };
696
+ const fr = {
697
+ name: "French",
698
+ formula: "(n == 0 || n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
699
+ plurals: 3,
700
+ cases: [
701
+ "one",
702
+ "many",
703
+ "other"
704
+ ],
705
+ examples: {
706
+ one: "0, 1",
707
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
708
+ other: "2~17, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
709
+ }
710
+ };
711
+ const fur = {
712
+ name: "Friulian",
713
+ formula: "n != 1",
714
+ plurals: 2,
715
+ cases: [
716
+ "one",
717
+ "other"
718
+ ],
719
+ examples: {
720
+ one: "1",
721
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
722
+ }
723
+ };
724
+ const fy = {
725
+ name: "Western Frisian",
726
+ formula: "n != 1",
727
+ plurals: 2,
728
+ cases: [
729
+ "one",
730
+ "other"
731
+ ],
732
+ examples: {
733
+ one: "1",
734
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
735
+ }
736
+ };
737
+ const ga = {
738
+ name: "Irish",
739
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : ((n >= 3 && n <= 6) ? 2 : ((n >= 7 && n <= 10) ? 3 : 4)))",
740
+ plurals: 5,
741
+ cases: [
742
+ "one",
743
+ "two",
744
+ "few",
745
+ "many",
746
+ "other"
747
+ ],
748
+ examples: {
749
+ one: "1",
750
+ two: "2",
751
+ few: "3~6",
752
+ many: "7~10",
753
+ other: "0, 11~25, 100, 1000, 10000, 100000, 1000000, …"
754
+ }
755
+ };
756
+ const gd = {
757
+ name: "Scottish Gaelic",
758
+ formula: "(n == 1 || n == 11) ? 0 : ((n == 2 || n == 12) ? 1 : ((n >= 3 && n <= 10 || n >= 13 && n <= 19) ? 2 : 3))",
759
+ plurals: 4,
760
+ cases: [
761
+ "one",
762
+ "two",
763
+ "few",
764
+ "other"
765
+ ],
766
+ examples: {
767
+ one: "1, 11",
768
+ two: "2, 12",
769
+ few: "3~10, 13~19",
770
+ other: "0, 20~34, 100, 1000, 10000, 100000, 1000000, …"
771
+ }
772
+ };
773
+ const gl = {
774
+ name: "Galician",
775
+ formula: "n != 1",
776
+ plurals: 2,
777
+ cases: [
778
+ "one",
779
+ "other"
780
+ ],
781
+ examples: {
782
+ one: "1",
783
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
784
+ }
785
+ };
786
+ const gsw = {
787
+ name: "Swiss German",
788
+ formula: "n != 1",
789
+ plurals: 2,
790
+ cases: [
791
+ "one",
792
+ "other"
793
+ ],
794
+ examples: {
795
+ one: "1",
796
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
797
+ }
798
+ };
799
+ const gu = {
800
+ name: "Gujarati",
801
+ formula: "n > 1",
802
+ plurals: 2,
803
+ cases: [
804
+ "one",
805
+ "other"
806
+ ],
807
+ examples: {
808
+ one: "0, 1",
809
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
810
+ }
811
+ };
812
+ const guw = {
813
+ name: "Gun",
814
+ formula: "n > 1",
815
+ plurals: 2,
816
+ cases: [
817
+ "one",
818
+ "other"
819
+ ],
820
+ examples: {
821
+ one: "0, 1",
822
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
823
+ }
824
+ };
825
+ const gv = {
826
+ name: "Manx",
827
+ formula: "(n % 10 == 1) ? 0 : ((n % 10 == 2) ? 1 : ((n % 100 == 0 || n % 100 == 20 || n % 100 == 40 || n % 100 == 60 || n % 100 == 80) ? 2 : 3))",
828
+ plurals: 4,
829
+ cases: [
830
+ "one",
831
+ "two",
832
+ "few",
833
+ "other"
834
+ ],
835
+ examples: {
836
+ one: "1, 11, 21, 31, 41, 51, 61, 71, 101, 1001, …",
837
+ two: "2, 12, 22, 32, 42, 52, 62, 72, 102, 1002, …",
838
+ few: "0, 20, 40, 60, 80, 100, 120, 140, 1000, 10000, 100000, 1000000, …",
839
+ other: "3~10, 13~19, 23, 103, 1003, …"
840
+ }
841
+ };
842
+ const ha = {
843
+ name: "Hausa",
844
+ formula: "n != 1",
845
+ plurals: 2,
846
+ cases: [
847
+ "one",
848
+ "other"
849
+ ],
850
+ examples: {
851
+ one: "1",
852
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
853
+ }
854
+ };
855
+ const haw = {
856
+ name: "Hawaiian",
857
+ formula: "n != 1",
858
+ plurals: 2,
859
+ cases: [
860
+ "one",
861
+ "other"
862
+ ],
863
+ examples: {
864
+ one: "1",
865
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
866
+ }
867
+ };
868
+ const he = {
869
+ name: "Hebrew",
870
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
871
+ plurals: 3,
872
+ cases: [
873
+ "one",
874
+ "two",
875
+ "other"
876
+ ],
877
+ examples: {
878
+ one: "1",
879
+ two: "2",
880
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
881
+ }
882
+ };
883
+ const hi = {
884
+ name: "Hindi",
885
+ formula: "n > 1",
886
+ plurals: 2,
887
+ cases: [
888
+ "one",
889
+ "other"
890
+ ],
891
+ examples: {
892
+ one: "0, 1",
893
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
894
+ }
895
+ };
896
+ const hnj = {
897
+ name: "Hmong Njua",
898
+ formula: "0",
899
+ plurals: 1,
900
+ cases: [
901
+ "other"
902
+ ],
903
+ examples: {
904
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
905
+ }
906
+ };
907
+ const hr = {
908
+ name: "Croatian",
909
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
910
+ plurals: 3,
911
+ cases: [
912
+ "one",
913
+ "few",
914
+ "other"
915
+ ],
916
+ examples: {
917
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
918
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
919
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
920
+ }
921
+ };
922
+ const hsb = {
923
+ name: "Upper Sorbian",
924
+ formula: "(n % 100 == 1) ? 0 : ((n % 100 == 2) ? 1 : ((n % 100 == 3 || n % 100 == 4) ? 2 : 3))",
925
+ plurals: 4,
926
+ cases: [
927
+ "one",
928
+ "two",
929
+ "few",
930
+ "other"
931
+ ],
932
+ examples: {
933
+ one: "1, 101, 201, 301, 401, 501, 601, 701, 1001, …",
934
+ two: "2, 102, 202, 302, 402, 502, 602, 702, 1002, …",
935
+ few: "3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, …",
936
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
937
+ }
938
+ };
939
+ const hu = {
940
+ name: "Hungarian",
941
+ formula: "n != 1",
942
+ plurals: 2,
943
+ cases: [
944
+ "one",
945
+ "other"
946
+ ],
947
+ examples: {
948
+ one: "1",
949
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
950
+ }
951
+ };
952
+ const hy = {
953
+ name: "Armenian",
954
+ formula: "n > 1",
955
+ plurals: 2,
956
+ cases: [
957
+ "one",
958
+ "other"
959
+ ],
960
+ examples: {
961
+ one: "0, 1",
962
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
963
+ }
964
+ };
965
+ const ia = {
966
+ name: "Interlingua",
967
+ formula: "n != 1",
968
+ plurals: 2,
969
+ cases: [
970
+ "one",
971
+ "other"
972
+ ],
973
+ examples: {
974
+ one: "1",
975
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
976
+ }
977
+ };
978
+ const id = {
979
+ name: "Indonesian",
980
+ formula: "0",
981
+ plurals: 1,
982
+ cases: [
983
+ "other"
984
+ ],
985
+ examples: {
986
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
987
+ }
988
+ };
989
+ const ig = {
990
+ name: "Igbo",
991
+ formula: "0",
992
+ plurals: 1,
993
+ cases: [
994
+ "other"
995
+ ],
996
+ examples: {
997
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
998
+ }
999
+ };
1000
+ const ii = {
1001
+ name: "Sichuan Yi",
1002
+ formula: "0",
1003
+ plurals: 1,
1004
+ cases: [
1005
+ "other"
1006
+ ],
1007
+ examples: {
1008
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1009
+ }
1010
+ };
1011
+ const io = {
1012
+ name: "Ido",
1013
+ formula: "n != 1",
1014
+ plurals: 2,
1015
+ cases: [
1016
+ "one",
1017
+ "other"
1018
+ ],
1019
+ examples: {
1020
+ one: "1",
1021
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1022
+ }
1023
+ };
1024
+ const is = {
1025
+ name: "Icelandic",
1026
+ formula: "n % 10 != 1 || n % 100 == 11",
1027
+ plurals: 2,
1028
+ cases: [
1029
+ "one",
1030
+ "other"
1031
+ ],
1032
+ examples: {
1033
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
1034
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1035
+ }
1036
+ };
1037
+ const it = {
1038
+ name: "Italian",
1039
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
1040
+ plurals: 3,
1041
+ cases: [
1042
+ "one",
1043
+ "many",
1044
+ "other"
1045
+ ],
1046
+ examples: {
1047
+ one: "1",
1048
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
1049
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
1050
+ }
1051
+ };
1052
+ const iu = {
1053
+ name: "Inuktitut",
1054
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
1055
+ plurals: 3,
1056
+ cases: [
1057
+ "one",
1058
+ "two",
1059
+ "other"
1060
+ ],
1061
+ examples: {
1062
+ one: "1",
1063
+ two: "2",
1064
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
1065
+ }
1066
+ };
1067
+ const ja = {
1068
+ name: "Japanese",
1069
+ formula: "0",
1070
+ plurals: 1,
1071
+ cases: [
1072
+ "other"
1073
+ ],
1074
+ examples: {
1075
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1076
+ }
1077
+ };
1078
+ const jbo = {
1079
+ name: "Lojban",
1080
+ formula: "0",
1081
+ plurals: 1,
1082
+ cases: [
1083
+ "other"
1084
+ ],
1085
+ examples: {
1086
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1087
+ }
1088
+ };
1089
+ const jgo = {
1090
+ name: "Ngomba",
1091
+ formula: "n != 1",
1092
+ plurals: 2,
1093
+ cases: [
1094
+ "one",
1095
+ "other"
1096
+ ],
1097
+ examples: {
1098
+ one: "1",
1099
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1100
+ }
1101
+ };
1102
+ const jmc = {
1103
+ name: "Machame",
1104
+ formula: "n != 1",
1105
+ plurals: 2,
1106
+ cases: [
1107
+ "one",
1108
+ "other"
1109
+ ],
1110
+ examples: {
1111
+ one: "1",
1112
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1113
+ }
1114
+ };
1115
+ const jv = {
1116
+ name: "Javanese",
1117
+ formula: "0",
1118
+ plurals: 1,
1119
+ cases: [
1120
+ "other"
1121
+ ],
1122
+ examples: {
1123
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1124
+ }
1125
+ };
1126
+ const ka = {
1127
+ name: "Georgian",
1128
+ formula: "n != 1",
1129
+ plurals: 2,
1130
+ cases: [
1131
+ "one",
1132
+ "other"
1133
+ ],
1134
+ examples: {
1135
+ one: "1",
1136
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1137
+ }
1138
+ };
1139
+ const kab = {
1140
+ name: "Kabyle",
1141
+ formula: "n > 1",
1142
+ plurals: 2,
1143
+ cases: [
1144
+ "one",
1145
+ "other"
1146
+ ],
1147
+ examples: {
1148
+ one: "0, 1",
1149
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1150
+ }
1151
+ };
1152
+ const kaj = {
1153
+ name: "Jju",
1154
+ formula: "n != 1",
1155
+ plurals: 2,
1156
+ cases: [
1157
+ "one",
1158
+ "other"
1159
+ ],
1160
+ examples: {
1161
+ one: "1",
1162
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1163
+ }
1164
+ };
1165
+ const kcg = {
1166
+ name: "Tyap",
1167
+ formula: "n != 1",
1168
+ plurals: 2,
1169
+ cases: [
1170
+ "one",
1171
+ "other"
1172
+ ],
1173
+ examples: {
1174
+ one: "1",
1175
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1176
+ }
1177
+ };
1178
+ const kde = {
1179
+ name: "Makonde",
1180
+ formula: "0",
1181
+ plurals: 1,
1182
+ cases: [
1183
+ "other"
1184
+ ],
1185
+ examples: {
1186
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1187
+ }
1188
+ };
1189
+ const kea = {
1190
+ name: "Kabuverdianu",
1191
+ formula: "0",
1192
+ plurals: 1,
1193
+ cases: [
1194
+ "other"
1195
+ ],
1196
+ examples: {
1197
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1198
+ }
1199
+ };
1200
+ const kk = {
1201
+ name: "Kazakh",
1202
+ formula: "n != 1",
1203
+ plurals: 2,
1204
+ cases: [
1205
+ "one",
1206
+ "other"
1207
+ ],
1208
+ examples: {
1209
+ one: "1",
1210
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1211
+ }
1212
+ };
1213
+ const kkj = {
1214
+ name: "Kako",
1215
+ formula: "n != 1",
1216
+ plurals: 2,
1217
+ cases: [
1218
+ "one",
1219
+ "other"
1220
+ ],
1221
+ examples: {
1222
+ one: "1",
1223
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1224
+ }
1225
+ };
1226
+ const kl = {
1227
+ name: "Kalaallisut",
1228
+ formula: "n != 1",
1229
+ plurals: 2,
1230
+ cases: [
1231
+ "one",
1232
+ "other"
1233
+ ],
1234
+ examples: {
1235
+ one: "1",
1236
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1237
+ }
1238
+ };
1239
+ const km = {
1240
+ name: "Khmer",
1241
+ formula: "0",
1242
+ plurals: 1,
1243
+ cases: [
1244
+ "other"
1245
+ ],
1246
+ examples: {
1247
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1248
+ }
1249
+ };
1250
+ const kn = {
1251
+ name: "Kannada",
1252
+ formula: "n > 1",
1253
+ plurals: 2,
1254
+ cases: [
1255
+ "one",
1256
+ "other"
1257
+ ],
1258
+ examples: {
1259
+ one: "0, 1",
1260
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1261
+ }
1262
+ };
1263
+ const ko = {
1264
+ name: "Korean",
1265
+ formula: "0",
1266
+ plurals: 1,
1267
+ cases: [
1268
+ "other"
1269
+ ],
1270
+ examples: {
1271
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1272
+ }
1273
+ };
1274
+ const ks = {
1275
+ name: "Kashmiri",
1276
+ formula: "n != 1",
1277
+ plurals: 2,
1278
+ cases: [
1279
+ "one",
1280
+ "other"
1281
+ ],
1282
+ examples: {
1283
+ one: "1",
1284
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1285
+ }
1286
+ };
1287
+ const ksb = {
1288
+ name: "Shambala",
1289
+ formula: "n != 1",
1290
+ plurals: 2,
1291
+ cases: [
1292
+ "one",
1293
+ "other"
1294
+ ],
1295
+ examples: {
1296
+ one: "1",
1297
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1298
+ }
1299
+ };
1300
+ const ksh = {
1301
+ name: "Colognian",
1302
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : 2)",
1303
+ plurals: 3,
1304
+ cases: [
1305
+ "zero",
1306
+ "one",
1307
+ "other"
1308
+ ],
1309
+ examples: {
1310
+ zero: "0",
1311
+ one: "1",
1312
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1313
+ }
1314
+ };
1315
+ const ku = {
1316
+ name: "Kurdish",
1317
+ formula: "n != 1",
1318
+ plurals: 2,
1319
+ cases: [
1320
+ "one",
1321
+ "other"
1322
+ ],
1323
+ examples: {
1324
+ one: "1",
1325
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1326
+ }
1327
+ };
1328
+ const kw = {
1329
+ name: "Cornish",
1330
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : (((n % 100 == 2 || n % 100 == 22 || n % 100 == 42 || n % 100 == 62 || n % 100 == 82) || n % 1000 == 0 && (n % 100000 >= 1000 && n % 100000 <= 20000 || n % 100000 == 40000 || n % 100000 == 60000 || n % 100000 == 80000) || n != 0 && n % 1000000 == 100000) ? 2 : ((n % 100 == 3 || n % 100 == 23 || n % 100 == 43 || n % 100 == 63 || n % 100 == 83) ? 3 : ((n != 1 && (n % 100 == 1 || n % 100 == 21 || n % 100 == 41 || n % 100 == 61 || n % 100 == 81)) ? 4 : 5))))",
1331
+ plurals: 6,
1332
+ cases: [
1333
+ "zero",
1334
+ "one",
1335
+ "two",
1336
+ "few",
1337
+ "many",
1338
+ "other"
1339
+ ],
1340
+ examples: {
1341
+ zero: "0",
1342
+ one: "1",
1343
+ two: "2, 22, 42, 62, 82, 102, 122, 142, 1000, 10000, 100000, …",
1344
+ few: "3, 23, 43, 63, 83, 103, 123, 143, 1003, …",
1345
+ many: "21, 41, 61, 81, 101, 121, 141, 161, 1001, …",
1346
+ other: "4~19, 100, 1004, 1000000, …"
1347
+ }
1348
+ };
1349
+ const ky = {
1350
+ name: "Kyrgyz",
1351
+ formula: "n != 1",
1352
+ plurals: 2,
1353
+ cases: [
1354
+ "one",
1355
+ "other"
1356
+ ],
1357
+ examples: {
1358
+ one: "1",
1359
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1360
+ }
1361
+ };
1362
+ const lag = {
1363
+ name: "Langi",
1364
+ formula: "(n == 0) ? 0 : ((n == 1) ? 1 : 2)",
1365
+ plurals: 3,
1366
+ cases: [
1367
+ "zero",
1368
+ "one",
1369
+ "other"
1370
+ ],
1371
+ examples: {
1372
+ zero: "0",
1373
+ one: "1",
1374
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1375
+ }
1376
+ };
1377
+ const lb = {
1378
+ name: "Luxembourgish",
1379
+ formula: "n != 1",
1380
+ plurals: 2,
1381
+ cases: [
1382
+ "one",
1383
+ "other"
1384
+ ],
1385
+ examples: {
1386
+ one: "1",
1387
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1388
+ }
1389
+ };
1390
+ const lg = {
1391
+ name: "Ganda",
1392
+ formula: "n != 1",
1393
+ plurals: 2,
1394
+ cases: [
1395
+ "one",
1396
+ "other"
1397
+ ],
1398
+ examples: {
1399
+ one: "1",
1400
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1401
+ }
1402
+ };
1403
+ const lij = {
1404
+ name: "Ligurian",
1405
+ formula: "n != 1",
1406
+ plurals: 2,
1407
+ cases: [
1408
+ "one",
1409
+ "other"
1410
+ ],
1411
+ examples: {
1412
+ one: "1",
1413
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1414
+ }
1415
+ };
1416
+ const lkt = {
1417
+ name: "Lakota",
1418
+ formula: "0",
1419
+ plurals: 1,
1420
+ cases: [
1421
+ "other"
1422
+ ],
1423
+ examples: {
1424
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1425
+ }
1426
+ };
1427
+ const lld = {
1428
+ name: "Dolomitic Ladin",
1429
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
1430
+ plurals: 3,
1431
+ cases: [
1432
+ "one",
1433
+ "many",
1434
+ "other"
1435
+ ],
1436
+ examples: {
1437
+ one: "1",
1438
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
1439
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
1440
+ }
1441
+ };
1442
+ const ln = {
1443
+ name: "Lingala",
1444
+ formula: "n > 1",
1445
+ plurals: 2,
1446
+ cases: [
1447
+ "one",
1448
+ "other"
1449
+ ],
1450
+ examples: {
1451
+ one: "0, 1",
1452
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1453
+ }
1454
+ };
1455
+ const lo = {
1456
+ name: "Lao",
1457
+ formula: "0",
1458
+ plurals: 1,
1459
+ cases: [
1460
+ "other"
1461
+ ],
1462
+ examples: {
1463
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1464
+ }
1465
+ };
1466
+ const lt = {
1467
+ name: "Lithuanian",
1468
+ formula: "(n % 10 == 1 && (n % 100 < 11 || n % 100 > 19)) ? 0 : ((n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? 1 : 2)",
1469
+ plurals: 3,
1470
+ cases: [
1471
+ "one",
1472
+ "few",
1473
+ "other"
1474
+ ],
1475
+ examples: {
1476
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
1477
+ few: "2~9, 22~29, 102, 1002, …",
1478
+ other: "0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, …"
1479
+ }
1480
+ };
1481
+ const lv = {
1482
+ name: "Latvian",
1483
+ formula: "(n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2)",
1484
+ plurals: 3,
1485
+ cases: [
1486
+ "zero",
1487
+ "one",
1488
+ "other"
1489
+ ],
1490
+ examples: {
1491
+ zero: "0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, …",
1492
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
1493
+ other: "2~9, 22~29, 102, 1002, …"
1494
+ }
1495
+ };
1496
+ const mas = {
1497
+ name: "Masai",
1498
+ formula: "n != 1",
1499
+ plurals: 2,
1500
+ cases: [
1501
+ "one",
1502
+ "other"
1503
+ ],
1504
+ examples: {
1505
+ one: "1",
1506
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1507
+ }
1508
+ };
1509
+ const mg = {
1510
+ name: "Malagasy",
1511
+ formula: "n > 1",
1512
+ plurals: 2,
1513
+ cases: [
1514
+ "one",
1515
+ "other"
1516
+ ],
1517
+ examples: {
1518
+ one: "0, 1",
1519
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1520
+ }
1521
+ };
1522
+ const mgo = {
1523
+ name: "Metaʼ",
1524
+ formula: "n != 1",
1525
+ plurals: 2,
1526
+ cases: [
1527
+ "one",
1528
+ "other"
1529
+ ],
1530
+ examples: {
1531
+ one: "1",
1532
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1533
+ }
1534
+ };
1535
+ const mk = {
1536
+ name: "Macedonian",
1537
+ formula: "n % 10 != 1 || n % 100 == 11",
1538
+ plurals: 2,
1539
+ cases: [
1540
+ "one",
1541
+ "other"
1542
+ ],
1543
+ examples: {
1544
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
1545
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1546
+ }
1547
+ };
1548
+ const ml = {
1549
+ name: "Malayalam",
1550
+ formula: "n != 1",
1551
+ plurals: 2,
1552
+ cases: [
1553
+ "one",
1554
+ "other"
1555
+ ],
1556
+ examples: {
1557
+ one: "1",
1558
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1559
+ }
1560
+ };
1561
+ const mn = {
1562
+ name: "Mongolian",
1563
+ formula: "n != 1",
1564
+ plurals: 2,
1565
+ cases: [
1566
+ "one",
1567
+ "other"
1568
+ ],
1569
+ examples: {
1570
+ one: "1",
1571
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1572
+ }
1573
+ };
1574
+ const mr = {
1575
+ name: "Marathi",
1576
+ formula: "n != 1",
1577
+ plurals: 2,
1578
+ cases: [
1579
+ "one",
1580
+ "other"
1581
+ ],
1582
+ examples: {
1583
+ one: "1",
1584
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1585
+ }
1586
+ };
1587
+ const ms = {
1588
+ name: "Malay",
1589
+ formula: "0",
1590
+ plurals: 1,
1591
+ cases: [
1592
+ "other"
1593
+ ],
1594
+ examples: {
1595
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1596
+ }
1597
+ };
1598
+ const mt = {
1599
+ name: "Maltese",
1600
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : ((n == 0 || n % 100 >= 3 && n % 100 <= 10) ? 2 : ((n % 100 >= 11 && n % 100 <= 19) ? 3 : 4)))",
1601
+ plurals: 5,
1602
+ cases: [
1603
+ "one",
1604
+ "two",
1605
+ "few",
1606
+ "many",
1607
+ "other"
1608
+ ],
1609
+ examples: {
1610
+ one: "1",
1611
+ two: "2",
1612
+ few: "0, 3~10, 103~109, 1003, …",
1613
+ many: "11~19, 111~117, 1011, …",
1614
+ other: "20~35, 100, 1000, 10000, 100000, 1000000, …"
1615
+ }
1616
+ };
1617
+ const my = {
1618
+ name: "Burmese",
1619
+ formula: "0",
1620
+ plurals: 1,
1621
+ cases: [
1622
+ "other"
1623
+ ],
1624
+ examples: {
1625
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1626
+ }
1627
+ };
1628
+ const nah = {
1629
+ name: "Nahuatl",
1630
+ formula: "n != 1",
1631
+ plurals: 2,
1632
+ cases: [
1633
+ "one",
1634
+ "other"
1635
+ ],
1636
+ examples: {
1637
+ one: "1",
1638
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1639
+ }
1640
+ };
1641
+ const naq = {
1642
+ name: "Nama",
1643
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
1644
+ plurals: 3,
1645
+ cases: [
1646
+ "one",
1647
+ "two",
1648
+ "other"
1649
+ ],
1650
+ examples: {
1651
+ one: "1",
1652
+ two: "2",
1653
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
1654
+ }
1655
+ };
1656
+ const nb = {
1657
+ name: "Norwegian Bokmål",
1658
+ formula: "n != 1",
1659
+ plurals: 2,
1660
+ cases: [
1661
+ "one",
1662
+ "other"
1663
+ ],
1664
+ examples: {
1665
+ one: "1",
1666
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1667
+ }
1668
+ };
1669
+ const nd = {
1670
+ name: "North Ndebele",
1671
+ formula: "n != 1",
1672
+ plurals: 2,
1673
+ cases: [
1674
+ "one",
1675
+ "other"
1676
+ ],
1677
+ examples: {
1678
+ one: "1",
1679
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1680
+ }
1681
+ };
1682
+ const ne = {
1683
+ name: "Nepali",
1684
+ formula: "n != 1",
1685
+ plurals: 2,
1686
+ cases: [
1687
+ "one",
1688
+ "other"
1689
+ ],
1690
+ examples: {
1691
+ one: "1",
1692
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1693
+ }
1694
+ };
1695
+ const nl = {
1696
+ name: "Dutch",
1697
+ formula: "n != 1",
1698
+ plurals: 2,
1699
+ cases: [
1700
+ "one",
1701
+ "other"
1702
+ ],
1703
+ examples: {
1704
+ one: "1",
1705
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1706
+ }
1707
+ };
1708
+ const nn = {
1709
+ name: "Norwegian Nynorsk",
1710
+ formula: "n != 1",
1711
+ plurals: 2,
1712
+ cases: [
1713
+ "one",
1714
+ "other"
1715
+ ],
1716
+ examples: {
1717
+ one: "1",
1718
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1719
+ }
1720
+ };
1721
+ const nnh = {
1722
+ name: "Ngiemboon",
1723
+ formula: "n != 1",
1724
+ plurals: 2,
1725
+ cases: [
1726
+ "one",
1727
+ "other"
1728
+ ],
1729
+ examples: {
1730
+ one: "1",
1731
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1732
+ }
1733
+ };
1734
+ const no = {
1735
+ name: "Norwegian",
1736
+ formula: "n != 1",
1737
+ plurals: 2,
1738
+ cases: [
1739
+ "one",
1740
+ "other"
1741
+ ],
1742
+ examples: {
1743
+ one: "1",
1744
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1745
+ }
1746
+ };
1747
+ const nqo = {
1748
+ name: "N’Ko",
1749
+ formula: "0",
1750
+ plurals: 1,
1751
+ cases: [
1752
+ "other"
1753
+ ],
1754
+ examples: {
1755
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1756
+ }
1757
+ };
1758
+ const nr = {
1759
+ name: "South Ndebele",
1760
+ formula: "n != 1",
1761
+ plurals: 2,
1762
+ cases: [
1763
+ "one",
1764
+ "other"
1765
+ ],
1766
+ examples: {
1767
+ one: "1",
1768
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1769
+ }
1770
+ };
1771
+ const nso = {
1772
+ name: "Northern Sotho",
1773
+ formula: "n > 1",
1774
+ plurals: 2,
1775
+ cases: [
1776
+ "one",
1777
+ "other"
1778
+ ],
1779
+ examples: {
1780
+ one: "0, 1",
1781
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1782
+ }
1783
+ };
1784
+ const ny = {
1785
+ name: "Nyanja",
1786
+ formula: "n != 1",
1787
+ plurals: 2,
1788
+ cases: [
1789
+ "one",
1790
+ "other"
1791
+ ],
1792
+ examples: {
1793
+ one: "1",
1794
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1795
+ }
1796
+ };
1797
+ const nyn = {
1798
+ name: "Nyankole",
1799
+ formula: "n != 1",
1800
+ plurals: 2,
1801
+ cases: [
1802
+ "one",
1803
+ "other"
1804
+ ],
1805
+ examples: {
1806
+ one: "1",
1807
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1808
+ }
1809
+ };
1810
+ const om = {
1811
+ name: "Oromo",
1812
+ formula: "n != 1",
1813
+ plurals: 2,
1814
+ cases: [
1815
+ "one",
1816
+ "other"
1817
+ ],
1818
+ examples: {
1819
+ one: "1",
1820
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1821
+ }
1822
+ };
1823
+ const or = {
1824
+ name: "Odia",
1825
+ formula: "n != 1",
1826
+ plurals: 2,
1827
+ cases: [
1828
+ "one",
1829
+ "other"
1830
+ ],
1831
+ examples: {
1832
+ one: "1",
1833
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1834
+ }
1835
+ };
1836
+ const os = {
1837
+ name: "Ossetic",
1838
+ formula: "n != 1",
1839
+ plurals: 2,
1840
+ cases: [
1841
+ "one",
1842
+ "other"
1843
+ ],
1844
+ examples: {
1845
+ one: "1",
1846
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1847
+ }
1848
+ };
1849
+ const osa = {
1850
+ name: "Osage",
1851
+ formula: "0",
1852
+ plurals: 1,
1853
+ cases: [
1854
+ "other"
1855
+ ],
1856
+ examples: {
1857
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
1858
+ }
1859
+ };
1860
+ const pa = {
1861
+ name: "Punjabi",
1862
+ formula: "n > 1",
1863
+ plurals: 2,
1864
+ cases: [
1865
+ "one",
1866
+ "other"
1867
+ ],
1868
+ examples: {
1869
+ one: "0, 1",
1870
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1871
+ }
1872
+ };
1873
+ const pap = {
1874
+ name: "Papiamento",
1875
+ formula: "n != 1",
1876
+ plurals: 2,
1877
+ cases: [
1878
+ "one",
1879
+ "other"
1880
+ ],
1881
+ examples: {
1882
+ one: "1",
1883
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1884
+ }
1885
+ };
1886
+ const pcm = {
1887
+ name: "Nigerian Pidgin",
1888
+ formula: "n > 1",
1889
+ plurals: 2,
1890
+ cases: [
1891
+ "one",
1892
+ "other"
1893
+ ],
1894
+ examples: {
1895
+ one: "0, 1",
1896
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
1897
+ }
1898
+ };
1899
+ const pl = {
1900
+ name: "Polish",
1901
+ formula: "(n == 1) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
1902
+ plurals: 3,
1903
+ cases: [
1904
+ "one",
1905
+ "few",
1906
+ "other"
1907
+ ],
1908
+ examples: {
1909
+ one: "1",
1910
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
1911
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
1912
+ }
1913
+ };
1914
+ const prg = {
1915
+ name: "Prussian",
1916
+ formula: "(n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2)",
1917
+ plurals: 3,
1918
+ cases: [
1919
+ "zero",
1920
+ "one",
1921
+ "other"
1922
+ ],
1923
+ examples: {
1924
+ zero: "0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, …",
1925
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
1926
+ other: "2~9, 22~29, 102, 1002, …"
1927
+ }
1928
+ };
1929
+ const ps = {
1930
+ name: "Pashto",
1931
+ formula: "n != 1",
1932
+ plurals: 2,
1933
+ cases: [
1934
+ "one",
1935
+ "other"
1936
+ ],
1937
+ examples: {
1938
+ one: "1",
1939
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1940
+ }
1941
+ };
1942
+ const pt = {
1943
+ name: "Portuguese",
1944
+ formula: "(n == 0 || n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
1945
+ plurals: 3,
1946
+ cases: [
1947
+ "one",
1948
+ "many",
1949
+ "other"
1950
+ ],
1951
+ examples: {
1952
+ one: "0, 1",
1953
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
1954
+ other: "2~17, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
1955
+ }
1956
+ };
1957
+ const pt_PT = {
1958
+ name: "European Portuguese",
1959
+ territory: "Portugal",
1960
+ baseLanguage: "Portuguese",
1961
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
1962
+ plurals: 3,
1963
+ cases: [
1964
+ "one",
1965
+ "many",
1966
+ "other"
1967
+ ],
1968
+ examples: {
1969
+ one: "1",
1970
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
1971
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
1972
+ }
1973
+ };
1974
+ const rm = {
1975
+ name: "Romansh",
1976
+ formula: "n != 1",
1977
+ plurals: 2,
1978
+ cases: [
1979
+ "one",
1980
+ "other"
1981
+ ],
1982
+ examples: {
1983
+ one: "1",
1984
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
1985
+ }
1986
+ };
1987
+ const ro = {
1988
+ name: "Romanian",
1989
+ formula: "(n == 1) ? 0 : ((n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) ? 1 : 2)",
1990
+ plurals: 3,
1991
+ cases: [
1992
+ "one",
1993
+ "few",
1994
+ "other"
1995
+ ],
1996
+ examples: {
1997
+ one: "1",
1998
+ few: "0, 2~16, 101, 1001, …",
1999
+ other: "20~35, 100, 1000, 10000, 100000, 1000000, …"
2000
+ }
2001
+ };
2002
+ const rof = {
2003
+ name: "Rombo",
2004
+ formula: "n != 1",
2005
+ plurals: 2,
2006
+ cases: [
2007
+ "one",
2008
+ "other"
2009
+ ],
2010
+ examples: {
2011
+ one: "1",
2012
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2013
+ }
2014
+ };
2015
+ const ru = {
2016
+ name: "Russian",
2017
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
2018
+ plurals: 3,
2019
+ cases: [
2020
+ "one",
2021
+ "few",
2022
+ "other"
2023
+ ],
2024
+ examples: {
2025
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
2026
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
2027
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
2028
+ }
2029
+ };
2030
+ const rwk = {
2031
+ name: "Rwa",
2032
+ formula: "n != 1",
2033
+ plurals: 2,
2034
+ cases: [
2035
+ "one",
2036
+ "other"
2037
+ ],
2038
+ examples: {
2039
+ one: "1",
2040
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2041
+ }
2042
+ };
2043
+ const sah = {
2044
+ name: "Yakut",
2045
+ formula: "0",
2046
+ plurals: 1,
2047
+ cases: [
2048
+ "other"
2049
+ ],
2050
+ examples: {
2051
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2052
+ }
2053
+ };
2054
+ const saq = {
2055
+ name: "Samburu",
2056
+ formula: "n != 1",
2057
+ plurals: 2,
2058
+ cases: [
2059
+ "one",
2060
+ "other"
2061
+ ],
2062
+ examples: {
2063
+ one: "1",
2064
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2065
+ }
2066
+ };
2067
+ const sat = {
2068
+ name: "Santali",
2069
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2070
+ plurals: 3,
2071
+ cases: [
2072
+ "one",
2073
+ "two",
2074
+ "other"
2075
+ ],
2076
+ examples: {
2077
+ one: "1",
2078
+ two: "2",
2079
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2080
+ }
2081
+ };
2082
+ const sc = {
2083
+ name: "Sardinian",
2084
+ formula: "n != 1",
2085
+ plurals: 2,
2086
+ cases: [
2087
+ "one",
2088
+ "other"
2089
+ ],
2090
+ examples: {
2091
+ one: "1",
2092
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2093
+ }
2094
+ };
2095
+ const scn = {
2096
+ name: "Sicilian",
2097
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
2098
+ plurals: 3,
2099
+ cases: [
2100
+ "one",
2101
+ "many",
2102
+ "other"
2103
+ ],
2104
+ examples: {
2105
+ one: "1",
2106
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
2107
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
2108
+ }
2109
+ };
2110
+ const sd = {
2111
+ name: "Sindhi",
2112
+ formula: "n != 1",
2113
+ plurals: 2,
2114
+ cases: [
2115
+ "one",
2116
+ "other"
2117
+ ],
2118
+ examples: {
2119
+ one: "1",
2120
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2121
+ }
2122
+ };
2123
+ const sdh = {
2124
+ name: "Southern Kurdish",
2125
+ formula: "n != 1",
2126
+ plurals: 2,
2127
+ cases: [
2128
+ "one",
2129
+ "other"
2130
+ ],
2131
+ examples: {
2132
+ one: "1",
2133
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2134
+ }
2135
+ };
2136
+ const se = {
2137
+ name: "Northern Sami",
2138
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2139
+ plurals: 3,
2140
+ cases: [
2141
+ "one",
2142
+ "two",
2143
+ "other"
2144
+ ],
2145
+ examples: {
2146
+ one: "1",
2147
+ two: "2",
2148
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2149
+ }
2150
+ };
2151
+ const seh = {
2152
+ name: "Sena",
2153
+ formula: "n != 1",
2154
+ plurals: 2,
2155
+ cases: [
2156
+ "one",
2157
+ "other"
2158
+ ],
2159
+ examples: {
2160
+ one: "1",
2161
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2162
+ }
2163
+ };
2164
+ const ses = {
2165
+ name: "Koyraboro Senni",
2166
+ formula: "0",
2167
+ plurals: 1,
2168
+ cases: [
2169
+ "other"
2170
+ ],
2171
+ examples: {
2172
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2173
+ }
2174
+ };
2175
+ const sg = {
2176
+ name: "Sango",
2177
+ formula: "0",
2178
+ plurals: 1,
2179
+ cases: [
2180
+ "other"
2181
+ ],
2182
+ examples: {
2183
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2184
+ }
2185
+ };
2186
+ const sh = {
2187
+ name: "Serbo-Croatian",
2188
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
2189
+ plurals: 3,
2190
+ cases: [
2191
+ "one",
2192
+ "few",
2193
+ "other"
2194
+ ],
2195
+ examples: {
2196
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
2197
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
2198
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
2199
+ }
2200
+ };
2201
+ const shi = {
2202
+ name: "Tachelhit",
2203
+ formula: "(n == 0 || n == 1) ? 0 : ((n >= 2 && n <= 10) ? 1 : 2)",
2204
+ plurals: 3,
2205
+ cases: [
2206
+ "one",
2207
+ "few",
2208
+ "other"
2209
+ ],
2210
+ examples: {
2211
+ one: "0, 1",
2212
+ few: "2~10",
2213
+ other: "11~26, 100, 1000, 10000, 100000, 1000000, …"
2214
+ }
2215
+ };
2216
+ const si = {
2217
+ name: "Sinhala",
2218
+ formula: "n > 1",
2219
+ plurals: 2,
2220
+ cases: [
2221
+ "one",
2222
+ "other"
2223
+ ],
2224
+ examples: {
2225
+ one: "0, 1",
2226
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
2227
+ }
2228
+ };
2229
+ const sk = {
2230
+ name: "Slovak",
2231
+ formula: "(n == 1) ? 0 : ((n >= 2 && n <= 4) ? 1 : 2)",
2232
+ plurals: 3,
2233
+ cases: [
2234
+ "one",
2235
+ "few",
2236
+ "other"
2237
+ ],
2238
+ examples: {
2239
+ one: "1",
2240
+ few: "2~4",
2241
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
2242
+ }
2243
+ };
2244
+ const sl = {
2245
+ name: "Slovenian",
2246
+ formula: "(n % 100 == 1) ? 0 : ((n % 100 == 2) ? 1 : ((n % 100 == 3 || n % 100 == 4) ? 2 : 3))",
2247
+ plurals: 4,
2248
+ cases: [
2249
+ "one",
2250
+ "two",
2251
+ "few",
2252
+ "other"
2253
+ ],
2254
+ examples: {
2255
+ one: "1, 101, 201, 301, 401, 501, 601, 701, 1001, …",
2256
+ two: "2, 102, 202, 302, 402, 502, 602, 702, 1002, …",
2257
+ few: "3, 4, 103, 104, 203, 204, 303, 304, 403, 404, 503, 504, 603, 604, 703, 704, 1003, …",
2258
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
2259
+ }
2260
+ };
2261
+ const sma = {
2262
+ name: "Southern Sami",
2263
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2264
+ plurals: 3,
2265
+ cases: [
2266
+ "one",
2267
+ "two",
2268
+ "other"
2269
+ ],
2270
+ examples: {
2271
+ one: "1",
2272
+ two: "2",
2273
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2274
+ }
2275
+ };
2276
+ const smi = {
2277
+ name: "Sami",
2278
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2279
+ plurals: 3,
2280
+ cases: [
2281
+ "one",
2282
+ "two",
2283
+ "other"
2284
+ ],
2285
+ examples: {
2286
+ one: "1",
2287
+ two: "2",
2288
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2289
+ }
2290
+ };
2291
+ const smj = {
2292
+ name: "Lule Sami",
2293
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2294
+ plurals: 3,
2295
+ cases: [
2296
+ "one",
2297
+ "two",
2298
+ "other"
2299
+ ],
2300
+ examples: {
2301
+ one: "1",
2302
+ two: "2",
2303
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2304
+ }
2305
+ };
2306
+ const smn = {
2307
+ name: "Inari Sami",
2308
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2309
+ plurals: 3,
2310
+ cases: [
2311
+ "one",
2312
+ "two",
2313
+ "other"
2314
+ ],
2315
+ examples: {
2316
+ one: "1",
2317
+ two: "2",
2318
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2319
+ }
2320
+ };
2321
+ const sms = {
2322
+ name: "Skolt Sami",
2323
+ formula: "(n == 1) ? 0 : ((n == 2) ? 1 : 2)",
2324
+ plurals: 3,
2325
+ cases: [
2326
+ "one",
2327
+ "two",
2328
+ "other"
2329
+ ],
2330
+ examples: {
2331
+ one: "1",
2332
+ two: "2",
2333
+ other: "0, 3~17, 100, 1000, 10000, 100000, 1000000, …"
2334
+ }
2335
+ };
2336
+ const sn = {
2337
+ name: "Shona",
2338
+ formula: "n != 1",
2339
+ plurals: 2,
2340
+ cases: [
2341
+ "one",
2342
+ "other"
2343
+ ],
2344
+ examples: {
2345
+ one: "1",
2346
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2347
+ }
2348
+ };
2349
+ const so = {
2350
+ name: "Somali",
2351
+ formula: "n != 1",
2352
+ plurals: 2,
2353
+ cases: [
2354
+ "one",
2355
+ "other"
2356
+ ],
2357
+ examples: {
2358
+ one: "1",
2359
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2360
+ }
2361
+ };
2362
+ const sq = {
2363
+ name: "Albanian",
2364
+ formula: "n != 1",
2365
+ plurals: 2,
2366
+ cases: [
2367
+ "one",
2368
+ "other"
2369
+ ],
2370
+ examples: {
2371
+ one: "1",
2372
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2373
+ }
2374
+ };
2375
+ const sr = {
2376
+ name: "Serbian",
2377
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
2378
+ plurals: 3,
2379
+ cases: [
2380
+ "one",
2381
+ "few",
2382
+ "other"
2383
+ ],
2384
+ examples: {
2385
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
2386
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
2387
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
2388
+ }
2389
+ };
2390
+ const ss = {
2391
+ name: "Swati",
2392
+ formula: "n != 1",
2393
+ plurals: 2,
2394
+ cases: [
2395
+ "one",
2396
+ "other"
2397
+ ],
2398
+ examples: {
2399
+ one: "1",
2400
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2401
+ }
2402
+ };
2403
+ const ssy = {
2404
+ name: "Saho",
2405
+ formula: "n != 1",
2406
+ plurals: 2,
2407
+ cases: [
2408
+ "one",
2409
+ "other"
2410
+ ],
2411
+ examples: {
2412
+ one: "1",
2413
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2414
+ }
2415
+ };
2416
+ const st = {
2417
+ name: "Southern Sotho",
2418
+ formula: "n != 1",
2419
+ plurals: 2,
2420
+ cases: [
2421
+ "one",
2422
+ "other"
2423
+ ],
2424
+ examples: {
2425
+ one: "1",
2426
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2427
+ }
2428
+ };
2429
+ const su = {
2430
+ name: "Sundanese",
2431
+ formula: "0",
2432
+ plurals: 1,
2433
+ cases: [
2434
+ "other"
2435
+ ],
2436
+ examples: {
2437
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2438
+ }
2439
+ };
2440
+ const sv = {
2441
+ name: "Swedish",
2442
+ formula: "n != 1",
2443
+ plurals: 2,
2444
+ cases: [
2445
+ "one",
2446
+ "other"
2447
+ ],
2448
+ examples: {
2449
+ one: "1",
2450
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2451
+ }
2452
+ };
2453
+ const sw = {
2454
+ name: "Swahili",
2455
+ formula: "n != 1",
2456
+ plurals: 2,
2457
+ cases: [
2458
+ "one",
2459
+ "other"
2460
+ ],
2461
+ examples: {
2462
+ one: "1",
2463
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2464
+ }
2465
+ };
2466
+ const syr = {
2467
+ name: "Syriac",
2468
+ formula: "n != 1",
2469
+ plurals: 2,
2470
+ cases: [
2471
+ "one",
2472
+ "other"
2473
+ ],
2474
+ examples: {
2475
+ one: "1",
2476
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2477
+ }
2478
+ };
2479
+ const ta = {
2480
+ name: "Tamil",
2481
+ formula: "n != 1",
2482
+ plurals: 2,
2483
+ cases: [
2484
+ "one",
2485
+ "other"
2486
+ ],
2487
+ examples: {
2488
+ one: "1",
2489
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2490
+ }
2491
+ };
2492
+ const te = {
2493
+ name: "Telugu",
2494
+ formula: "n != 1",
2495
+ plurals: 2,
2496
+ cases: [
2497
+ "one",
2498
+ "other"
2499
+ ],
2500
+ examples: {
2501
+ one: "1",
2502
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2503
+ }
2504
+ };
2505
+ const teo = {
2506
+ name: "Teso",
2507
+ formula: "n != 1",
2508
+ plurals: 2,
2509
+ cases: [
2510
+ "one",
2511
+ "other"
2512
+ ],
2513
+ examples: {
2514
+ one: "1",
2515
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2516
+ }
2517
+ };
2518
+ const th = {
2519
+ name: "Thai",
2520
+ formula: "0",
2521
+ plurals: 1,
2522
+ cases: [
2523
+ "other"
2524
+ ],
2525
+ examples: {
2526
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2527
+ }
2528
+ };
2529
+ const ti = {
2530
+ name: "Tigrinya",
2531
+ formula: "n > 1",
2532
+ plurals: 2,
2533
+ cases: [
2534
+ "one",
2535
+ "other"
2536
+ ],
2537
+ examples: {
2538
+ one: "0, 1",
2539
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
2540
+ }
2541
+ };
2542
+ const tig = {
2543
+ name: "Tigre",
2544
+ formula: "n != 1",
2545
+ plurals: 2,
2546
+ cases: [
2547
+ "one",
2548
+ "other"
2549
+ ],
2550
+ examples: {
2551
+ one: "1",
2552
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2553
+ }
2554
+ };
2555
+ const tk = {
2556
+ name: "Turkmen",
2557
+ formula: "n != 1",
2558
+ plurals: 2,
2559
+ cases: [
2560
+ "one",
2561
+ "other"
2562
+ ],
2563
+ examples: {
2564
+ one: "1",
2565
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2566
+ }
2567
+ };
2568
+ const tl = {
2569
+ name: "Tagalog",
2570
+ formula: "n != 1 && n != 2 && n != 3 && (n % 10 == 4 || n % 10 == 6 || n % 10 == 9)",
2571
+ plurals: 2,
2572
+ cases: [
2573
+ "one",
2574
+ "other"
2575
+ ],
2576
+ examples: {
2577
+ one: "0~3, 5, 7, 8, 10~13, 15, 17, 18, 20, 21, 100, 1000, 10000, 100000, 1000000, …",
2578
+ other: "4, 6, 9, 14, 16, 19, 24, 26, 104, 1004, …"
2579
+ }
2580
+ };
2581
+ const tn = {
2582
+ name: "Tswana",
2583
+ formula: "n != 1",
2584
+ plurals: 2,
2585
+ cases: [
2586
+ "one",
2587
+ "other"
2588
+ ],
2589
+ examples: {
2590
+ one: "1",
2591
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2592
+ }
2593
+ };
2594
+ const to = {
2595
+ name: "Tongan",
2596
+ formula: "0",
2597
+ plurals: 1,
2598
+ cases: [
2599
+ "other"
2600
+ ],
2601
+ examples: {
2602
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2603
+ }
2604
+ };
2605
+ const tpi = {
2606
+ name: "Tok Pisin",
2607
+ formula: "0",
2608
+ plurals: 1,
2609
+ cases: [
2610
+ "other"
2611
+ ],
2612
+ examples: {
2613
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2614
+ }
2615
+ };
2616
+ const tr = {
2617
+ name: "Turkish",
2618
+ formula: "n != 1",
2619
+ plurals: 2,
2620
+ cases: [
2621
+ "one",
2622
+ "other"
2623
+ ],
2624
+ examples: {
2625
+ one: "1",
2626
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2627
+ }
2628
+ };
2629
+ const ts = {
2630
+ name: "Tsonga",
2631
+ formula: "n != 1",
2632
+ plurals: 2,
2633
+ cases: [
2634
+ "one",
2635
+ "other"
2636
+ ],
2637
+ examples: {
2638
+ one: "1",
2639
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2640
+ }
2641
+ };
2642
+ const tzm = {
2643
+ name: "Central Atlas Tamazight",
2644
+ formula: "n >= 2 && (n < 11 || n > 99)",
2645
+ plurals: 2,
2646
+ cases: [
2647
+ "one",
2648
+ "other"
2649
+ ],
2650
+ examples: {
2651
+ one: "0, 1, 11~24",
2652
+ other: "2~10, 100~106, 1000, 10000, 100000, 1000000, …"
2653
+ }
2654
+ };
2655
+ const ug = {
2656
+ name: "Uyghur",
2657
+ formula: "n != 1",
2658
+ plurals: 2,
2659
+ cases: [
2660
+ "one",
2661
+ "other"
2662
+ ],
2663
+ examples: {
2664
+ one: "1",
2665
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2666
+ }
2667
+ };
2668
+ const uk = {
2669
+ name: "Ukrainian",
2670
+ formula: "(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)",
2671
+ plurals: 3,
2672
+ cases: [
2673
+ "one",
2674
+ "few",
2675
+ "other"
2676
+ ],
2677
+ examples: {
2678
+ one: "1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …",
2679
+ few: "2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …",
2680
+ other: "0, 5~19, 100, 1000, 10000, 100000, 1000000, …"
2681
+ }
2682
+ };
2683
+ const ur = {
2684
+ name: "Urdu",
2685
+ formula: "n != 1",
2686
+ plurals: 2,
2687
+ cases: [
2688
+ "one",
2689
+ "other"
2690
+ ],
2691
+ examples: {
2692
+ one: "1",
2693
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2694
+ }
2695
+ };
2696
+ const uz = {
2697
+ name: "Uzbek",
2698
+ formula: "n != 1",
2699
+ plurals: 2,
2700
+ cases: [
2701
+ "one",
2702
+ "other"
2703
+ ],
2704
+ examples: {
2705
+ one: "1",
2706
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2707
+ }
2708
+ };
2709
+ const ve = {
2710
+ name: "Venda",
2711
+ formula: "n != 1",
2712
+ plurals: 2,
2713
+ cases: [
2714
+ "one",
2715
+ "other"
2716
+ ],
2717
+ examples: {
2718
+ one: "1",
2719
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2720
+ }
2721
+ };
2722
+ const vec = {
2723
+ name: "Venetian",
2724
+ formula: "(n == 1) ? 0 : ((n != 0 && n % 1000000 == 0) ? 1 : 2)",
2725
+ plurals: 3,
2726
+ cases: [
2727
+ "one",
2728
+ "many",
2729
+ "other"
2730
+ ],
2731
+ examples: {
2732
+ one: "1",
2733
+ many: "1000000, 1c6, 2c6, 3c6, 4c6, 5c6, 6c6, …",
2734
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1c3, 2c3, 3c3, 4c3, 5c3, 6c3, …"
2735
+ }
2736
+ };
2737
+ const vi = {
2738
+ name: "Vietnamese",
2739
+ formula: "0",
2740
+ plurals: 1,
2741
+ cases: [
2742
+ "other"
2743
+ ],
2744
+ examples: {
2745
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2746
+ }
2747
+ };
2748
+ const vo = {
2749
+ name: "Volapük",
2750
+ formula: "n != 1",
2751
+ plurals: 2,
2752
+ cases: [
2753
+ "one",
2754
+ "other"
2755
+ ],
2756
+ examples: {
2757
+ one: "1",
2758
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2759
+ }
2760
+ };
2761
+ const vun = {
2762
+ name: "Vunjo",
2763
+ formula: "n != 1",
2764
+ plurals: 2,
2765
+ cases: [
2766
+ "one",
2767
+ "other"
2768
+ ],
2769
+ examples: {
2770
+ one: "1",
2771
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2772
+ }
2773
+ };
2774
+ const wa = {
2775
+ name: "Walloon",
2776
+ formula: "n > 1",
2777
+ plurals: 2,
2778
+ cases: [
2779
+ "one",
2780
+ "other"
2781
+ ],
2782
+ examples: {
2783
+ one: "0, 1",
2784
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
2785
+ }
2786
+ };
2787
+ const wae = {
2788
+ name: "Walser",
2789
+ formula: "n != 1",
2790
+ plurals: 2,
2791
+ cases: [
2792
+ "one",
2793
+ "other"
2794
+ ],
2795
+ examples: {
2796
+ one: "1",
2797
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2798
+ }
2799
+ };
2800
+ const wo = {
2801
+ name: "Wolof",
2802
+ formula: "0",
2803
+ plurals: 1,
2804
+ cases: [
2805
+ "other"
2806
+ ],
2807
+ examples: {
2808
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2809
+ }
2810
+ };
2811
+ const xh = {
2812
+ name: "Xhosa",
2813
+ formula: "n != 1",
2814
+ plurals: 2,
2815
+ cases: [
2816
+ "one",
2817
+ "other"
2818
+ ],
2819
+ examples: {
2820
+ one: "1",
2821
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2822
+ }
2823
+ };
2824
+ const xog = {
2825
+ name: "Soga",
2826
+ formula: "n != 1",
2827
+ plurals: 2,
2828
+ cases: [
2829
+ "one",
2830
+ "other"
2831
+ ],
2832
+ examples: {
2833
+ one: "1",
2834
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2835
+ }
2836
+ };
2837
+ const yi = {
2838
+ name: "Yiddish",
2839
+ formula: "n != 1",
2840
+ plurals: 2,
2841
+ cases: [
2842
+ "one",
2843
+ "other"
2844
+ ],
2845
+ examples: {
2846
+ one: "1",
2847
+ other: "0, 2~16, 100, 1000, 10000, 100000, 1000000, …"
2848
+ }
2849
+ };
2850
+ const yo = {
2851
+ name: "Yoruba",
2852
+ formula: "0",
2853
+ plurals: 1,
2854
+ cases: [
2855
+ "other"
2856
+ ],
2857
+ examples: {
2858
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2859
+ }
2860
+ };
2861
+ const yue = {
2862
+ name: "Cantonese",
2863
+ formula: "0",
2864
+ plurals: 1,
2865
+ cases: [
2866
+ "other"
2867
+ ],
2868
+ examples: {
2869
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2870
+ }
2871
+ };
2872
+ const zh = {
2873
+ name: "Chinese",
2874
+ formula: "0",
2875
+ plurals: 1,
2876
+ cases: [
2877
+ "other"
2878
+ ],
2879
+ examples: {
2880
+ other: "0~15, 100, 1000, 10000, 100000, 1000000, …"
2881
+ }
2882
+ };
2883
+ const zu = {
2884
+ name: "Zulu",
2885
+ formula: "n > 1",
2886
+ plurals: 2,
2887
+ cases: [
2888
+ "one",
2889
+ "other"
2890
+ ],
2891
+ examples: {
2892
+ one: "0, 1",
2893
+ other: "2~17, 100, 1000, 10000, 100000, 1000000, …"
2894
+ }
2895
+ };
2896
+ const gettextPlurals = {
2897
+ af: af,
2898
+ ak: ak,
2899
+ am: am,
2900
+ an: an,
2901
+ ar: ar,
2902
+ ars: ars,
2903
+ as: as,
2904
+ asa: asa,
2905
+ ast: ast,
2906
+ az: az,
2907
+ bal: bal,
2908
+ be: be,
2909
+ bem: bem,
2910
+ bez: bez,
2911
+ bg: bg,
2912
+ bho: bho,
2913
+ blo: blo,
2914
+ bm: bm,
2915
+ bn: bn,
2916
+ bo: bo,
2917
+ br: br,
2918
+ brx: brx,
2919
+ bs: bs,
2920
+ ca: ca,
2921
+ ce: ce,
2922
+ ceb: ceb,
2923
+ cgg: cgg,
2924
+ chr: chr,
2925
+ ckb: ckb,
2926
+ cs: cs,
2927
+ csw: csw,
2928
+ cy: cy,
2929
+ da: da,
2930
+ de: de,
2931
+ doi: doi,
2932
+ dsb: dsb,
2933
+ dv: dv,
2934
+ dz: dz,
2935
+ ee: ee,
2936
+ el: el,
2937
+ en: en,
2938
+ eo: eo,
2939
+ es: es,
2940
+ et: et,
2941
+ eu: eu,
2942
+ fa: fa,
2943
+ ff: ff,
2944
+ fi: fi,
2945
+ fil: fil,
2946
+ fo: fo,
2947
+ fr: fr,
2948
+ fur: fur,
2949
+ fy: fy,
2950
+ ga: ga,
2951
+ gd: gd,
2952
+ gl: gl,
2953
+ gsw: gsw,
2954
+ gu: gu,
2955
+ guw: guw,
2956
+ gv: gv,
2957
+ ha: ha,
2958
+ haw: haw,
2959
+ he: he,
2960
+ hi: hi,
2961
+ hnj: hnj,
2962
+ hr: hr,
2963
+ hsb: hsb,
2964
+ hu: hu,
2965
+ hy: hy,
2966
+ ia: ia,
2967
+ id: id,
2968
+ ig: ig,
2969
+ ii: ii,
2970
+ io: io,
2971
+ is: is,
2972
+ it: it,
2973
+ iu: iu,
2974
+ ja: ja,
2975
+ jbo: jbo,
2976
+ jgo: jgo,
2977
+ jmc: jmc,
2978
+ jv: jv,
2979
+ ka: ka,
2980
+ kab: kab,
2981
+ kaj: kaj,
2982
+ kcg: kcg,
2983
+ kde: kde,
2984
+ kea: kea,
2985
+ kk: kk,
2986
+ kkj: kkj,
2987
+ kl: kl,
2988
+ km: km,
2989
+ kn: kn,
2990
+ ko: ko,
2991
+ ks: ks,
2992
+ ksb: ksb,
2993
+ ksh: ksh,
2994
+ ku: ku,
2995
+ kw: kw,
2996
+ ky: ky,
2997
+ lag: lag,
2998
+ lb: lb,
2999
+ lg: lg,
3000
+ lij: lij,
3001
+ lkt: lkt,
3002
+ lld: lld,
3003
+ ln: ln,
3004
+ lo: lo,
3005
+ lt: lt,
3006
+ lv: lv,
3007
+ mas: mas,
3008
+ mg: mg,
3009
+ mgo: mgo,
3010
+ mk: mk,
3011
+ ml: ml,
3012
+ mn: mn,
3013
+ mr: mr,
3014
+ ms: ms,
3015
+ mt: mt,
3016
+ my: my,
3017
+ nah: nah,
3018
+ naq: naq,
3019
+ nb: nb,
3020
+ nd: nd,
3021
+ ne: ne,
3022
+ nl: nl,
3023
+ nn: nn,
3024
+ nnh: nnh,
3025
+ no: no,
3026
+ nqo: nqo,
3027
+ nr: nr,
3028
+ nso: nso,
3029
+ ny: ny,
3030
+ nyn: nyn,
3031
+ om: om,
3032
+ or: or,
3033
+ os: os,
3034
+ osa: osa,
3035
+ pa: pa,
3036
+ pap: pap,
3037
+ pcm: pcm,
3038
+ pl: pl,
3039
+ prg: prg,
3040
+ ps: ps,
3041
+ pt: pt,
3042
+ pt_PT: pt_PT,
3043
+ rm: rm,
3044
+ ro: ro,
3045
+ rof: rof,
3046
+ ru: ru,
3047
+ rwk: rwk,
3048
+ sah: sah,
3049
+ saq: saq,
3050
+ sat: sat,
3051
+ sc: sc,
3052
+ scn: scn,
3053
+ sd: sd,
3054
+ sdh: sdh,
3055
+ se: se,
3056
+ seh: seh,
3057
+ ses: ses,
3058
+ sg: sg,
3059
+ sh: sh,
3060
+ shi: shi,
3061
+ si: si,
3062
+ sk: sk,
3063
+ sl: sl,
3064
+ sma: sma,
3065
+ smi: smi,
3066
+ smj: smj,
3067
+ smn: smn,
3068
+ sms: sms,
3069
+ sn: sn,
3070
+ so: so,
3071
+ sq: sq,
3072
+ sr: sr,
3073
+ ss: ss,
3074
+ ssy: ssy,
3075
+ st: st,
3076
+ su: su,
3077
+ sv: sv,
3078
+ sw: sw,
3079
+ syr: syr,
3080
+ ta: ta,
3081
+ te: te,
3082
+ teo: teo,
3083
+ th: th,
3084
+ ti: ti,
3085
+ tig: tig,
3086
+ tk: tk,
3087
+ tl: tl,
3088
+ tn: tn,
3089
+ to: to,
3090
+ tpi: tpi,
3091
+ tr: tr,
3092
+ ts: ts,
3093
+ tzm: tzm,
3094
+ ug: ug,
3095
+ uk: uk,
3096
+ ur: ur,
3097
+ uz: uz,
3098
+ ve: ve,
3099
+ vec: vec,
3100
+ vi: vi,
3101
+ vo: vo,
3102
+ vun: vun,
3103
+ wa: wa,
3104
+ wae: wae,
3105
+ wo: wo,
3106
+ xh: xh,
3107
+ xog: xog,
3108
+ yi: yi,
3109
+ yo: yo,
3110
+ yue: yue,
3111
+ zh: zh,
3112
+ zu: zu
3113
+ };
3114
+
17
3115
  function fillRange(value) {
18
3116
  const [start, end] = value.split("~");
19
3117
  const decimals = (start.split(".")[1] || "").length;
@@ -27,42 +3125,95 @@ function fillRange(value) {
27
3125
  }
28
3126
  return range.map((v) => Number(v));
29
3127
  }
30
- function createSamples(src) {
31
- let result = [];
32
- src.replace(/…/, "").trim().replace(/,$/, "").split(",").map(function(val) {
33
- return val.trim();
34
- }).forEach((val) => {
35
- if (val.indexOf("~") !== -1) {
36
- result = result.concat(fillRange(val));
37
- } else {
38
- result.push(Number(val));
39
- }
40
- });
41
- return result;
3128
+ function parseCompactedNumber(val) {
3129
+ const compactMatch = /^(\d+)c(\d+)$/.exec(val);
3130
+ const base = Number(compactMatch[1]);
3131
+ const power = Number(compactMatch[2]);
3132
+ return base * Math.pow(10, power);
42
3133
  }
43
- function createLocaleTest(rules) {
44
- const result = {};
45
- Object.keys(rules).forEach((form) => {
46
- const samples = rules[form].split(/@integer|@decimal/).slice(1);
47
- result[form] = [];
48
- samples.forEach((sample) => {
49
- result[form] = result[form].concat(createSamples(sample));
50
- });
3134
+ function parseExamples(src) {
3135
+ return src.replace(/…/, "").trim().replace(/,$/, "").split(",").flatMap((val) => {
3136
+ val = val.trim();
3137
+ if (val.includes("c")) {
3138
+ return parseCompactedNumber(val);
3139
+ }
3140
+ if (val.includes("~")) {
3141
+ return fillRange(val);
3142
+ }
3143
+ return Number(val);
51
3144
  });
52
- return result;
53
3145
  }
54
- function getCldrPluralSamples() {
55
- const pluralRules = {};
56
- Object.entries(cardinals.supplemental["plurals-type-cardinal"]).forEach(
57
- ([loc, ruleset]) => {
58
- const rules = renameKeys(ruleset);
59
- pluralRules[loc.toLowerCase()] = createLocaleTest(rules);
3146
+
3147
+ function parsePluralFormsHeader(pluralFormsHeader) {
3148
+ const [npluralsExpr, expr] = pluralFormsHeader.split(";");
3149
+ try {
3150
+ if (!expr) {
3151
+ throw new Error("malformed expr");
60
3152
  }
3153
+ const nplurals = new Function(npluralsExpr + "; return nplurals;")();
3154
+ return {
3155
+ nplurals,
3156
+ pluralsFunc: createPluralFunc(
3157
+ expr.replace(/\s/g, "").replace("plural=", "")
3158
+ )
3159
+ };
3160
+ } catch (e) {
3161
+ console.warn(
3162
+ `Plural-Forms header has incorrect value: ${pluralFormsHeader}`
3163
+ );
3164
+ return void 0;
3165
+ }
3166
+ }
3167
+ function createPluralFunc(expr) {
3168
+ const func = new Function(
3169
+ "n",
3170
+ "return " + expr
61
3171
  );
62
- return pluralRules;
3172
+ return (val) => {
3173
+ return Number(func(val));
3174
+ };
63
3175
  }
64
3176
 
65
- const cldrSamples = getCldrPluralSamples();
3177
+ const typedGettextPlurals = gettextPlurals;
3178
+ function getLanguageDef(lang) {
3179
+ lang = lang.replace("-", "_");
3180
+ if (typedGettextPlurals[lang]) {
3181
+ return typedGettextPlurals[lang];
3182
+ }
3183
+ const [correctLang] = lang.split(/[-_]/g);
3184
+ return typedGettextPlurals[correctLang];
3185
+ }
3186
+ const mapGettextPlurals2Icu = (langHeader, pluralFormsHeader) => {
3187
+ const def = getLanguageDef(langHeader);
3188
+ if (!def) {
3189
+ console.warn(
3190
+ `No plural forms found in CLDR database for language "${langHeader}". Please check that you specified a correct language in Language header.`
3191
+ );
3192
+ return void 0;
3193
+ }
3194
+ let gettextPluralsInfo;
3195
+ if (pluralFormsHeader) {
3196
+ gettextPluralsInfo = parsePluralFormsHeader(pluralFormsHeader);
3197
+ } else {
3198
+ gettextPluralsInfo = {
3199
+ nplurals: def.plurals,
3200
+ pluralsFunc: createPluralFunc(def.formula)
3201
+ };
3202
+ }
3203
+ if (!gettextPluralsInfo) {
3204
+ return void 0;
3205
+ }
3206
+ const cases = [...Array(def.cases.length)];
3207
+ for (const form of def.cases) {
3208
+ const samples = parseExamples(def.examples[form]);
3209
+ const pluralForm = Number(
3210
+ gettextPluralsInfo.pluralsFunc(Number(samples[0]))
3211
+ );
3212
+ cases[pluralForm] = form;
3213
+ }
3214
+ return cases;
3215
+ };
3216
+
66
3217
  function stringifyICUCase(icuCase) {
67
3218
  return icuCase.tokens.map((token) => {
68
3219
  if (token.type === "content") {
@@ -114,7 +3265,7 @@ function serializePlurals(item, message, id, isGeneratedId, options, formatterCt
114
3265
  item.msgid_plural = id + "_plural";
115
3266
  }
116
3267
  item.extractedComments.push(ctxPrefix + serializeContextToComment(ctx));
117
- if (message.translation?.length > 0) {
3268
+ if (message.translation) {
118
3269
  const ast = parse(message.translation)[0];
119
3270
  if (ast.cases == null) {
120
3271
  console.warn(
@@ -124,7 +3275,7 @@ function serializePlurals(item, message, id, isGeneratedId, options, formatterCt
124
3275
  } else {
125
3276
  item.msgstr = ast.cases.map(stringifyICUCase);
126
3277
  }
127
- } else if (!isGeneratedId && (formatterCtx.locale === formatterCtx.sourceLocale || formatterCtx.locale === null)) {
3278
+ } else if (!isGeneratedId && (formatterCtx.locale === formatterCtx.sourceLocale || !formatterCtx.locale)) {
128
3279
  item.msgstr = messageAst.cases.map(stringifyICUCase);
129
3280
  }
130
3281
  } catch (e) {
@@ -133,60 +3284,14 @@ function serializePlurals(item, message, id, isGeneratedId, options, formatterCt
133
3284
  } else {
134
3285
  if (!options.disableSelectWarning && ICU_SELECT_REGEX.test(_simplifiedMessage)) {
135
3286
  console.warn(
136
- `ICU 'select' and 'selectOrdinal' formats cannot be expressed natively in gettext format. Item with key "%s" will be included in the catalog as raw ICU message. To disable this warning, include '{ disableSelectWarning: true }' in the config's 'formatOptions'`,
3287
+ `ICU 'select' and 'selectOrdinal' formats cannot be expressed natively in gettext format. Item with key "%s" will be included in the catalog as raw ICU message. To disable this warning, include '{ disableSelectWarning: true }' in the options for this formatter`,
137
3288
  id
138
3289
  );
139
3290
  }
140
- item.msgstr = [message.translation];
3291
+ item.msgstr = message.translation ? [message.translation] : [];
141
3292
  }
142
3293
  return item;
143
3294
  }
144
- const getPluralCases = (lang, pluralFormsHeader) => {
145
- let gettextPluralsInfo;
146
- if (pluralFormsHeader) {
147
- gettextPluralsInfo = parsePluralFormsFn(pluralFormsHeader);
148
- }
149
- const [correctLang] = lang.split(/[-_]/g);
150
- if (!gettextPluralsInfo) {
151
- gettextPluralsInfo = gettextPlurals[correctLang];
152
- }
153
- if (!gettextPluralsInfo) {
154
- if (lang !== "pseudo") {
155
- console.warn(
156
- `No plural rules found for language "${lang}". Please add a Plural-Forms header.`
157
- );
158
- }
159
- return void 0;
160
- }
161
- const cases = [...Array(pluralsCldr.forms(correctLang).length)];
162
- for (const form of pluralsCldr.forms(correctLang)) {
163
- const samples = cldrSamples[correctLang][form];
164
- const pluralForm = Number(
165
- gettextPluralsInfo.pluralsFunc(Number(samples[0]))
166
- );
167
- cases[pluralForm] = form;
168
- }
169
- return cases;
170
- };
171
- function parsePluralFormsFn(pluralFormsHeader) {
172
- const [npluralsExpr, expr] = pluralFormsHeader.split(";");
173
- try {
174
- const nplurals = new Function(npluralsExpr + "; return nplurals;")();
175
- const pluralsFunc = new Function(
176
- "n",
177
- expr + "; return plural;"
178
- );
179
- return {
180
- nplurals,
181
- pluralsFunc
182
- };
183
- } catch (e) {
184
- console.warn(
185
- `Plural-Forms header has incorrect value: ${pluralFormsHeader}`
186
- );
187
- return void 0;
188
- }
189
- }
190
3295
  const convertPluralsToICU = (item, pluralForms, lang, ctxPrefix = DEFAULT_CTX_PREFIX) => {
191
3296
  const translationCount = item.msgstr.length;
192
3297
  const messageKey = item.msgid;
@@ -213,7 +3318,7 @@ const convertPluralsToICU = (item, pluralForms, lang, ctxPrefix = DEFAULT_CTX_PR
213
3318
  if (item.msgstr.every((str) => str.length === 0)) {
214
3319
  return;
215
3320
  }
216
- if (pluralForms == null) {
3321
+ if (!pluralForms) {
217
3322
  console.warn(
218
3323
  `Multiple translations for item with key "%s" in language "${lang}", but no plural cases were found. This prohibits the translation of .po plurals into ICU plurals. Pluralization will not work for this key.`,
219
3324
  messageKey
@@ -265,7 +3370,7 @@ function getContextFromComments(extractedComments, ctxPrefix) {
265
3370
  return void 0;
266
3371
  }
267
3372
  const urlParams = new URLSearchParams(
268
- contextComment?.substring(ctxPrefix.length)
3373
+ contextComment.substring(ctxPrefix.length)
269
3374
  );
270
3375
  return {
271
3376
  icu: urlParams.get("icu"),
@@ -304,7 +3409,7 @@ function mergeDuplicatePluralEntries(items, options) {
304
3409
  updateContextComment(
305
3410
  mergedItem,
306
3411
  serializeContextToComment({
307
- icu: replaceArgInIcu(ctx.icu, allVariables[0], "$var"),
3412
+ icu: ctx.icu ? replaceArgInIcu(ctx.icu, allVariables[0], "$var") : ctx.icu,
308
3413
  pluralizeOn: allVariables
309
3414
  }),
310
3415
  ctxPrefix
@@ -351,7 +3456,7 @@ function expandMergedPluralEntries(items, options) {
351
3456
  serializeContextToComment({
352
3457
  pluralizeOn: [variable],
353
3458
  // get icu comment, replace variable placeholder with current variable
354
- icu: replaceArgInIcu(ctx.icu, "\\$var", variable)
3459
+ icu: ctx.icu ? replaceArgInIcu(ctx.icu, "\\$var", variable) : ctx.icu
355
3460
  }),
356
3461
  ctxPrefix
357
3462
  );
@@ -377,15 +3482,21 @@ function formatter(options = {}) {
377
3482
  if (options.mergePlurals) {
378
3483
  po.items = expandMergedPluralEntries(po.items, options);
379
3484
  }
380
- const pluralForms = getPluralCases(
381
- po.headers.Language,
3485
+ const language = po.headers.Language;
3486
+ if (!language) {
3487
+ throw new Error(
3488
+ `No language defined for catalog. Please add a Language header.`
3489
+ );
3490
+ }
3491
+ const pluralForms = mapGettextPlurals2Icu(
3492
+ language,
382
3493
  po.headers["Plural-Forms"]
383
3494
  );
384
3495
  po.items.forEach((item) => {
385
3496
  convertPluralsToICU(
386
3497
  item,
387
3498
  pluralForms,
388
- po.headers.Language,
3499
+ language,
389
3500
  options.customICUPrefix
390
3501
  );
391
3502
  });