@esgettext/runtime 1.0.0 → 1.1.0

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.
Files changed (314) hide show
  1. package/README.md +6 -6
  2. package/{lib-esm → dist}/core/browser-environment.d.ts +1 -0
  3. package/dist/core/browser-environment.d.ts.map +1 -0
  4. package/{lib-esm → dist}/core/catalog-cache.d.ts +1 -0
  5. package/dist/core/catalog-cache.d.ts.map +1 -0
  6. package/dist/core/catalog-cache.spec.d.ts +2 -0
  7. package/dist/core/catalog-cache.spec.d.ts.map +1 -0
  8. package/dist/core/catalog-format.spec.d.ts +2 -0
  9. package/dist/core/catalog-format.spec.d.ts.map +1 -0
  10. package/{lib → dist}/core/catalog.d.ts +1 -0
  11. package/dist/core/catalog.d.ts.map +1 -0
  12. package/{lib → dist}/core/data-viewlet.d.ts +1 -0
  13. package/dist/core/data-viewlet.d.ts.map +1 -0
  14. package/dist/core/data-viewlet.spec.d.ts +2 -0
  15. package/dist/core/data-viewlet.spec.d.ts.map +1 -0
  16. package/{lib-esm → dist}/core/explode-locale.d.ts +1 -0
  17. package/dist/core/explode-locale.d.ts.map +1 -0
  18. package/dist/core/explode-locale.spec.d.ts +2 -0
  19. package/dist/core/explode-locale.spec.d.ts.map +1 -0
  20. package/{lib-esm → dist}/core/germanic-plural.d.ts +1 -0
  21. package/dist/core/germanic-plural.d.ts.map +1 -0
  22. package/{lib → dist}/core/gettext-impl.d.ts +1 -0
  23. package/dist/core/gettext-impl.d.ts.map +1 -0
  24. package/dist/core/gettext.spec.d.ts +2 -0
  25. package/dist/core/gettext.spec.d.ts.map +1 -0
  26. package/{lib-esm → dist}/core/index.d.ts +1 -0
  27. package/dist/core/index.d.ts.map +1 -0
  28. package/{lib → dist}/core/locale-container.d.ts +1 -0
  29. package/dist/core/locale-container.d.ts.map +1 -0
  30. package/dist/core/platform.d.ts +3 -0
  31. package/dist/core/platform.d.ts.map +1 -0
  32. package/{lib → dist}/core/resolve-impl.d.ts +1 -0
  33. package/dist/core/resolve-impl.d.ts.map +1 -0
  34. package/dist/core/resolve.spec.d.ts +2 -0
  35. package/dist/core/resolve.spec.d.ts.map +1 -0
  36. package/{lib-esm → dist}/core/select-locale.d.ts +1 -0
  37. package/dist/core/select-locale.d.ts.map +1 -0
  38. package/dist/core/select-locale.spec.d.ts +2 -0
  39. package/dist/core/select-locale.spec.d.ts.map +1 -0
  40. package/dist/core/set-locale-browser.spec.d.ts +2 -0
  41. package/dist/core/set-locale-browser.spec.d.ts.map +1 -0
  42. package/dist/core/set-locale-node.spec.d.ts +2 -0
  43. package/dist/core/set-locale-node.spec.d.ts.map +1 -0
  44. package/{lib-esm → dist}/core/split-locale.d.ts +1 -0
  45. package/dist/core/split-locale.d.ts.map +1 -0
  46. package/dist/core/split-locale.spec.d.ts +2 -0
  47. package/dist/core/split-locale.spec.d.ts.map +1 -0
  48. package/{lib → dist}/core/textdomain.d.ts +18 -17
  49. package/dist/core/textdomain.d.ts.map +1 -0
  50. package/dist/core/textdomain.spec.d.ts +2 -0
  51. package/dist/core/textdomain.spec.d.ts.map +1 -0
  52. package/{lib-esm → dist}/core/user-locales.d.ts +1 -0
  53. package/dist/core/user-locales.d.ts.map +1 -0
  54. package/dist/esgettext.cjs.js +868 -0
  55. package/dist/esgettext.cjs.js.map +1 -0
  56. package/dist/esgettext.esm.js +863 -0
  57. package/dist/esgettext.esm.js.map +1 -0
  58. package/dist/esgettext.min.js +2 -0
  59. package/dist/esgettext.min.js.map +1 -0
  60. package/dist/index-browser.d.ts +3 -0
  61. package/dist/index-browser.d.ts.map +1 -0
  62. package/dist/index.d.ts +3 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/parser/index.d.ts +4 -0
  65. package/dist/parser/index.d.ts.map +1 -0
  66. package/{lib-esm → dist}/parser/parse-json-catalog.d.ts +1 -0
  67. package/dist/parser/parse-json-catalog.d.ts.map +1 -0
  68. package/{lib-esm → dist}/parser/parse-mo-catalog.d.ts +1 -0
  69. package/dist/parser/parse-mo-catalog.d.ts.map +1 -0
  70. package/dist/parser/parse-mo-catalog.spec.d.ts +2 -0
  71. package/dist/parser/parse-mo-catalog.spec.d.ts.map +1 -0
  72. package/dist/parser/parse-mo-json-catalog.d.ts +4 -0
  73. package/dist/parser/parse-mo-json-catalog.d.ts.map +1 -0
  74. package/dist/parser/parse-mo-json-catalog.spec.d.ts +2 -0
  75. package/dist/parser/parse-mo-json-catalog.spec.d.ts.map +1 -0
  76. package/{lib/transport/fs.d.ts → dist/transport/fs-browser.d.ts} +2 -1
  77. package/dist/transport/fs-browser.d.ts.map +1 -0
  78. package/{lib-esm → dist}/transport/fs.d.ts +1 -0
  79. package/dist/transport/fs.d.ts.map +1 -0
  80. package/{lib-esm → dist}/transport/http.d.ts +1 -0
  81. package/dist/transport/http.d.ts.map +1 -0
  82. package/dist/transport/http.spec.d.ts +2 -0
  83. package/dist/transport/http.spec.d.ts.map +1 -0
  84. package/{lib → dist}/transport/index.d.ts +2 -1
  85. package/dist/transport/index.d.ts.map +1 -0
  86. package/{lib → dist}/transport/transport.interface.d.ts +1 -0
  87. package/dist/transport/transport.interface.d.ts.map +1 -0
  88. package/package.json +30 -14
  89. package/_bundles/runtime.js +0 -1356
  90. package/_bundles/runtime.js.map +0 -1
  91. package/_bundles/runtime.min.js +0 -2
  92. package/_bundles/runtime.min.js.map +0 -1
  93. package/api-docs/assets/highlight.css +0 -127
  94. package/api-docs/assets/main.js +0 -59
  95. package/api-docs/assets/navigation.js +0 -1
  96. package/api-docs/assets/search.js +0 -1
  97. package/api-docs/assets/style.css +0 -1414
  98. package/api-docs/classes/Textdomain.html +0 -364
  99. package/api-docs/index.html +0 -222
  100. package/api-docs/interfaces/Catalog.html +0 -20
  101. package/api-docs/interfaces/CatalogEntries.html +0 -11
  102. package/api-docs/interfaces/LocaleContainer.html +0 -19
  103. package/api-docs/interfaces/Placeholders.html +0 -9
  104. package/api-docs/modules.html +0 -6
  105. package/lib/core/browser-environment.d.ts +0 -1
  106. package/lib/core/browser-environment.js +0 -12
  107. package/lib/core/browser-environment.js.map +0 -1
  108. package/lib/core/catalog-cache.d.ts +0 -10
  109. package/lib/core/catalog-cache.js +0 -39
  110. package/lib/core/catalog-cache.js.map +0 -1
  111. package/lib/core/catalog-cache.spec.d.ts +0 -1
  112. package/lib/core/catalog-cache.spec.js +0 -24
  113. package/lib/core/catalog-cache.spec.js.map +0 -1
  114. package/lib/core/catalog-format.spec.d.ts +0 -1
  115. package/lib/core/catalog-format.spec.js +0 -35
  116. package/lib/core/catalog-format.spec.js.map +0 -1
  117. package/lib/core/catalog.js +0 -3
  118. package/lib/core/catalog.js.map +0 -1
  119. package/lib/core/data-viewlet.js +0 -57
  120. package/lib/core/data-viewlet.js.map +0 -1
  121. package/lib/core/data-viewlet.spec.d.ts +0 -1
  122. package/lib/core/data-viewlet.spec.js +0 -62
  123. package/lib/core/data-viewlet.spec.js.map +0 -1
  124. package/lib/core/explode-locale.d.ts +0 -3
  125. package/lib/core/explode-locale.js +0 -37
  126. package/lib/core/explode-locale.js.map +0 -1
  127. package/lib/core/explode-locale.spec.d.ts +0 -1
  128. package/lib/core/explode-locale.spec.js +0 -41
  129. package/lib/core/explode-locale.spec.js.map +0 -1
  130. package/lib/core/germanic-plural.d.ts +0 -1
  131. package/lib/core/germanic-plural.js +0 -8
  132. package/lib/core/germanic-plural.js.map +0 -1
  133. package/lib/core/gettext-impl.js +0 -38
  134. package/lib/core/gettext-impl.js.map +0 -1
  135. package/lib/core/gettext.spec.d.ts +0 -1
  136. package/lib/core/gettext.spec.js +0 -391
  137. package/lib/core/gettext.spec.js.map +0 -1
  138. package/lib/core/index.d.ts +0 -4
  139. package/lib/core/index.js +0 -21
  140. package/lib/core/index.js.map +0 -1
  141. package/lib/core/locale-container.js +0 -3
  142. package/lib/core/locale-container.js.map +0 -1
  143. package/lib/core/path-separator.d.ts +0 -1
  144. package/lib/core/path-separator.js +0 -12
  145. package/lib/core/path-separator.js.map +0 -1
  146. package/lib/core/resolve-impl.js +0 -253
  147. package/lib/core/resolve-impl.js.map +0 -1
  148. package/lib/core/resolve.spec.d.ts +0 -1
  149. package/lib/core/resolve.spec.js +0 -345
  150. package/lib/core/resolve.spec.js.map +0 -1
  151. package/lib/core/select-locale.d.ts +0 -1
  152. package/lib/core/select-locale.js +0 -43
  153. package/lib/core/select-locale.js.map +0 -1
  154. package/lib/core/select-locale.spec.d.ts +0 -1
  155. package/lib/core/select-locale.spec.js +0 -27
  156. package/lib/core/select-locale.spec.js.map +0 -1
  157. package/lib/core/set-locale-browser.spec.d.ts +0 -1
  158. package/lib/core/set-locale-browser.spec.js +0 -17
  159. package/lib/core/set-locale-browser.spec.js.map +0 -1
  160. package/lib/core/set-locale-node.spec.d.ts +0 -1
  161. package/lib/core/set-locale-node.spec.js +0 -26
  162. package/lib/core/set-locale-node.spec.js.map +0 -1
  163. package/lib/core/split-locale.d.ts +0 -7
  164. package/lib/core/split-locale.js +0 -39
  165. package/lib/core/split-locale.js.map +0 -1
  166. package/lib/core/split-locale.spec.d.ts +0 -1
  167. package/lib/core/split-locale.spec.js +0 -59
  168. package/lib/core/split-locale.spec.js.map +0 -1
  169. package/lib/core/textdomain.js +0 -277
  170. package/lib/core/textdomain.js.map +0 -1
  171. package/lib/core/textdomain.spec.d.ts +0 -1
  172. package/lib/core/textdomain.spec.js +0 -33
  173. package/lib/core/textdomain.spec.js.map +0 -1
  174. package/lib/core/user-locales.d.ts +0 -1
  175. package/lib/core/user-locales.js +0 -12
  176. package/lib/core/user-locales.js.map +0 -1
  177. package/lib/index-browser.d.ts +0 -2
  178. package/lib/index-browser.js +0 -44
  179. package/lib/index-browser.js.map +0 -1
  180. package/lib/index.d.ts +0 -2
  181. package/lib/index.js +0 -37
  182. package/lib/index.js.map +0 -1
  183. package/lib/parser/index.d.ts +0 -2
  184. package/lib/parser/index.js +0 -19
  185. package/lib/parser/index.js.map +0 -1
  186. package/lib/parser/parse-json-catalog.d.ts +0 -3
  187. package/lib/parser/parse-json-catalog.js +0 -37
  188. package/lib/parser/parse-json-catalog.js.map +0 -1
  189. package/lib/parser/parse-json-catalog.spec.d.ts +0 -1
  190. package/lib/parser/parse-json-catalog.spec.js +0 -41
  191. package/lib/parser/parse-json-catalog.spec.js.map +0 -1
  192. package/lib/parser/parse-mo-catalog.d.ts +0 -2
  193. package/lib/parser/parse-mo-catalog.js +0 -86
  194. package/lib/parser/parse-mo-catalog.js.map +0 -1
  195. package/lib/parser/parse-mo-catalog.spec.d.ts +0 -1
  196. package/lib/parser/parse-mo-catalog.spec.js +0 -115
  197. package/lib/parser/parse-mo-catalog.spec.js.map +0 -1
  198. package/lib/transport/fs.js +0 -18
  199. package/lib/transport/fs.js.map +0 -1
  200. package/lib/transport/http.d.ts +0 -4
  201. package/lib/transport/http.js +0 -27
  202. package/lib/transport/http.js.map +0 -1
  203. package/lib/transport/http.spec.d.ts +0 -1
  204. package/lib/transport/http.spec.js +0 -119
  205. package/lib/transport/http.spec.js.map +0 -1
  206. package/lib/transport/index.js +0 -20
  207. package/lib/transport/index.js.map +0 -1
  208. package/lib/transport/transport.interface.js +0 -3
  209. package/lib/transport/transport.interface.js.map +0 -1
  210. package/lib-esm/core/browser-environment.js +0 -8
  211. package/lib-esm/core/browser-environment.js.map +0 -1
  212. package/lib-esm/core/catalog-cache.js +0 -36
  213. package/lib-esm/core/catalog-cache.js.map +0 -1
  214. package/lib-esm/core/catalog-cache.spec.d.ts +0 -1
  215. package/lib-esm/core/catalog-cache.spec.js +0 -22
  216. package/lib-esm/core/catalog-cache.spec.js.map +0 -1
  217. package/lib-esm/core/catalog-format.spec.d.ts +0 -1
  218. package/lib-esm/core/catalog-format.spec.js +0 -33
  219. package/lib-esm/core/catalog-format.spec.js.map +0 -1
  220. package/lib-esm/core/catalog.d.ts +0 -9
  221. package/lib-esm/core/catalog.js +0 -2
  222. package/lib-esm/core/catalog.js.map +0 -1
  223. package/lib-esm/core/data-viewlet.d.ts +0 -11
  224. package/lib-esm/core/data-viewlet.js +0 -54
  225. package/lib-esm/core/data-viewlet.js.map +0 -1
  226. package/lib-esm/core/data-viewlet.spec.d.ts +0 -1
  227. package/lib-esm/core/data-viewlet.spec.js +0 -60
  228. package/lib-esm/core/data-viewlet.spec.js.map +0 -1
  229. package/lib-esm/core/explode-locale.js +0 -33
  230. package/lib-esm/core/explode-locale.js.map +0 -1
  231. package/lib-esm/core/explode-locale.spec.d.ts +0 -1
  232. package/lib-esm/core/explode-locale.spec.js +0 -39
  233. package/lib-esm/core/explode-locale.spec.js.map +0 -1
  234. package/lib-esm/core/germanic-plural.js +0 -4
  235. package/lib-esm/core/germanic-plural.js.map +0 -1
  236. package/lib-esm/core/gettext-impl.d.ts +0 -10
  237. package/lib-esm/core/gettext-impl.js +0 -34
  238. package/lib-esm/core/gettext-impl.js.map +0 -1
  239. package/lib-esm/core/gettext.spec.d.ts +0 -1
  240. package/lib-esm/core/gettext.spec.js +0 -389
  241. package/lib-esm/core/gettext.spec.js.map +0 -1
  242. package/lib-esm/core/index.js +0 -5
  243. package/lib-esm/core/index.js.map +0 -1
  244. package/lib-esm/core/locale-container.d.ts +0 -8
  245. package/lib-esm/core/locale-container.js +0 -2
  246. package/lib-esm/core/locale-container.js.map +0 -1
  247. package/lib-esm/core/path-separator.d.ts +0 -1
  248. package/lib-esm/core/path-separator.js +0 -8
  249. package/lib-esm/core/path-separator.js.map +0 -1
  250. package/lib-esm/core/resolve-impl.d.ts +0 -3
  251. package/lib-esm/core/resolve-impl.js +0 -249
  252. package/lib-esm/core/resolve-impl.js.map +0 -1
  253. package/lib-esm/core/resolve.spec.d.ts +0 -1
  254. package/lib-esm/core/resolve.spec.js +0 -340
  255. package/lib-esm/core/resolve.spec.js.map +0 -1
  256. package/lib-esm/core/select-locale.js +0 -39
  257. package/lib-esm/core/select-locale.js.map +0 -1
  258. package/lib-esm/core/select-locale.spec.d.ts +0 -1
  259. package/lib-esm/core/select-locale.spec.js +0 -25
  260. package/lib-esm/core/select-locale.spec.js.map +0 -1
  261. package/lib-esm/core/set-locale-browser.spec.d.ts +0 -1
  262. package/lib-esm/core/set-locale-browser.spec.js +0 -15
  263. package/lib-esm/core/set-locale-browser.spec.js.map +0 -1
  264. package/lib-esm/core/set-locale-node.spec.d.ts +0 -1
  265. package/lib-esm/core/set-locale-node.spec.js +0 -24
  266. package/lib-esm/core/set-locale-node.spec.js.map +0 -1
  267. package/lib-esm/core/split-locale.js +0 -35
  268. package/lib-esm/core/split-locale.js.map +0 -1
  269. package/lib-esm/core/split-locale.spec.d.ts +0 -1
  270. package/lib-esm/core/split-locale.spec.js +0 -57
  271. package/lib-esm/core/split-locale.spec.js.map +0 -1
  272. package/lib-esm/core/textdomain.d.ts +0 -55
  273. package/lib-esm/core/textdomain.js +0 -274
  274. package/lib-esm/core/textdomain.js.map +0 -1
  275. package/lib-esm/core/textdomain.spec.d.ts +0 -1
  276. package/lib-esm/core/textdomain.spec.js +0 -31
  277. package/lib-esm/core/textdomain.spec.js.map +0 -1
  278. package/lib-esm/core/user-locales.js +0 -8
  279. package/lib-esm/core/user-locales.js.map +0 -1
  280. package/lib-esm/index-browser.d.ts +0 -2
  281. package/lib-esm/index-browser.js +0 -26
  282. package/lib-esm/index-browser.js.map +0 -1
  283. package/lib-esm/index.d.ts +0 -2
  284. package/lib-esm/index.js +0 -19
  285. package/lib-esm/index.js.map +0 -1
  286. package/lib-esm/parser/index.d.ts +0 -2
  287. package/lib-esm/parser/index.js +0 -3
  288. package/lib-esm/parser/index.js.map +0 -1
  289. package/lib-esm/parser/parse-json-catalog.js +0 -32
  290. package/lib-esm/parser/parse-json-catalog.js.map +0 -1
  291. package/lib-esm/parser/parse-json-catalog.spec.d.ts +0 -1
  292. package/lib-esm/parser/parse-json-catalog.spec.js +0 -39
  293. package/lib-esm/parser/parse-json-catalog.spec.js.map +0 -1
  294. package/lib-esm/parser/parse-mo-catalog.js +0 -82
  295. package/lib-esm/parser/parse-mo-catalog.js.map +0 -1
  296. package/lib-esm/parser/parse-mo-catalog.spec.d.ts +0 -1
  297. package/lib-esm/parser/parse-mo-catalog.spec.js +0 -113
  298. package/lib-esm/parser/parse-mo-catalog.spec.js.map +0 -1
  299. package/lib-esm/transport/fs.js +0 -15
  300. package/lib-esm/transport/fs.js.map +0 -1
  301. package/lib-esm/transport/http.js +0 -24
  302. package/lib-esm/transport/http.js.map +0 -1
  303. package/lib-esm/transport/http.spec.d.ts +0 -1
  304. package/lib-esm/transport/http.spec.js +0 -114
  305. package/lib-esm/transport/http.spec.js.map +0 -1
  306. package/lib-esm/transport/index.d.ts +0 -3
  307. package/lib-esm/transport/index.js +0 -4
  308. package/lib-esm/transport/index.js.map +0 -1
  309. package/lib-esm/transport/transport.interface.d.ts +0 -3
  310. package/lib-esm/transport/transport.interface.js +0 -2
  311. package/lib-esm/transport/transport.interface.js.map +0 -1
  312. package/webpack.common.js +0 -38
  313. package/webpack.dev.js +0 -9
  314. package/webpack.prod.js +0 -8
