ordinals.mjs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. const a = (n) => 'other';
  2. const b = (n) => n == 1 ? 'one' : 'other';
  3. export const af = a;
  4. export const am = a;
  5. export const an = a;
  6. export const ar = a;
  7. export const as = (n) => (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'
  8. : (n == 2 || n == 3) ? 'two'
  9. : n == 4 ? 'few'
  10. : n == 6 ? 'many'
  11. : 'other';
  12. export const ast = a;
  13. export const az = (n) => {
  14. const s = String(n).split('.'), i = s[0], i10 = i.slice(-1), i100 = i.slice(-2), i1000 = i.slice(-3);
  15. return (i10 == 1 || i10 == 2 || i10 == 5 || i10 == 7 || i10 == 8) || (i100 == 20 || i100 == 50 || i100 == 70 || i100 == 80) ? 'one'
  16. : (i10 == 3 || i10 == 4) || (i1000 == 100 || i1000 == 200 || i1000 == 300 || i1000 == 400 || i1000 == 500 || i1000 == 600 || i1000 == 700 || i1000 == 800 || i1000 == 900) ? 'few'
  17. : i == 0 || i10 == 6 || (i100 == 40 || i100 == 60 || i100 == 90) ? 'many'
  18. : 'other';
  19. };
  20. export const bal = b;
  21. export const be = (n) => {
  22. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
  23. return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';
  24. };
  25. export const bg = a;
  26. export const bn = (n) => (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'
  27. : (n == 2 || n == 3) ? 'two'
  28. : n == 4 ? 'few'
  29. : n == 6 ? 'many'
  30. : 'other';
  31. export const bs = a;
  32. export const ca = (n) => (n == 1 || n == 3) ? 'one'
  33. : n == 2 ? 'two'
  34. : n == 4 ? 'few'
  35. : 'other';
  36. export const ce = a;
  37. export const cs = a;
  38. export const cy = (n) => (n == 0 || n == 7 || n == 8 || n == 9) ? 'zero'
  39. : n == 1 ? 'one'
  40. : n == 2 ? 'two'
  41. : (n == 3 || n == 4) ? 'few'
  42. : (n == 5 || n == 6) ? 'many'
  43. : 'other';
  44. export const da = a;
  45. export const de = a;
  46. export const dsb = a;
  47. export const el = a;
  48. export const en = (n) => {
  49. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
  50. return n10 == 1 && n100 != 11 ? 'one'
  51. : n10 == 2 && n100 != 12 ? 'two'
  52. : n10 == 3 && n100 != 13 ? 'few'
  53. : 'other';
  54. };
  55. export const es = a;
  56. export const et = a;
  57. export const eu = a;
  58. export const fa = a;
  59. export const fi = a;
  60. export const fil = b;
  61. export const fr = b;
  62. export const fy = a;
  63. export const ga = b;
  64. export const gd = (n) => (n == 1 || n == 11) ? 'one'
  65. : (n == 2 || n == 12) ? 'two'
  66. : (n == 3 || n == 13) ? 'few'
  67. : 'other';
  68. export const gl = a;
  69. export const gsw = a;
  70. export const gu = (n) => n == 1 ? 'one'
  71. : (n == 2 || n == 3) ? 'two'
  72. : n == 4 ? 'few'
  73. : n == 6 ? 'many'
  74. : 'other';
  75. export const he = a;
  76. export const hi = (n) => n == 1 ? 'one'
  77. : (n == 2 || n == 3) ? 'two'
  78. : n == 4 ? 'few'
  79. : n == 6 ? 'many'
  80. : 'other';
  81. export const hr = a;
  82. export const hsb = a;
  83. export const hu = (n) => (n == 1 || n == 5) ? 'one' : 'other';
  84. export const hy = b;
  85. export const ia = a;
  86. export const id = a;
  87. export const is = a;
  88. export const it = (n) => (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
  89. export const ja = a;
  90. export const ka = (n) => {
  91. const s = String(n).split('.'), i = s[0], i100 = i.slice(-2);
  92. return i == 1 ? 'one'
  93. : i == 0 || ((i100 >= 2 && i100 <= 20) || i100 == 40 || i100 == 60 || i100 == 80) ? 'many'
  94. : 'other';
  95. };
  96. export const kk = (n) => {
  97. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);
  98. return n10 == 6 || n10 == 9 || t0 && n10 == 0 && n != 0 ? 'many' : 'other';
  99. };
  100. export const km = a;
  101. export const kn = a;
  102. export const ko = a;
  103. export const kw = (n) => {
  104. const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
  105. return (t0 && n >= 1 && n <= 4) || ((n100 >= 1 && n100 <= 4) || (n100 >= 21 && n100 <= 24) || (n100 >= 41 && n100 <= 44) || (n100 >= 61 && n100 <= 64) || (n100 >= 81 && n100 <= 84)) ? 'one'
  106. : n == 5 || n100 == 5 ? 'many'
  107. : 'other';
  108. };
  109. export const ky = a;
  110. export const lij = (n) => {
  111. const s = String(n).split('.'), t0 = Number(s[0]) == n;
  112. return (n == 11 || n == 8 || (t0 && n >= 80 && n <= 89) || (t0 && n >= 800 && n <= 899)) ? 'many' : 'other';
  113. };
  114. export const lo = b;
  115. export const lt = a;
  116. export const lv = a;
  117. export const mk = (n) => {
  118. const s = String(n).split('.'), i = s[0], i10 = i.slice(-1), i100 = i.slice(-2);
  119. return i10 == 1 && i100 != 11 ? 'one'
  120. : i10 == 2 && i100 != 12 ? 'two'
  121. : (i10 == 7 || i10 == 8) && i100 != 17 && i100 != 18 ? 'many'
  122. : 'other';
  123. };
  124. export const ml = a;
  125. export const mn = a;
  126. export const mo = b;
  127. export const mr = (n) => n == 1 ? 'one'
  128. : (n == 2 || n == 3) ? 'two'
  129. : n == 4 ? 'few'
  130. : 'other';
  131. export const ms = b;
  132. export const my = a;
  133. export const nb = a;
  134. export const ne = (n) => {
  135. const s = String(n).split('.'), t0 = Number(s[0]) == n;
  136. return (t0 && n >= 1 && n <= 4) ? 'one' : 'other';
  137. };
  138. export const nl = a;
  139. export const no = a;
  140. export const or = (n) => {
  141. const s = String(n).split('.'), t0 = Number(s[0]) == n;
  142. return (n == 1 || n == 5 || (t0 && n >= 7 && n <= 9)) ? 'one'
  143. : (n == 2 || n == 3) ? 'two'
  144. : n == 4 ? 'few'
  145. : n == 6 ? 'many'
  146. : 'other';
  147. };
  148. export const pa = a;
  149. export const pl = a;
  150. export const prg = a;
  151. export const ps = a;
  152. export const pt = a;
  153. export const ro = b;
  154. export const ru = a;
  155. export const sc = (n) => (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
  156. export const scn = (n) => (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
  157. export const sd = a;
  158. export const sh = a;
  159. export const si = a;
  160. export const sk = a;
  161. export const sl = a;
  162. export const sq = (n) => {
  163. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
  164. return n == 1 ? 'one'
  165. : n10 == 4 && n100 != 14 ? 'many'
  166. : 'other';
  167. };
  168. export const sr = a;
  169. export const sv = (n) => {
  170. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
  171. return (n10 == 1 || n10 == 2) && n100 != 11 && n100 != 12 ? 'one' : 'other';
  172. };
  173. export const sw = a;
  174. export const ta = a;
  175. export const te = a;
  176. export const th = a;
  177. export const tk = (n) => {
  178. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);
  179. return (n10 == 6 || n10 == 9) || n == 10 ? 'few' : 'other';
  180. };
  181. export const tl = b;
  182. export const tpi = a;
  183. export const tr = a;
  184. export const uk = (n) => {
  185. const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
  186. return n10 == 3 && n100 != 13 ? 'few' : 'other';
  187. };
  188. export const und = a;
  189. export const ur = a;
  190. export const uz = a;
  191. export const vec = (n) => (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
  192. export const vi = b;
  193. export const yue = a;
  194. export const zh = a;
  195. export const zu = a;