index.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. // Source: https://www.unicode.org/cldr/charts/32/summary/te.html
  7. var formatDistanceLocale = {
  8. lessThanXSeconds: {
  9. standalone: {
  10. one: 'సెకను కన్నా తక్కువ',
  11. other: '{{count}} సెకన్ల కన్నా తక్కువ'
  12. },
  13. withPreposition: {
  14. one: 'సెకను',
  15. other: '{{count}} సెకన్ల'
  16. }
  17. },
  18. xSeconds: {
  19. standalone: {
  20. one: 'ఒక సెకను',
  21. // CLDR #1314
  22. other: '{{count}} సెకన్ల'
  23. },
  24. withPreposition: {
  25. one: 'ఒక సెకను',
  26. other: '{{count}} సెకన్ల'
  27. }
  28. },
  29. halfAMinute: {
  30. standalone: 'అర నిమిషం',
  31. withPreposition: 'అర నిమిషం'
  32. },
  33. lessThanXMinutes: {
  34. standalone: {
  35. one: 'ఒక నిమిషం కన్నా తక్కువ',
  36. other: '{{count}} నిమిషాల కన్నా తక్కువ'
  37. },
  38. withPreposition: {
  39. one: 'ఒక నిమిషం',
  40. other: '{{count}} నిమిషాల'
  41. }
  42. },
  43. xMinutes: {
  44. standalone: {
  45. one: 'ఒక నిమిషం',
  46. // CLDR #1311
  47. other: '{{count}} నిమిషాలు'
  48. },
  49. withPreposition: {
  50. one: 'ఒక నిమిషం',
  51. // CLDR #1311
  52. other: '{{count}} నిమిషాల'
  53. }
  54. },
  55. aboutXHours: {
  56. standalone: {
  57. one: 'సుమారు ఒక గంట',
  58. other: 'సుమారు {{count}} గంటలు'
  59. },
  60. withPreposition: {
  61. one: 'సుమారు ఒక గంట',
  62. other: 'సుమారు {{count}} గంటల'
  63. }
  64. },
  65. xHours: {
  66. standalone: {
  67. one: 'ఒక గంట',
  68. // CLDR #1308
  69. other: '{{count}} గంటలు'
  70. },
  71. withPreposition: {
  72. one: 'ఒక గంట',
  73. other: '{{count}} గంటల'
  74. }
  75. },
  76. xDays: {
  77. standalone: {
  78. one: 'ఒక రోజు',
  79. // CLDR #1292
  80. other: '{{count}} రోజులు'
  81. },
  82. withPreposition: {
  83. one: 'ఒక రోజు',
  84. other: '{{count}} రోజుల'
  85. }
  86. },
  87. aboutXWeeks: {
  88. standalone: {
  89. one: 'సుమారు ఒక వారం',
  90. other: 'సుమారు {{count}} వారాలు'
  91. },
  92. withPreposition: {
  93. one: 'సుమారు ఒక వారం',
  94. other: 'సుమారు {{count}} వారాలల'
  95. }
  96. },
  97. xWeeks: {
  98. standalone: {
  99. one: 'ఒక వారం',
  100. other: '{{count}} వారాలు'
  101. },
  102. withPreposition: {
  103. one: 'ఒక వారం',
  104. other: '{{count}} వారాలల'
  105. }
  106. },
  107. aboutXMonths: {
  108. standalone: {
  109. one: 'సుమారు ఒక నెల',
  110. other: 'సుమారు {{count}} నెలలు'
  111. },
  112. withPreposition: {
  113. one: 'సుమారు ఒక నెల',
  114. other: 'సుమారు {{count}} నెలల'
  115. }
  116. },
  117. xMonths: {
  118. standalone: {
  119. one: 'ఒక నెల',
  120. // CLDR #1281
  121. other: '{{count}} నెలలు'
  122. },
  123. withPreposition: {
  124. one: 'ఒక నెల',
  125. other: '{{count}} నెలల'
  126. }
  127. },
  128. aboutXYears: {
  129. standalone: {
  130. one: 'సుమారు ఒక సంవత్సరం',
  131. other: 'సుమారు {{count}} సంవత్సరాలు'
  132. },
  133. withPreposition: {
  134. one: 'సుమారు ఒక సంవత్సరం',
  135. other: 'సుమారు {{count}} సంవత్సరాల'
  136. }
  137. },
  138. xYears: {
  139. standalone: {
  140. one: 'ఒక సంవత్సరం',
  141. // CLDR #1275
  142. other: '{{count}} సంవత్సరాలు'
  143. },
  144. withPreposition: {
  145. one: 'ఒక సంవత్సరం',
  146. other: '{{count}} సంవత్సరాల'
  147. }
  148. },
  149. overXYears: {
  150. standalone: {
  151. one: 'ఒక సంవత్సరం పైగా',
  152. other: '{{count}} సంవత్సరాలకు పైగా'
  153. },
  154. withPreposition: {
  155. one: 'ఒక సంవత్సరం',
  156. other: '{{count}} సంవత్సరాల'
  157. }
  158. },
  159. almostXYears: {
  160. standalone: {
  161. one: 'దాదాపు ఒక సంవత్సరం',
  162. other: 'దాదాపు {{count}} సంవత్సరాలు'
  163. },
  164. withPreposition: {
  165. one: 'దాదాపు ఒక సంవత్సరం',
  166. other: 'దాదాపు {{count}} సంవత్సరాల'
  167. }
  168. }
  169. };
  170. var formatDistance = function formatDistance(token, count, options) {
  171. var result;
  172. var tokenValue = options !== null && options !== void 0 && options.addSuffix ? formatDistanceLocale[token].withPreposition : formatDistanceLocale[token].standalone;
  173. if (typeof tokenValue === 'string') {
  174. result = tokenValue;
  175. } else if (count === 1) {
  176. result = tokenValue.one;
  177. } else {
  178. result = tokenValue.other.replace('{{count}}', String(count));
  179. }
  180. if (options !== null && options !== void 0 && options.addSuffix) {
  181. if (options.comparison && options.comparison > 0) {
  182. return result + 'లో';
  183. } else {
  184. return result + ' క్రితం';
  185. }
  186. }
  187. return result;
  188. };
  189. var _default = formatDistance;
  190. exports.default = _default;
  191. module.exports = exports.default;