localize.cjs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. "use strict";
  2. exports.localize = void 0;
  3. var _index = require("../../_lib/buildLocalizeFn.cjs");
  4. // https://www.unicode.org/cldr/charts/32/summary/gu.html
  5. // #1621 - #1630
  6. const eraValues = {
  7. narrow: ["ઈસપૂ", "ઈસ"],
  8. abbreviated: ["ઈ.સ.પૂર્વે", "ઈ.સ."],
  9. wide: ["ઈસવીસન પૂર્વે", "ઈસવીસન"],
  10. };
  11. // https://www.unicode.org/cldr/charts/32/summary/gu.html
  12. // #1631 - #1654
  13. const quarterValues = {
  14. narrow: ["1", "2", "3", "4"],
  15. abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  16. wide: ["1લો ત્રિમાસ", "2જો ત્રિમાસ", "3જો ત્રિમાસ", "4થો ત્રિમાસ"],
  17. };
  18. // Note: in English, the names of days of the week and months are capitalized.
  19. // If you are making a new locale based on this one, check if the same is true for the language you're working on.
  20. // Generally, formatted dates should look like they are in the middle of a sentence,
  21. // e.g. in Spanish language the weekdays and months should be in the lowercase.
  22. // https://www.unicode.org/cldr/charts/32/summary/gu.html
  23. // #1655 - #1726
  24. const monthValues = {
  25. narrow: ["જા", "ફે", "મા", "એ", "મે", "જૂ", "જુ", "ઓ", "સ", "ઓ", "ન", "ડિ"],
  26. abbreviated: [
  27. "જાન્યુ",
  28. "ફેબ્રુ",
  29. "માર્ચ",
  30. "એપ્રિલ",
  31. "મે",
  32. "જૂન",
  33. "જુલાઈ",
  34. "ઑગસ્ટ",
  35. "સપ્ટે",
  36. "ઓક્ટો",
  37. "નવે",
  38. "ડિસે",
  39. ],
  40. wide: [
  41. "જાન્યુઆરી",
  42. "ફેબ્રુઆરી",
  43. "માર્ચ",
  44. "એપ્રિલ",
  45. "મે",
  46. "જૂન",
  47. "જુલાઇ",
  48. "ઓગસ્ટ",
  49. "સપ્ટેમ્બર",
  50. "ઓક્ટોબર",
  51. "નવેમ્બર",
  52. "ડિસેમ્બર",
  53. ],
  54. };
  55. // https://www.unicode.org/cldr/charts/32/summary/gu.html
  56. // #1727 - #1768
  57. const dayValues = {
  58. narrow: ["ર", "સો", "મં", "બુ", "ગુ", "શુ", "શ"],
  59. short: ["ર", "સો", "મં", "બુ", "ગુ", "શુ", "શ"],
  60. abbreviated: ["રવિ", "સોમ", "મંગળ", "બુધ", "ગુરુ", "શુક્ર", "શનિ"],
  61. wide: [
  62. "રવિવાર" /* Sunday */,
  63. "સોમવાર" /* Monday */,
  64. "મંગળવાર" /* Tuesday */,
  65. "બુધવાર" /* Wednesday */,
  66. "ગુરુવાર" /* Thursday */,
  67. "શુક્રવાર" /* Friday */,
  68. "શનિવાર" /* Saturday */,
  69. ],
  70. };
  71. // https://www.unicode.org/cldr/charts/32/summary/gu.html
  72. // #1783 - #1824
  73. const dayPeriodValues = {
  74. narrow: {
  75. am: "AM",
  76. pm: "PM",
  77. midnight: "મ.રાત્રિ",
  78. noon: "બ.",
  79. morning: "સવારે",
  80. afternoon: "બપોરે",
  81. evening: "સાંજે",
  82. night: "રાત્રે",
  83. },
  84. abbreviated: {
  85. am: "AM",
  86. pm: "PM",
  87. midnight: "​મધ્યરાત્રિ",
  88. noon: "બપોરે",
  89. morning: "સવારે",
  90. afternoon: "બપોરે",
  91. evening: "સાંજે",
  92. night: "રાત્રે",
  93. },
  94. wide: {
  95. am: "AM",
  96. pm: "PM",
  97. midnight: "​મધ્યરાત્રિ",
  98. noon: "બપોરે",
  99. morning: "સવારે",
  100. afternoon: "બપોરે",
  101. evening: "સાંજે",
  102. night: "રાત્રે",
  103. },
  104. };
  105. const formattingDayPeriodValues = {
  106. narrow: {
  107. am: "AM",
  108. pm: "PM",
  109. midnight: "મ.રાત્રિ",
  110. noon: "બપોરે",
  111. morning: "સવારે",
  112. afternoon: "બપોરે",
  113. evening: "સાંજે",
  114. night: "રાત્રે",
  115. },
  116. abbreviated: {
  117. am: "AM",
  118. pm: "PM",
  119. midnight: "મધ્યરાત્રિ",
  120. noon: "બપોરે",
  121. morning: "સવારે",
  122. afternoon: "બપોરે",
  123. evening: "સાંજે",
  124. night: "રાત્રે",
  125. },
  126. wide: {
  127. am: "AM",
  128. pm: "PM",
  129. midnight: "​મધ્યરાત્રિ",
  130. noon: "બપોરે",
  131. morning: "સવારે",
  132. afternoon: "બપોરે",
  133. evening: "સાંજે",
  134. night: "રાત્રે",
  135. },
  136. };
  137. const ordinalNumber = (dirtyNumber, _options) => {
  138. return String(dirtyNumber);
  139. };
  140. const localize = (exports.localize = {
  141. ordinalNumber,
  142. era: (0, _index.buildLocalizeFn)({
  143. values: eraValues,
  144. defaultWidth: "wide",
  145. }),
  146. quarter: (0, _index.buildLocalizeFn)({
  147. values: quarterValues,
  148. defaultWidth: "wide",
  149. argumentCallback: (quarter) => quarter - 1,
  150. }),
  151. month: (0, _index.buildLocalizeFn)({
  152. values: monthValues,
  153. defaultWidth: "wide",
  154. }),
  155. day: (0, _index.buildLocalizeFn)({
  156. values: dayValues,
  157. defaultWidth: "wide",
  158. }),
  159. dayPeriod: (0, _index.buildLocalizeFn)({
  160. values: dayPeriodValues,
  161. defaultWidth: "wide",
  162. formattingValues: formattingDayPeriodValues,
  163. defaultFormattingWidth: "wide",
  164. }),
  165. });