localize.cjs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. "use strict";
  2. exports.localize = void 0;
  3. var _index = require("../../_lib/buildLocalizeFn.cjs");
  4. const eraValues = {
  5. narrow: ["ម.គស", "គស"],
  6. abbreviated: ["មុនគ.ស", "គ.ស"],
  7. wide: ["មុនគ្រិស្តសករាជ", "នៃគ្រិស្តសករាជ"],
  8. };
  9. const quarterValues = {
  10. narrow: ["1", "2", "3", "4"],
  11. abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  12. wide: ["ត្រីមាសទី 1", "ត្រីមាសទី 2", "ត្រីមាសទី 3", "ត្រីមាសទី 4"],
  13. };
  14. const monthValues = {
  15. narrow: [
  16. "ម.ក",
  17. "ក.ម",
  18. "មិ",
  19. "ម.ស",
  20. "ឧ.ស",
  21. "ម.ថ",
  22. "ក.ដ",
  23. "សី",
  24. "កញ",
  25. "តុ",
  26. "វិ",
  27. "ធ",
  28. ],
  29. abbreviated: [
  30. "មករា",
  31. "កុម្ភៈ",
  32. "មីនា",
  33. "មេសា",
  34. "ឧសភា",
  35. "មិថុនា",
  36. "កក្កដា",
  37. "សីហា",
  38. "កញ្ញា",
  39. "តុលា",
  40. "វិច្ឆិកា",
  41. "ធ្នូ",
  42. ],
  43. wide: [
  44. "មករា",
  45. "កុម្ភៈ",
  46. "មីនា",
  47. "មេសា",
  48. "ឧសភា",
  49. "មិថុនា",
  50. "កក្កដា",
  51. "សីហា",
  52. "កញ្ញា",
  53. "តុលា",
  54. "វិច្ឆិកា",
  55. "ធ្នូ",
  56. ],
  57. };
  58. const dayValues = {
  59. narrow: ["អា", "ច", "អ", "ព", "ព្រ", "សុ", "ស"],
  60. short: ["អា", "ច", "អ", "ព", "ព្រ", "សុ", "ស"],
  61. abbreviated: ["អា", "ច", "អ", "ព", "ព្រ", "សុ", "ស"],
  62. wide: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"],
  63. };
  64. const dayPeriodValues = {
  65. narrow: {
  66. am: "ព្រឹក",
  67. pm: "ល្ងាច",
  68. midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
  69. noon: "ពេលថ្ងៃត្រង់",
  70. morning: "ពេលព្រឹក",
  71. afternoon: "ពេលរសៀល",
  72. evening: "ពេលល្ងាច",
  73. night: "ពេលយប់",
  74. },
  75. abbreviated: {
  76. am: "ព្រឹក",
  77. pm: "ល្ងាច",
  78. midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
  79. noon: "ពេលថ្ងៃត្រង់",
  80. morning: "ពេលព្រឹក",
  81. afternoon: "ពេលរសៀល",
  82. evening: "ពេលល្ងាច",
  83. night: "ពេលយប់",
  84. },
  85. wide: {
  86. am: "ព្រឹក",
  87. pm: "ល្ងាច",
  88. midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
  89. noon: "ពេលថ្ងៃត្រង់",
  90. morning: "ពេលព្រឹក",
  91. afternoon: "ពេលរសៀល",
  92. evening: "ពេលល្ងាច",
  93. night: "ពេលយប់",
  94. },
  95. };
  96. const formattingDayPeriodValues = {
  97. narrow: {
  98. am: "ព្រឹក",
  99. pm: "ល្ងាច",
  100. midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
  101. noon: "ពេលថ្ងៃត្រង់",
  102. morning: "ពេលព្រឹក",
  103. afternoon: "ពេលរសៀល",
  104. evening: "ពេលល្ងាច",
  105. night: "ពេលយប់",
  106. },
  107. abbreviated: {
  108. am: "ព្រឹក",
  109. pm: "ល្ងាច",
  110. midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
  111. noon: "ពេលថ្ងៃត្រង់",
  112. morning: "ពេលព្រឹក",
  113. afternoon: "ពេលរសៀល",
  114. evening: "ពេលល្ងាច",
  115. night: "ពេលយប់",
  116. },
  117. wide: {
  118. am: "ព្រឹក",
  119. pm: "ល្ងាច",
  120. midnight: "​ពេលកណ្ដាលអធ្រាត្រ",
  121. noon: "ពេលថ្ងៃត្រង់",
  122. morning: "ពេលព្រឹក",
  123. afternoon: "ពេលរសៀល",
  124. evening: "ពេលល្ងាច",
  125. night: "ពេលយប់",
  126. },
  127. };
  128. const ordinalNumber = (dirtyNumber, _) => {
  129. const number = Number(dirtyNumber);
  130. return number.toString();
  131. };
  132. const localize = (exports.localize = {
  133. ordinalNumber,
  134. era: (0, _index.buildLocalizeFn)({
  135. values: eraValues,
  136. defaultWidth: "wide",
  137. }),
  138. quarter: (0, _index.buildLocalizeFn)({
  139. values: quarterValues,
  140. defaultWidth: "wide",
  141. argumentCallback: (quarter) => quarter - 1,
  142. }),
  143. month: (0, _index.buildLocalizeFn)({
  144. values: monthValues,
  145. defaultWidth: "wide",
  146. }),
  147. day: (0, _index.buildLocalizeFn)({
  148. values: dayValues,
  149. defaultWidth: "wide",
  150. }),
  151. dayPeriod: (0, _index.buildLocalizeFn)({
  152. values: dayPeriodValues,
  153. defaultWidth: "wide",
  154. formattingValues: formattingDayPeriodValues,
  155. defaultFormattingWidth: "wide",
  156. }),
  157. });