@@ -1,222 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@esgettext/runtime</title><meta name="description" content="Documentation for @esgettext/runtime"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@esgettext/runtime</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>@esgettext/runtime</h2></div><div class="tsd-panel tsd-typography"><a id="md:esgettextruntime-" class="tsd-anchor"></a><h1><a href="#md:esgettextruntime-">@esgettext/runtime <!-- omit in toc --></a></h1><p>GNU gettext-alike translation runtime library.</p>
2
- <a id="md:table-of-contents-" class="tsd-anchor"></a><h2><a href="#md:table-of-contents-">Table of Contents <!-- omit in toc --></a></h2><ul>
3
- <li><a href="#md:api-documentation">API Documentation</a></li>
4
- <li><a href="#md:internationalizing-hello-world">Internationalizing Hello World</a><ul>
5
- <li><a href="#md:choosing-a-textdomain">Choosing a Textdomain</a></li>
6
- <li><a href="#md:install-the-library">Install the Library</a></li>
7
- <li><a href="#md:import-the-library">Import the Library</a></li>
8
- <li><a href="#md:prepare-your-sources">Prepare Your Sources</a></li>
9
- <li><a href="#md:translation-methods">Translation Methods</a><ul>
10
- <li><a href="#md:simple-translations-with-_">Simple Translations With <code>_()</code></a></li>
11
- <li><a href="#md:variable-interpolation-with-_x">Variable Interpolation With <code>_x()</code></a></li>
12
- <li><a href="#md:plural-forms-with-_nx">Plural Forms With <code>_nx()</code></a></li>
13
- <li><a href="#md:message-context-with-_p">Message Context With <code>_p()</code></a></li>
14
- <li><a href="#md:specific-locale-with-_l">Specific Locale with <code>_l</code></a></li>
15
- <li><a href="#md:todo-gender-specific-translations">TODO: Gender-Specific Translations</a></li>
16
- </ul>
17
- </li>
18
- <li><a href="#md:selecting-the-preferred-language-with-selectlocale">Selecting the Preferred Language with <code>selectLocale()</code></a></li>
19
- </ul>
20
- </li>
21
- <li><a href="#md:internationalizing-a-library">Internationalizing a Library</a></li>
22
- <li><a href="#md:frequently-asked-questions">Frequently-Asked Questions</a><ul>
23
- <li><a href="#md:why-do-template-strings-not-work">Why do Template Strings not Work?</a></li>
24
- <li><a href="#md:what-does-the-error-template-literals-with-embedded-expressions-are-not-allowed-as-arguments-to-gettext-functions-because-they-are-not-constant-mean">What Does the Error &quot;template literals with embedded expressions are not allowed as arguments to gettext functions because they are not constant&quot; Mean?</a></li>
25
- </ul>
26
- </li>
27
- <li><a href="#md:copyright">Copyright</a></li>
28
- </ul>
29
- <a id="md:api-documentation" class="tsd-anchor"></a><h2><a href="#md:api-documentation">API Documentation</a></h2><p>If you are already familiar with the concepts of the esgettext runtime library,
30
- you can go straight to the <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/globals.html">API documentation</a>.</p>
31
- <a id="md:internationalizing-hello-world" class="tsd-anchor"></a><h2><a href="#md:internationalizing-hello-world">Internationalizing Hello World</a></h2><p>You have written this little piece of JavaScript:</p>
32
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Hello, world!&#39;</span><span class="hl-1">);</span>
33
- </code><button>Copy</button></pre>
34
- <p>What are the steps needed to internationalize it with this library?</p>
35
- <a id="md:choosing-a-textdomain" class="tsd-anchor"></a><h3><a href="#md:choosing-a-textdomain">Choosing a Textdomain</a></h3><p>First, you have to choose a unique identifier for your project so that the
36
- translation catalogs will have a unique name. You are almost free
37
- in what you are choosing but you have to keep in mind that the textdomain
38
- will be part of a URI or filename and therefore a couple of rules apply:</p>
39
- <ul>
40
- <li>A textdomain <em>must not</em> contain a slash (&quot;/&quot;).</li>
41
- <li>A textdomain <em>should not</em> contain a colon (&quot;:&quot;), because of Windows.</li>
42
- <li>A textdomain <em>should not</em> contain a backslash (&quot;:&quot;), because of Windows.</li>
43
- <li>A textdomain <em>should not</em> contain binary characters, because of common sense.</li>
44
- </ul>
45
- <p>In general, you should only use lowercase characters that are valid inside
46
- hostnames, namely &quot;a-z&quot;, &quot;0-9&quot;, the hyphen &quot;-&quot;, and the dot &quot;.&quot;.</p>
47
- <p>If possible, follow this advice:</p>
48
- <ol>
49
- <li>If your organization has a domain, use the reverse(!) domain name followed by the name of your product for example &quot;com.example.hello&quot;</li>
50
- <li>Otherwise, if your project sources are publicly hosted use the reverse domain name of your hoster followed by an identifier of your project. For example, the textdomain for <code>https://github.com/gflohr/esgettext</code> would then be &quot;com.github.gflohr.esgettext&quot;.</li>
51
- <li>Otherwise, use common sense.</li>
52
- </ol>
53
- <p>We will use the the third rule and pick the textdomain &quot;hello&quot;.</p>
54
- <a id="md:install-the-library" class="tsd-anchor"></a><h3><a href="#md:install-the-library">Install the Library</a></h3><p>You normally install the library with <code>npm</code> or <code>yarn</code>.</p>
55
- <p>With <code>npm</code>:</p>
56
- <pre><code class="language-shell"><span class="hl-2">$</span><span class="hl-1"> </span><span class="hl-3">npm</span><span class="hl-1"> </span><span class="hl-3">install</span><span class="hl-1"> </span><span class="hl-4">--save</span><span class="hl-1"> </span><span class="hl-3">esgettext</span>
57
- </code><button>Copy</button></pre>
58
- <p>Or with <code>yarn</code>:</p>
59
- <pre><code class="language-shell"><span class="hl-2">$</span><span class="hl-1"> </span><span class="hl-3">yarn</span><span class="hl-1"> </span><span class="hl-3">add</span><span class="hl-1"> </span><span class="hl-3">esgettext</span>
60
- </code><button>Copy</button></pre>
61
- <a id="md:import-the-library" class="tsd-anchor"></a><h3><a href="#md:import-the-library">Import the Library</a></h3><p>How to import the library, depends on your environment.</p>
62
- <p>If you have the <code>import</code> keyword:</p>
63
- <pre><code class="language-javascript"><span class="hl-5">import</span><span class="hl-1"> </span><span class="hl-0">Textdomain</span><span class="hl-1"> </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@esgettext/runtime&#39;</span><span class="hl-1">;</span>
64
- </code><button>Copy</button></pre>
65
- <p>If you can use <code>require</code>:</p>
66
- <pre><code class="language-javascript"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">esgettext</span><span class="hl-1"> = </span><span class="hl-2">require</span><span class="hl-1">(</span><span class="hl-3">&#39;@esgettext/runtime&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">Textdomain</span><span class="hl-1"> = </span><span class="hl-0">esgettext</span><span class="hl-1">.</span><span class="hl-0">Textdomain</span><span class="hl-1">;</span>
67
- </code><button>Copy</button></pre>
68
- <p><em>FIXME! Is this correct?</em></p>
69
- <p>If you are writing javascript loaded by a browser:</p>
70
- <pre><code class="language-html"><span class="hl-7">&lt;</span><span class="hl-8">script</span><span class="hl-9"> </span><span class="hl-10">src</span><span class="hl-9">=</span><span class="hl-11">&quot;https://cdn.jsdelivr.net/npm/@esgettext/runtime/_bundles/runtime.min.js&quot;</span><span class="hl-7">&gt;&lt;/</span><span class="hl-8">script</span><span class="hl-7">&gt;</span><br/><span class="hl-7">&lt;</span><span class="hl-8">script</span><span class="hl-7">&gt;</span><br/><span class="hl-9"> </span><span class="hl-4">var</span><span class="hl-9"> </span><span class="hl-0">Textdomain</span><span class="hl-9"> </span><span class="hl-1">=</span><span class="hl-9"> </span><span class="hl-0">esgettext</span><span class="hl-9">.</span><span class="hl-0">Textdomain</span><span class="hl-9">;</span><br/><span class="hl-9"> </span><span class="hl-12">// ... your code follows.</span><br/><span class="hl-7">&lt;/</span><span class="hl-8">script</span><span class="hl-7">&gt;</span>
71
- </code><button>Copy</button></pre>
72
- <p>If you want a specific version, you can do like this:</p>
73
- <pre><code class="language-html"><span class="hl-7">&lt;</span><span class="hl-8">script</span><span class="hl-9"> </span><span class="hl-10">src</span><span class="hl-9">=</span><span class="hl-11">&quot;https://cdn.jsdelivr.net/npm/@esgettext/runtime@0.1.0/_bundles/runtime.min.js&quot;</span><span class="hl-7">&gt;&lt;/</span><span class="hl-8">script</span><span class="hl-7">&gt;</span><br/><span class="hl-7">&lt;</span><span class="hl-8">script</span><span class="hl-7">&gt;</span><br/><span class="hl-9"> </span><span class="hl-4">var</span><span class="hl-9"> </span><span class="hl-0">Textdomain</span><span class="hl-9"> </span><span class="hl-1">=</span><span class="hl-9"> </span><span class="hl-0">esgettext</span><span class="hl-9">.</span><span class="hl-0">Textdomain</span><span class="hl-9">;</span><br/><span class="hl-9"> </span><span class="hl-12">// ... your code follows.</span><br/><span class="hl-7">&lt;/</span><span class="hl-8">script</span><span class="hl-7">&gt;</span>
74
- </code><button>Copy</button></pre>
75
- <a id="md:prepare-your-sources" class="tsd-anchor"></a><h3><a href="#md:prepare-your-sources">Prepare Your Sources</a></h3><p>Change your <code>hello.js</code> to read like this:</p>
76
- <pre><code class="language-javascript"><span class="hl-5">import</span><span class="hl-1"> { </span><span class="hl-0">Textdomain</span><span class="hl-1"> } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@esgettext/runtime&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-0">locale</span><span class="hl-1"> = </span><span class="hl-3">&#39;fr&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">gtx</span><span class="hl-1"> = </span><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-2">getInstance</span><span class="hl-1">(</span><span class="hl-3">&#39;hello&#39;</span><span class="hl-1">);</span><br/><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">bindtextdomain</span><span class="hl-1">(</span><span class="hl-3">&#39;/assets/locale&#39;</span><span class="hl-1">);</span><br/><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">resolve</span><span class="hl-1">().</span><span class="hl-2">then</span><span class="hl-1">(</span><span class="hl-4">function</span><span class="hl-1"> () {</span><br/><span class="hl-1"> </span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_</span><span class="hl-1">(</span><span class="hl-3">&#39;Hello, world!&#39;</span><span class="hl-1">));</span><br/><span class="hl-1">});</span>
77
- </code><button>Copy</button></pre>
78
- <p><em>Hint:</em> If you cannot use <code>import</code>, use one of the other techniques shown
79
- above to make the <code>Textdomain</code> class available in your source!</p>
80
- <p>What is happening here?</p>
81
- <p>First, you set the locale (resp. language) to the desired value. Here we
82
- choose &quot;fr&quot; for French. See the section <a href="#md:selecting-the-preferred-language-with-selectlocale">Selecting the Preferred Language with <code>selectLocale()</code></a>
83
- for a more flexible way to select the user&#39;s locale.</p>
84
- <p>You then get an instance of a <code>Textdomain</code> object. You cannot use the regular
85
- constructor because it is private! The argument to the
86
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#getinstance"><code>getInstance()</code></a> class
87
- method is the textdomain you have chosen.</p>
88
- <p>You then have to tell the library where to find translations for the &quot;hello&quot;
89
- textdomain. You do that with the instance method
90
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#bindtextdomain"><code>bindtextdomain()</code></a> that
91
- receives a (base) directory as its argument. The actual translation catalog
92
- would then be searched at <code>/assets/locale/fr/LC_MESSAGES/hello.json</code> (or
93
- <code>hello.mo</code> depending on your environment).</p>
94
- <p>Don&#39;t worry that there are no translations at the moment. Failure is handled
95
- gracefully by the library falling back to using the original, untranslated
96
- strings. See the <a href="../tools/README.md">docs for tools</a> for
97
- instructions on how to create translation catalogs.</p>
98
- <p>You then have to <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#resolve"><code>resolve()</code></a> the translations. The method returns a promise,
99
- and your actual code should be moved into the promise&#39;s <code>then()</code> method.</p>
100
- <p>Now that everything is loaded you can translate all messages by replacing
101
- <code>&#39;some string&#39;</code> with <code>gtx._(&#39;some string&#39;)</code>. That&#39;s it!</p>
102
- <a id="md:translation-methods" class="tsd-anchor"></a><h3><a href="#md:translation-methods">Translation Methods</a></h3><p>The method <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_"><code>_()</code></a> is the simplest but by far not the only translation method
103
- that esgettext has to offer.</p>
104
- <a id="md:simple-translations-with-_" class="tsd-anchor"></a><h4><a href="#md:simple-translations-with-_">Simple Translations With <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_"><code>_()</code></a></a></h4><p>The method <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_"><code>_()</code></a> has already been introduced:</p>
105
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_</span><span class="hl-1">(</span><span class="hl-3">&#39;Hello, world!&#39;</span><span class="hl-1">));</span>
106
- </code><button>Copy</button></pre>
107
- <p>It returns the translation of its argument or just the argument if no
108
- translation can be found.</p>
109
- <a id="md:variable-interpolation-with-_x" class="tsd-anchor"></a><h4><a href="#md:variable-interpolation-with-_x">Variable Interpolation With <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_x"><code>_x()</code></a></a></h4><p>Imagine you want to express RGB colors in human-readable form. The esgettext
110
- way to do that goes like this:</p>
111
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_x</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">&#39;red: {r}, green: {g}, blue: {b}&#39;</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-0">r:</span><span class="hl-1"> </span><span class="hl-0">red</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">g:</span><span class="hl-1"> </span><span class="hl-0">green</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">b:</span><span class="hl-1"> </span><span class="hl-0">blue</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">);</span>
112
- </code><button>Copy</button></pre>
113
- <p>You use placeholders surrounded by curly braces (<code>{}</code>), and provide an object
114
- as an additional argument where the keys are the placeholder names and the
115
- values, the respective values to be interpolated.</p>
116
- <p>Placeholder names must be valid C identifiers: They must begin with a
117
- lower- or uppercase letter (&quot;a&quot; to &quot;z&quot;, &quot;A&quot; to &quot;Z&quot;) or an underscore (&quot;_&quot;)
118
- followed by an arbitrary number of characters from the same set or decimal
119
- digits (&quot;0&quot; to &quot;9&quot;). In regular espression syntax: <code>/^[_a-zA-Z][_a-zA-Z0-9]*$/</code>.</p>
120
- <a id="md:plural-forms-with-_nx" class="tsd-anchor"></a><h4><a href="#md:plural-forms-with-_nx">Plural Forms With <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_nx"><code>_nx()</code></a></a></h4><p>Translating a string with plural expressions is unfortunately somewhat
121
- convoluted:</p>
122
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_nx</span><span class="hl-1">(</span><span class="hl-3">&#39;One file copied&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;{count} files copied.&#39;</span><span class="hl-1">, </span><span class="hl-0">count</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-0">count:</span><span class="hl-1"> </span><span class="hl-0">count</span><span class="hl-1">,</span><br/><span class="hl-1"> }),</span><br/><span class="hl-1">);</span>
123
- </code><button>Copy</button></pre>
124
- <p>Count, count, count, count.</p>
125
- <p>If the variable <code>count</code> has the value 42, the above would yield in English:
126
- &quot;42 files copied.&quot;. If <code>count</code> had the value 1, it would yield: &quot;One file
127
- copied.&quot;.</p>
128
- <p>The method <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_"><code>_nx()</code></a> has this signature:</p>
129
- <pre><code class="language-javascript"><span class="hl-2">_nx</span><span class="hl-1">(</span><br/><span class="hl-1"> (</span><span class="hl-0">msgid</span><span class="hl-1">: </span><span class="hl-13">string</span><span class="hl-1">),</span><br/><span class="hl-1"> (</span><span class="hl-0">msgidPlural</span><span class="hl-1">: </span><span class="hl-13">string</span><span class="hl-1">),</span><br/><span class="hl-1"> (</span><span class="hl-0">numberOfItems</span><span class="hl-1">: </span><span class="hl-13">number</span><span class="hl-1">),</span><br/><span class="hl-1"> (</span><span class="hl-0">placeholders</span><span class="hl-1">: </span><span class="hl-13">Object</span><span class="hl-1">),</span><br/><span class="hl-1">);</span>
130
- </code><button>Copy</button></pre>
131
- <p>Many times, the placeholder name will equal the variable name, so that you see
132
- that name once inside the plural string as the placeholder, then as the
133
- argument <code>numberOfItems</code>, then as the key in the placeholder hash, and again
134
- as the value for that key.</p>
135
- <p>Note that there is also a method <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_n"><code>_n()</code></a> that does the same as <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_nx"><code>_nx()</code></a> but
136
- without inpterpolation but it only exists for completeness and is useless for
137
- practical purposes.</p>
138
- <a id="md:message-context-with-_p" class="tsd-anchor"></a><h4><a href="#md:message-context-with-_p">Message Context With <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_p"><code>_p()</code></a></a></h4><p>It is sometimes possible that one English sentence can have multiple, different
139
- meanings in another language. For example &quot;Sun&quot; can mean our planet&#39;s star or
140
- the abbreviation of &quot;Sunday&quot;. In order to allow translators to provide
141
- accurate translations for each meaning, you can distinguish them by message
142
- context:</p>
143
- <pre><code class="language-javascript"><span class="hl-0">weekday</span><span class="hl-1"> = </span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_p</span><span class="hl-1">(</span><span class="hl-3">&#39;wday&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;Sun&#39;</span><span class="hl-1">);</span><br/><span class="hl-0">star</span><span class="hl-1"> = </span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_p</span><span class="hl-1">(</span><span class="hl-3">&#39;star&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;Sun&#39;</span><span class="hl-1">);</span>
144
- </code><button>Copy</button></pre>
145
- <p>The first argument is the context (a free-form string), the second is the
146
- string to translate.</p>
147
- <p>It is actually sufficient to use a context just for one of the two cases.</p>
148
- <p>There are also methods <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_px"><code>_px()</code></a>, when you need placeholders or <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_npx"><code>_npx()</code></a>, when
149
- you need placeholders and plural forms in addition to a message context.</p>
150
- <a id="md:specific-locale-with-_l" class="tsd-anchor"></a><h4><a href="#md:specific-locale-with-_l">Specific Locale with <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_l"><code>_l</code></a></a></h4><p>Most of the time, the locale resp. language is set just once by setting the
151
- static property <code>locale</code>:</p>
152
- <pre><code class="language-javascript"><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-0">locale</span><span class="hl-1"> = </span><span class="hl-3">&#39;fr&#39;</span><span class="hl-1">;</span><br/><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_</span><span class="hl-1">(</span><span class="hl-3">&#39;Hello, world!&#39;</span><span class="hl-1">));</span>
153
- </code><button>Copy</button></pre>
154
- <p>Alternatively, you can pass the locale with every call to a translation
155
- method:</p>
156
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_l</span><span class="hl-1">(</span><span class="hl-3">&#39;fr&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;Hello, world!&#39;</span><span class="hl-1">));</span>
157
- </code><button>Copy</button></pre>
158
- <p>There is not just <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_l"><code>_l()</code></a>, but actually all of the above mentioned methods have
159
- versions with a leading <code>_l</code>, like
160
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_lx"><code>_lx()</code></a>
161
- or as complicated as
162
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_lnpx"><code>_lnpx()</code></a>.</p>
163
- <p>One use-case for the
164
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_l"><code>_l()</code></a>
165
- family of methods
166
- would be a web server. A web server handles requests asynchronously, and a
167
- global locale doesn&#39;t make sense. Instead, the language is typically bound
168
- to the request or response and should be taken from there.</p>
169
- <a id="md:todo-gender-specific-translations" class="tsd-anchor"></a><h4><a href="#md:todo-gender-specific-translations">TODO: Gender-Specific Translations</a></h4><p>This is on the todo list for a future version. You will be able to do something
170
- like:</p>
171
- <pre><code class="language-javascript"><span class="hl-0">msg</span><span class="hl-1"> = </span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_g</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-0">user</span><span class="hl-1">.</span><span class="hl-0">gender</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">&#39;They have liked your photo.&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">&#39;She has liked your photo.&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">);</span>
172
- </code><button>Copy</button></pre>
173
- <a id="md:selecting-the-preferred-language-with-selectlocale" class="tsd-anchor"></a><h3><a href="#md:selecting-the-preferred-language-with-selectlocale">Selecting the Preferred Language with <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#selectLocale"><code>selectLocale()</code></a></a></h3><p>Negotiating the preferred locale can be performed with the help of esgettext.
174
- If your application supports the locales &quot;en-US&quot;, &quot;en-GB&quot;, &quot;fr-FR&quot;, and
175
- &quot;de-DE&quot;, you can select a suitable locale for the current user by calling
176
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#selectLocale"><code>Textdomain.selectlocale</code></a></p>
177
- <pre><code class="language-javascript"><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-0">locale</span><span class="hl-1"> = </span><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-2">selectLocale</span><span class="hl-1">([</span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;en-GB&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;fr-FR&#39;</span><span class="hl-1">]);</span>
178
- </code><button>Copy</button></pre>
179
- <p><a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#selectLocale"><code>Textdomain.selectLocale()</code></a>
180
- will return the most suitable locale for the current user. For browser code,
181
- the browser will be queried for the user language preferences, for server
182
- code the environment variables <code>LANGUAGE</code>, <code>LC_ALL</code>, <code>LANG</code>, and <code>LC_MESSAGES</code>
183
- will be queried in that order.</p>
184
- <p>You can also explicitly specify, which locales the user has requested by
185
- passing a second argument:</p>
186
- <pre><code class="language-javascript"><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-0">locale</span><span class="hl-1"> = </span><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-2">selectLocale</span><span class="hl-1">(</span><br/><span class="hl-1"> [</span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;en-GB&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;fr-FR&#39;</span><span class="hl-1">], </span><span class="hl-12">// Supported by the application.</span><br/><span class="hl-1"> [</span><span class="hl-3">&#39;de-DE&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;fr-FR&#39;</span><span class="hl-1">],</span><br/><span class="hl-1">); </span><span class="hl-12">// Requested by the user.</span>
187
- </code><button>Copy</button></pre>
188
- <a id="md:internationalizing-a-library" class="tsd-anchor"></a><h2><a href="#md:internationalizing-a-library">Internationalizing a Library</a></h2><p>Internationalizing a library is very simple. Take this sample library:</p>
189
- <pre><code class="language-javascript"><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-2">greet</span><span class="hl-1">(</span><span class="hl-0">name</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-3">`Hello, </span><span class="hl-4">${</span><span class="hl-0">name</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
190
- </code><button>Copy</button></pre>
191
- <p>Internationalized, it would look like this:</p>
192
- <pre><code class="language-javascript"><span class="hl-5">import</span><span class="hl-1"> { </span><span class="hl-0">Textdomain</span><span class="hl-1"> } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@esgettext/runtime&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">gtx</span><span class="hl-1"> = </span><span class="hl-0">Textdomain</span><span class="hl-1">.</span><span class="hl-2">getInstance</span><span class="hl-1">(</span><span class="hl-3">&#39;hello-library&#39;</span><span class="hl-1">);</span><br/><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">bindtextdomain</span><span class="hl-1">(</span><span class="hl-3">&#39;/assets/locale&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-2">greet</span><span class="hl-1">(</span><span class="hl-0">name</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">return</span><span class="hl-1"> </span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_x</span><span class="hl-1">(</span><span class="hl-3">&#39;Hello, {name}&#39;</span><span class="hl-1">, { </span><span class="hl-0">name:</span><span class="hl-1"> </span><span class="hl-0">name</span><span class="hl-1"> });</span><br/><span class="hl-1">}</span>
193
- </code><button>Copy</button></pre>
194
- <p>The main differences to an internationalized application are:</p>
195
- <ul>
196
- <li>You do not set <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#locale">Textdomain.locale</a> because the main application (the application that loads your library) does it.</li>
197
- <li>You do not call <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#resolve">resolve()</a> because whenever the main application calls <code>resolve()</code>, the catalogs for your library will also be loaded.</li>
198
- </ul>
199
- <a id="md:frequently-asked-questions" class="tsd-anchor"></a><h2><a href="#md:frequently-asked-questions">Frequently-Asked Questions</a></h2><a id="md:why-do-template-strings-not-work" class="tsd-anchor"></a><h3><a href="#md:why-do-template-strings-not-work">Why do Template Strings not Work?</a></h3><p>A common error is to use template strings with interpolations as arguments to
200
- the translation functions, for example:</p>
201
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_</span><span class="hl-1">(</span><span class="hl-3">`red: </span><span class="hl-4">${</span><span class="hl-0">red</span><span class="hl-4">}</span><span class="hl-3">, green: </span><span class="hl-4">${</span><span class="hl-0">green</span><span class="hl-4">}</span><span class="hl-3">, blue: </span><span class="hl-4">${</span><span class="hl-0">blue</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-1">);</span>
202
- </code><button>Copy</button></pre>
203
- <p>That seems to work for English but the string never gets translated.</p>
204
- <p>The reason is that the argument to
205
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_"><code>_()</code></a>
206
- is the lookup key into the translation database but that key has to be constant.
207
- The method receives an argument like &quot;red: 127, green: 63, blue: 31&quot; because
208
- the JavaScript engine has already interpolated the variables into the string.
209
- But that string does not exist in the database.</p>
210
- <p>You have to use
211
- <a href="https://gflohr.github.io/esgettext/packages/runtime/api-docs/classes/textdomain.html#_x"><code>_x()</code></a>
212
- instead:</p>
213
- <pre><code class="language-javascript"><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-0">gtx</span><span class="hl-1">.</span><span class="hl-2">_x</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">&#39;red: {r}, green: {g}, blue: {b}&#39;</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-0">r:</span><span class="hl-1"> </span><span class="hl-0">red</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">g:</span><span class="hl-1"> </span><span class="hl-0">green</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">b:</span><span class="hl-1"> </span><span class="hl-0">blue</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">);</span>
214
- </code><button>Copy</button></pre>
215
- <a id="md:what-does-the-error-quottemplate-literals-with-embedded-expressions-are-not-allowed-as-arguments-to-gettext-functions-because-they-are-not-constantquot-mean" class="tsd-anchor"></a><h3><a href="#md:what-does-the-error-quottemplate-literals-with-embedded-expressions-are-not-allowed-as-arguments-to-gettext-functions-because-they-are-not-constantquot-mean">What Does the Error &quot;template literals with embedded expressions are not allowed as arguments to gettext functions because they are not constant&quot; Mean?</a></h3><p>See <a href="#md:why-do-template-strings-not-work">Why do Template Strings not Work?</a>
216
- above! The extractor <code>esgettext-xgettext</code> complains that you are using a
217
- template string with interpolated expressions.</p>
218
- <a id="md:copyright" class="tsd-anchor"></a><h2><a href="#md:copyright">Copyright</a></h2><p>Copyright (C) 2020 Guido Flohr <a href="mailto:guido.flohr@cantanea.com">guido.flohr@cantanea.com</a>, all
219
- rights reserved.</p>
220
- <p>This software is available under the terms and conditions of the
221
- <a href="http://www.wtfpl.net/about">WTFPL</a>.</p>
222
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><ul><li><a href="#md:esgettextruntime-"><span>@esgettext/runtime </span></a></li><li><ul><li><a href="#md:table-of-contents-"><span>Table of <wbr/>Contents </span></a></li><li><a href="#md:api-documentation"><span>API <wbr/>Documentation</span></a></li><li><a href="#md:internationalizing-hello-world"><span>Internationalizing <wbr/>Hello <wbr/>World</span></a></li><li><ul><li><a href="#md:choosing-a-textdomain"><span>Choosing a <wbr/>Textdomain</span></a></li><li><a href="#md:install-the-library"><span>Install the <wbr/>Library</span></a></li><li><a href="#md:import-the-library"><span>Import the <wbr/>Library</span></a></li><li><a href="#md:prepare-your-sources"><span>Prepare <wbr/>Your <wbr/>Sources</span></a></li><li><a href="#md:translation-methods"><span>Translation <wbr/>Methods</span></a></li><li><ul><li><a href="#md:simple-translations-with-_"><span>Simple <wbr/>Translations <wbr/>With _<wbr/>()</span></a></li><li><a href="#md:variable-interpolation-with-_x"><span>Variable <wbr/>Interpolation <wbr/>With _<wbr/>x()</span></a></li><li><a href="#md:plural-forms-with-_nx"><span>Plural <wbr/>Forms <wbr/>With _<wbr/>nx()</span></a></li><li><a href="#md:message-context-with-_p"><span>Message <wbr/>Context <wbr/>With _<wbr/>p()</span></a></li><li><a href="#md:specific-locale-with-_l"><span>Specific <wbr/>Locale with _<wbr/>l</span></a></li><li><a href="#md:todo-gender-specific-translations"><span>TODO: <wbr/>Gender-<wbr/>Specific <wbr/>Translations</span></a></li></ul></li><li><a href="#md:selecting-the-preferred-language-with-selectlocale"><span>Selecting the <wbr/>Preferred <wbr/>Language with select<wbr/>Locale()</span></a></li></ul></li><li><a href="#md:internationalizing-a-library"><span>Internationalizing a <wbr/>Library</span></a></li><li><a href="#md:frequently-asked-questions"><span>Frequently-<wbr/>Asked <wbr/>Questions</span></a></li><li><ul><li><a href="#md:why-do-template-strings-not-work"><span>Why do <wbr/>Template <wbr/>Strings not <wbr/>Work?</span></a></li><li><a href="#md:what-does-the-error-quottemplate-literals-with-embedded-expressions-are-not-allowed-as-arguments-to-gettext-functions-because-they-are-not-constantquot-mean"><span>What <wbr/>Does the <wbr/>Error &quot;template literals with embedded expressions are not allowed as arguments to gettext functions because they are not constant&quot; <wbr/>Mean?</span></a></li></ul></li><li><a href="#md:copyright"><span>Copyright</span></a></li></ul></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>@esgettext/runtime</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."><li><a href="classes/Textdomain.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg>Textdomain</a></li><li><a href="interfaces/Catalog.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>Catalog</a></li><li><a href="interfaces/CatalogEntries.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>CatalogEntries</a></li><li><a href="interfaces/LocaleContainer.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>LocaleContainer</a></li><li><a href="interfaces/Placeholders.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>Placeholders</a></li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg></body></html>
@@ -1,20 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Catalog | @esgettext/runtime</title><meta name="description" content="Documentation for @esgettext/runtime"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@esgettext/runtime</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@esgettext/runtime</a></li><li><a href="Catalog.html">Catalog</a></li></ul><h1>Interface Catalog</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A [[<code>Catalog</code>]] is a container for a set of translations loaded from a <code>.json</code>
2
- or a binary <code>.mo</code> file.</p>
3
- <p>This interface is used internally. You will only need it if you want to
4
- write your own message retrieval method or want to inspect a loaded
5
- [[<code>Catalog</code>]].</p>
6
- </div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface </span><span class="tsd-kind-interface">Catalog</span> <span class="tsd-signature-symbol">{ </span><br/><span>    </span><a class="tsd-kind-property" href="Catalog.html#entries">entries</a><span class="tsd-signature-symbol">: </span><a href="CatalogEntries.html" class="tsd-signature-type tsd-kind-interface">CatalogEntries</a><span class="tsd-signature-symbol">; </span><br/><span>    </span><a class="tsd-kind-property" href="Catalog.html#major">major</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><a class="tsd-kind-property" href="Catalog.html#minor">minor</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><a class="tsd-kind-call-signature" href="Catalog.html#pluralFunction.pluralFunction-1">pluralFunction</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">numItems</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/gflohr/esgettext/blob/f5b2215/packages/runtime/src/core/catalog.ts#L28">core/catalog.ts:28</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="Catalog.html#entries" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>entries</span></a>
7
- <a href="Catalog.html#major" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>major</span></a>
8
- <a href="Catalog.html#minor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>minor</span></a>
9
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Catalog.html#pluralFunction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>plural<wbr/>Function</span></a>
10
- </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member"><a id="entries" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>entries</span><a href="#entries" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">entries</span><span class="tsd-signature-symbol">:</span> <a href="CatalogEntries.html" class="tsd-signature-type tsd-kind-interface">CatalogEntries</a></div><div class="tsd-comment tsd-typography"><p>The actual translations.</p>
11
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/gflohr/esgettext/blob/f5b2215/packages/runtime/src/core/catalog.ts#L50">core/catalog.ts:50</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="major" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>major</span><a href="#major" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">major</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The major revision number of the catalog, currently always 0.</p>
12
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/gflohr/esgettext/blob/f5b2215/packages/runtime/src/core/catalog.ts#L30">core/catalog.ts:30</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="minor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>minor</span><a href="#minor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">minor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The minor revision number of the catalog, currently always 0 or 1.</p>
13
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/gflohr/esgettext/blob/f5b2215/packages/runtime/src/core/catalog.ts#L33">core/catalog.ts:33</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="pluralFunction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>plural<wbr/>Function</span><a href="#pluralFunction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="pluralFunction.pluralFunction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">plural<wbr/>Function</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">numItems</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#pluralFunction.pluralFunction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Compute the index of a plural form from a number of items. If a language
14
- has one singular and two plural forms, the singular form would have
15
- index 0 and the plural forms have index 1 and 2.</p>
16
- <p>The plural function would then compute one of 0, 1, or 2 from an
17
- arbitrary non-negative integer.</p>
18
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">numItems</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the number of items.</p>
19
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the index of the plural form.</p>
20
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/gflohr/esgettext/blob/f5b2215/packages/runtime/src/core/catalog.ts#L47">core/catalog.ts:47</a></li></ul></aside></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#entries" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>entries</span></a></li><li><a href="#major" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>major</span></a></li><li><a href="#minor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>minor</span></a></li><li><a href="#pluralFunction" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>plural<wbr/>Function</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>@esgettext/runtime</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li><a href="../classes/Textdomain.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg>Textdomain</a></li><li><a href="Catalog.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>Catalog</a></li><li><a href="CatalogEntries.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>CatalogEntries</a></li><li><a href="LocaleContainer.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>LocaleContainer</a></li><li><a href="Placeholders.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>Placeholders</a></li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg></body></html>
@@ -1,11 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CatalogEntries | @esgettext/runtime</title><meta name="description" content="Documentation for @esgettext/runtime"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@esgettext/runtime</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@esgettext/runtime</a></li><li><a href="CatalogEntries.html">CatalogEntries</a></li></ul><h1>Interface CatalogEntries</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The set of translations found in a [[<code>Catalog</code>]].</p>
2
- <p>This interface is used internally. You will only need it if you want to
3
- write your own message retrieval method or want to inspect a loaded
4
- [[<code>Catalog</code>]].</p>
5
- <p>The translations are looked up by their singular form in the original
6
- language. The value is an array of strings. The first item is the singular
7
- translation, the optional following items are the plural forms.</p>
8
- <p>If a translation has a message context, the key is the context joined
9
- with the translation by a <code>&#39;\u0004&#39;</code> character. For example, the key for
10
- the msgid &quot;Open&quot; with the msgctxt &quot;Menu|File&quot; would be <code>Menu|File\u0004Open</code>.</p>
11
- </div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface </span><span class="tsd-kind-interface">CatalogEntries</span> <span class="tsd-signature-symbol">{}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/gflohr/esgettext/blob/f5b2215/packages/runtime/src/core/catalog.ts#L16">core/catalog.ts:16</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>@esgettext/runtime</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li><a href="../classes/Textdomain.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg>Textdomain</a></li><li><a href="Catalog.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>Catalog</a></li><li><a href="CatalogEntries.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>CatalogEntries</a></li><li><a href="LocaleContainer.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>LocaleContainer</a></li><li><a href="Placeholders.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg>Placeholders</a></li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg></body></html>