@datamoc/mw_games 0.4.1 → 0.4.2

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 (205) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/binary.d.ts +52 -0
  3. package/dist/assets/binary.d.ts.map +1 -0
  4. package/dist/assets/binary.js +57 -0
  5. package/dist/assets/binary.js.map +1 -0
  6. package/dist/assets/index.d.ts +10 -5
  7. package/dist/assets/index.d.ts.map +1 -1
  8. package/dist/assets/index.js +9 -5
  9. package/dist/assets/index.js.map +1 -1
  10. package/dist/board/Army.d.ts +75 -0
  11. package/dist/board/Army.d.ts.map +1 -1
  12. package/dist/board/Army.js +75 -0
  13. package/dist/board/Army.js.map +1 -1
  14. package/dist/board/Classics.d.ts +297 -1
  15. package/dist/board/Classics.d.ts.map +1 -1
  16. package/dist/board/Classics.js +297 -1
  17. package/dist/board/Classics.js.map +1 -1
  18. package/dist/board/Engine.d.ts +23 -0
  19. package/dist/board/Engine.d.ts.map +1 -1
  20. package/dist/board/Engine.js +23 -0
  21. package/dist/board/Engine.js.map +1 -1
  22. package/dist/board/FogOfWar.d.ts +20 -0
  23. package/dist/board/FogOfWar.d.ts.map +1 -1
  24. package/dist/board/FogOfWar.js +20 -0
  25. package/dist/board/FogOfWar.js.map +1 -1
  26. package/dist/board/Tactics.d.ts +158 -1
  27. package/dist/board/Tactics.d.ts.map +1 -1
  28. package/dist/board/Tactics.js +125 -1
  29. package/dist/board/Tactics.js.map +1 -1
  30. package/dist/board/chess.d.ts +87 -3
  31. package/dist/board/chess.d.ts.map +1 -1
  32. package/dist/board/chess.js +96 -4
  33. package/dist/board/chess.js.map +1 -1
  34. package/dist/i18n/Content.d.ts +151 -0
  35. package/dist/i18n/Content.d.ts.map +1 -0
  36. package/dist/i18n/Content.js +219 -0
  37. package/dist/i18n/Content.js.map +1 -0
  38. package/dist/i18n/index.d.ts +35 -3
  39. package/dist/i18n/index.d.ts.map +1 -1
  40. package/dist/i18n/index.js +88 -6
  41. package/dist/i18n/index.js.map +1 -1
  42. package/dist/mw_games.global.js +89 -89
  43. package/dist/roguelike/Placement.d.ts +62 -0
  44. package/dist/roguelike/Placement.d.ts.map +1 -0
  45. package/dist/roguelike/Placement.js +79 -0
  46. package/dist/roguelike/Placement.js.map +1 -0
  47. package/dist/roguelike/index.d.ts +2 -0
  48. package/dist/roguelike/index.d.ts.map +1 -1
  49. package/dist/roguelike/index.js +1 -0
  50. package/dist/roguelike/index.js.map +1 -1
  51. package/dist/three-d/Models.d.ts +38 -1
  52. package/dist/three-d/Models.d.ts.map +1 -1
  53. package/dist/three-d/Models.js +66 -3
  54. package/dist/three-d/Models.js.map +1 -1
  55. package/dist/two-d/render/ActorAnimator.d.ts +32 -0
  56. package/dist/two-d/render/ActorAnimator.d.ts.map +1 -1
  57. package/dist/two-d/render/ActorAnimator.js +21 -0
  58. package/dist/two-d/render/ActorAnimator.js.map +1 -1
  59. package/dist/two-d/render/AnimatedSprite.d.ts +24 -4
  60. package/dist/two-d/render/AnimatedSprite.d.ts.map +1 -1
  61. package/dist/two-d/render/AnimatedSprite.js +24 -4
  62. package/dist/two-d/render/AnimatedSprite.js.map +1 -1
  63. package/dist/two-d/render/Autotile.d.ts +33 -1
  64. package/dist/two-d/render/Autotile.d.ts.map +1 -1
  65. package/dist/two-d/render/Autotile.js +33 -1
  66. package/dist/two-d/render/Autotile.js.map +1 -1
  67. package/dist/two-d/render/Camera.d.ts +53 -1
  68. package/dist/two-d/render/Camera.d.ts.map +1 -1
  69. package/dist/two-d/render/Camera.js +36 -1
  70. package/dist/two-d/render/Camera.js.map +1 -1
  71. package/dist/two-d/render/Capabilities.d.ts +33 -0
  72. package/dist/two-d/render/Capabilities.d.ts.map +1 -1
  73. package/dist/two-d/render/Capabilities.js +33 -0
  74. package/dist/two-d/render/Capabilities.js.map +1 -1
  75. package/dist/two-d/render/ColorBlindness.d.ts +23 -0
  76. package/dist/two-d/render/ColorBlindness.d.ts.map +1 -1
  77. package/dist/two-d/render/ColorBlindness.js +23 -4
  78. package/dist/two-d/render/ColorBlindness.js.map +1 -1
  79. package/dist/two-d/render/ColorTransformBatcher.d.ts +67 -1
  80. package/dist/two-d/render/ColorTransformBatcher.d.ts.map +1 -1
  81. package/dist/two-d/render/ColorTransformBatcher.js +57 -1
  82. package/dist/two-d/render/ColorTransformBatcher.js.map +1 -1
  83. package/dist/two-d/render/LayeredSprite.d.ts +19 -0
  84. package/dist/two-d/render/LayeredSprite.d.ts.map +1 -1
  85. package/dist/two-d/render/LayeredSprite.js +19 -0
  86. package/dist/two-d/render/LayeredSprite.js.map +1 -1
  87. package/dist/two-d/render/Minimap.d.ts +25 -1
  88. package/dist/two-d/render/Minimap.d.ts.map +1 -1
  89. package/dist/two-d/render/Minimap.js +25 -1
  90. package/dist/two-d/render/Minimap.js.map +1 -1
  91. package/dist/two-d/render/Particles.d.ts +26 -2
  92. package/dist/two-d/render/Particles.d.ts.map +1 -1
  93. package/dist/two-d/render/Particles.js +23 -0
  94. package/dist/two-d/render/Particles.js.map +1 -1
  95. package/dist/two-d/render/Projectile.d.ts +14 -0
  96. package/dist/two-d/render/Projectile.d.ts.map +1 -1
  97. package/dist/two-d/render/Projectile.js +14 -0
  98. package/dist/two-d/render/Projectile.js.map +1 -1
  99. package/dist/two-d/render/ScreenEffects.d.ts +15 -0
  100. package/dist/two-d/render/ScreenEffects.d.ts.map +1 -1
  101. package/dist/two-d/render/ScreenEffects.js +15 -0
  102. package/dist/two-d/render/ScreenEffects.js.map +1 -1
  103. package/dist/two-d/render/Shape2D.d.ts +58 -1
  104. package/dist/two-d/render/Shape2D.d.ts.map +1 -1
  105. package/dist/two-d/render/Shape2D.js +58 -1
  106. package/dist/two-d/render/Shape2D.js.map +1 -1
  107. package/dist/two-d/render/StatusVisuals.d.ts +22 -0
  108. package/dist/two-d/render/StatusVisuals.d.ts.map +1 -1
  109. package/dist/two-d/render/StatusVisuals.js +22 -0
  110. package/dist/two-d/render/StatusVisuals.js.map +1 -1
  111. package/dist/two-d/render/TileMap.d.ts +65 -3
  112. package/dist/two-d/render/TileMap.d.ts.map +1 -1
  113. package/dist/two-d/render/TileMap.js +65 -3
  114. package/dist/two-d/render/TileMap.js.map +1 -1
  115. package/dist/two-d/render/TiledMap.d.ts +9 -3
  116. package/dist/two-d/render/TiledMap.d.ts.map +1 -1
  117. package/dist/two-d/render/TiledMap.js +9 -3
  118. package/dist/two-d/render/TiledMap.js.map +1 -1
  119. package/dist/two-d/render/TintedSprite.d.ts +9 -2
  120. package/dist/two-d/render/TintedSprite.d.ts.map +1 -1
  121. package/dist/two-d/render/TintedSprite.js +9 -2
  122. package/dist/two-d/render/TintedSprite.js.map +1 -1
  123. package/dist/two-d/render/Types2D.d.ts +14 -2
  124. package/dist/two-d/render/Types2D.d.ts.map +1 -1
  125. package/dist/two-d/render/Types2D.js +14 -2
  126. package/dist/two-d/render/Types2D.js.map +1 -1
  127. package/dist/two-d/render/Viewport.d.ts +22 -0
  128. package/dist/two-d/render/Viewport.d.ts.map +1 -1
  129. package/dist/two-d/render/Viewport.js +22 -0
  130. package/dist/two-d/render/Viewport.js.map +1 -1
  131. package/dist/two-d/ui/Bar.d.ts +16 -3
  132. package/dist/two-d/ui/Bar.d.ts.map +1 -1
  133. package/dist/two-d/ui/Bar.js +16 -1
  134. package/dist/two-d/ui/Bar.js.map +1 -1
  135. package/dist/two-d/ui/BitmapLabel.d.ts +23 -1
  136. package/dist/two-d/ui/BitmapLabel.d.ts.map +1 -1
  137. package/dist/two-d/ui/BitmapLabel.js +23 -1
  138. package/dist/two-d/ui/BitmapLabel.js.map +1 -1
  139. package/dist/two-d/ui/Button.d.ts +15 -0
  140. package/dist/two-d/ui/Button.d.ts.map +1 -1
  141. package/dist/two-d/ui/Button.js +15 -0
  142. package/dist/two-d/ui/Button.js.map +1 -1
  143. package/dist/two-d/ui/FloatingText.d.ts +15 -0
  144. package/dist/two-d/ui/FloatingText.d.ts.map +1 -1
  145. package/dist/two-d/ui/FloatingText.js +15 -0
  146. package/dist/two-d/ui/FloatingText.js.map +1 -1
  147. package/dist/two-d/ui/HelpScreen.d.ts +16 -0
  148. package/dist/two-d/ui/HelpScreen.d.ts.map +1 -1
  149. package/dist/two-d/ui/HelpScreen.js +23 -3
  150. package/dist/two-d/ui/HelpScreen.js.map +1 -1
  151. package/dist/two-d/ui/IconGrid.d.ts +25 -0
  152. package/dist/two-d/ui/IconGrid.d.ts.map +1 -1
  153. package/dist/two-d/ui/IconGrid.js +37 -5
  154. package/dist/two-d/ui/IconGrid.js.map +1 -1
  155. package/dist/two-d/ui/Label.d.ts +10 -0
  156. package/dist/two-d/ui/Label.d.ts.map +1 -1
  157. package/dist/two-d/ui/Label.js +10 -0
  158. package/dist/two-d/ui/Label.js.map +1 -1
  159. package/dist/two-d/ui/ListView.d.ts +19 -0
  160. package/dist/two-d/ui/ListView.d.ts.map +1 -1
  161. package/dist/two-d/ui/ListView.js +19 -0
  162. package/dist/two-d/ui/ListView.js.map +1 -1
  163. package/dist/two-d/ui/LoadingScreen.d.ts +24 -1
  164. package/dist/two-d/ui/LoadingScreen.d.ts.map +1 -1
  165. package/dist/two-d/ui/LoadingScreen.js +24 -1
  166. package/dist/two-d/ui/LoadingScreen.js.map +1 -1
  167. package/dist/two-d/ui/MessageBox.d.ts +21 -2
  168. package/dist/two-d/ui/MessageBox.d.ts.map +1 -1
  169. package/dist/two-d/ui/MessageBox.js +19 -0
  170. package/dist/two-d/ui/MessageBox.js.map +1 -1
  171. package/dist/two-d/ui/NinePatch.d.ts +12 -0
  172. package/dist/two-d/ui/NinePatch.d.ts.map +1 -1
  173. package/dist/two-d/ui/NinePatch.js +12 -0
  174. package/dist/two-d/ui/NinePatch.js.map +1 -1
  175. package/dist/two-d/ui/RebindScreen.d.ts +15 -0
  176. package/dist/two-d/ui/RebindScreen.d.ts.map +1 -1
  177. package/dist/two-d/ui/RebindScreen.js +15 -0
  178. package/dist/two-d/ui/RebindScreen.js.map +1 -1
  179. package/dist/two-d/ui/StatsScreen.d.ts +15 -0
  180. package/dist/two-d/ui/StatsScreen.d.ts.map +1 -1
  181. package/dist/two-d/ui/StatsScreen.js +15 -0
  182. package/dist/two-d/ui/StatsScreen.js.map +1 -1
  183. package/dist/two-d/ui/Toast.d.ts +12 -0
  184. package/dist/two-d/ui/Toast.d.ts.map +1 -1
  185. package/dist/two-d/ui/Toast.js +12 -0
  186. package/dist/two-d/ui/Toast.js.map +1 -1
  187. package/dist/two-d/ui/Tooltip.d.ts +14 -0
  188. package/dist/two-d/ui/Tooltip.d.ts.map +1 -1
  189. package/dist/two-d/ui/Tooltip.js +14 -0
  190. package/dist/two-d/ui/Tooltip.js.map +1 -1
  191. package/dist/two-d/ui/VerticalLabel.d.ts +18 -0
  192. package/dist/two-d/ui/VerticalLabel.d.ts.map +1 -1
  193. package/dist/two-d/ui/VerticalLabel.js +18 -0
  194. package/dist/two-d/ui/VerticalLabel.js.map +1 -1
  195. package/dist/two-d/ui/Window.d.ts +12 -0
  196. package/dist/two-d/ui/Window.d.ts.map +1 -1
  197. package/dist/two-d/ui/Window.js +12 -0
  198. package/dist/two-d/ui/Window.js.map +1 -1
  199. package/dist/two-d/ui/theme.d.ts +45 -1
  200. package/dist/two-d/ui/theme.d.ts.map +1 -1
  201. package/dist/two-d/ui/theme.js +45 -1
  202. package/dist/two-d/ui/theme.js.map +1 -1
  203. package/dist/version.d.ts +1 -1
  204. package/dist/version.js +1 -1
  205. package/package.json +8 -2
@@ -85,11 +85,41 @@ export interface MessageParams {
85
85
  */
86
86
  export declare function t(key: string, params?: MessageParams): string;
87
87
  /**
88
- * Replaces apostrophes between letters for locales whose ordinary elisions use a curly
89
- * apostrophe. English and other locales are left untouched, as a straight apostrophe can
90
- * be intentional punctuation there.
88
+ * Locale-specific punctuation/spacing conventions, applied on top of interpolation - the
89
+ * things a translator would type by hand if this project asked every catalog to carry
90
+ * literal U+202F/U+00A0 characters, which no one would ever remember to do consistently.
91
+ *
92
+ * French (Imprimerie nationale's rules, `Lexique des règles typographiques`): a narrow
93
+ * no-break space before `; : ! ?` and around `« »`, and an ordinary no-break space between a
94
+ * numbering word and the number following it ("Chapitre 3"). Also replaces apostrophes
95
+ * between letters with a curly one, for French, Italian, and Dutch elisions - English and
96
+ * other locales are left untouched, as a straight apostrophe can be intentional punctuation
97
+ * there.
98
+ *
99
+ * German (Duden K 116/117): a no-break space between a number and its unit ("5 kg"), and
100
+ * after a small set of abbreviations before whatever follows ("Nr. 3", "Dr. Müller").
101
+ *
102
+ * Deliberately not attempted here: a *game's own* units ("pièces d'or", "points de vie") -
103
+ * `mwg` cannot know a game's vocabulary any more than it knows its item names, so gluing a
104
+ * value to a game-specific unit is `nonBreakingUnit`'s job, not this function's.
91
105
  */
92
106
  export declare function typographic(text: string, language?: string): string;
107
+ /** joins a value and its unit with whatever space French/German typography requires to keep
108
+ * them from breaking across a line - the unit's own text ("pièces d'or", "points de vie",
109
+ * "kg") is always the game's own vocabulary; this only picks the space that glues it to the
110
+ * value in front of it, the same division `SemanticMessage`/`EntityTextResolver` already draw
111
+ * between mechanism and content.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * import { nonBreakingUnit } from '@datamoc/mw_games/i18n';
116
+ *
117
+ * console.log(nonBreakingUnit(12, 'pièces d\'or', 'fr')); // '12 pièces d\'or'
118
+ * console.log(nonBreakingUnit(5, 'kg', 'de')); // '5 kg'
119
+ * console.log(nonBreakingUnit(3, 'gold', 'en')); // '3 gold'
120
+ * ```
121
+ */
122
+ export declare function nonBreakingUnit(value: string | number, unit: string, language?: string): string;
93
123
  /** true when `key` resolves to something other than itself, in either language */
94
124
  export declare function has(key: string): boolean;
95
125
  /** clears both languages, mainly so tests do not leak state into one another */
@@ -101,4 +131,6 @@ export type { SemanticMessage, EntityTextResolver, GrammaticalEntity, MessageCha
101
131
  export { formatNumber, formatDate, formatList } from './Format.ts';
102
132
  export { diffCatalogKeys, validateCatalog } from './Validate.ts';
103
133
  export type { CatalogKeyDiff, CatalogIssue } from './Validate.ts';
134
+ export { messageText, levenshteinDistance, findSimilarMessages, catalogUsage, catalogCompleteness, pluralFormCoverage, mergeCatalogKeys, } from './Content.ts';
135
+ export type { SimilarMessagePair, CatalogUsageStats, PluralCoverage } from './Content.ts';
104
136
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,6FAA6F;AAC7F,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtC,oFAAoF;AACpF,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC7B,MAAM,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CACvC;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC;AAEhE,MAAM,WAAW,OAAO;IACvB,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACvC,4FAA4F;IAC5F,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAOD,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAE9C;AAED,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAGvD;AAED,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAED,6CAA6C;AAC7C,wBAAgB,SAAS,IAAI,SAAS,CAErC;AAED,MAAM,WAAW,aAAa;IAC7B,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAA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F,wBAAgB,KAAK,IAAI,IAAI,CAI5B;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAErI,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElE,OAAO,EACN,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -93,15 +93,96 @@ export function t(key, params) {
93
93
  const PDI = '⁩'; // pop directional isolate
94
94
  return direction() === 'rtl' ? `${RLI}${resolved}${PDI}` : resolved;
95
95
  }
96
+ /** espace fine insécable - narrow no-break space, U+202F */
97
+ const THIN_NBSP = ' ';
98
+ /** espace insécable - ordinary no-break space, U+00A0 */
99
+ const NBSP = ' ';
100
+ /** words a French document commonly numbers - generic document/narrative structure, not any
101
+ * one game's own vocabulary, the same way `t()`'s plural categories are language structure
102
+ * rather than content */
103
+ const FR_NUMBERING_WORDS = [
104
+ 'Chapitre', 'Tome', 'Livre', 'Partie', 'Section', 'Article', 'Acte', 'Scène',
105
+ 'Niveau', 'Manche', 'Round', 'Étape', 'Volume', 'Figure', 'Page', 'Numéro',
106
+ ];
107
+ /** German abbreviations that keep a no-break space before whatever follows them (Duden K 116) */
108
+ const DE_ABBREVIATIONS = ['Nr', 'Dr', 'Bd', 'Kap', 'Art', 'Abb', 'Str', 'Tel'];
109
+ /** units a no-break space keeps glued to the number in front of them (Duden K 117) */
110
+ const DE_UNITS = ['kg', 'g', 'mg', 't', 'km', 'm', 'cm', 'mm', 'l', 'ml', 'h', 'min', 's', '%', '°C', '€'];
96
111
  /**
97
- * Replaces apostrophes between letters for locales whose ordinary elisions use a curly
98
- * apostrophe. English and other locales are left untouched, as a straight apostrophe can
99
- * be intentional punctuation there.
112
+ * Locale-specific punctuation/spacing conventions, applied on top of interpolation - the
113
+ * things a translator would type by hand if this project asked every catalog to carry
114
+ * literal U+202F/U+00A0 characters, which no one would ever remember to do consistently.
115
+ *
116
+ * French (Imprimerie nationale's rules, `Lexique des règles typographiques`): a narrow
117
+ * no-break space before `; : ! ?` and around `« »`, and an ordinary no-break space between a
118
+ * numbering word and the number following it ("Chapitre 3"). Also replaces apostrophes
119
+ * between letters with a curly one, for French, Italian, and Dutch elisions - English and
120
+ * other locales are left untouched, as a straight apostrophe can be intentional punctuation
121
+ * there.
122
+ *
123
+ * German (Duden K 116/117): a no-break space between a number and its unit ("5 kg"), and
124
+ * after a small set of abbreviations before whatever follows ("Nr. 3", "Dr. Müller").
125
+ *
126
+ * Deliberately not attempted here: a *game's own* units ("pièces d'or", "points de vie") -
127
+ * `mwg` cannot know a game's vocabulary any more than it knows its item names, so gluing a
128
+ * value to a game-specific unit is `nonBreakingUnit`'s job, not this function's.
100
129
  */
101
130
  export function typographic(text, language = locale()) {
102
- if (!/^(fr|it|nl)(?:-|$)/i.test(language))
103
- return text;
104
- return text.replace(/([\p{L}])'(?=[\p{L}])/gu, '$1’');
131
+ const lang = language.split('-')[0].toLowerCase();
132
+ let result = text;
133
+ if (lang === 'fr' || lang === 'it' || lang === 'nl') {
134
+ result = result.replace(/([\p{L}])'(?=[\p{L}])/gu, '$1’');
135
+ }
136
+ if (lang === 'fr')
137
+ result = frenchSpacing(result);
138
+ if (lang === 'de')
139
+ result = germanSpacing(result);
140
+ return result;
141
+ }
142
+ /** joins a value and its unit with whatever space French/German typography requires to keep
143
+ * them from breaking across a line - the unit's own text ("pièces d'or", "points de vie",
144
+ * "kg") is always the game's own vocabulary; this only picks the space that glues it to the
145
+ * value in front of it, the same division `SemanticMessage`/`EntityTextResolver` already draw
146
+ * between mechanism and content.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * import { nonBreakingUnit } from '@datamoc/mw_games/i18n';
151
+ *
152
+ * console.log(nonBreakingUnit(12, 'pièces d\'or', 'fr')); // '12 pièces d\'or'
153
+ * console.log(nonBreakingUnit(5, 'kg', 'de')); // '5 kg'
154
+ * console.log(nonBreakingUnit(3, 'gold', 'en')); // '3 gold'
155
+ * ```
156
+ */
157
+ export function nonBreakingUnit(value, unit, language = locale()) {
158
+ const lang = language.split('-')[0].toLowerCase();
159
+ const space = lang === 'fr' ? THIN_NBSP : lang === 'de' ? NBSP : ' ';
160
+ return `${value}${space}${unit}`;
161
+ }
162
+ /** idempotent on purpose: `\s` already matches U+202F/U+00A0, so re-running this on
163
+ * already-spaced text leaves it unchanged rather than stacking a second space */
164
+ function frenchSpacing(text) {
165
+ let result = text
166
+ .replace(/\s?([;!?])/g, `${THIN_NBSP}$1`)
167
+ .replace(/«\s?/g, `«${THIN_NBSP}`)
168
+ .replace(/\s?»/g, `${THIN_NBSP}»`);
169
+ // `:` is excluded from clock times ("12:30") and URLs ("https://") by requiring a letter,
170
+ // not a digit, immediately before it - a heuristic good enough for translated dialogue/UI
171
+ // text, not a general-purpose text parser
172
+ result = result.replace(/(\p{L})\s?:/gu, `$1${THIN_NBSP}:`);
173
+ const numbering = new RegExp(`\\b(${FR_NUMBERING_WORDS.join('|')})\\s+(?=\\d)`, 'g');
174
+ return result.replace(numbering, `$1${NBSP}`);
175
+ }
176
+ function germanSpacing(text) {
177
+ // `\b` after a symbol like `%`/`€` never matches (neither side of that boundary is a "word"
178
+ // character), so the next-character check is spelled out directly instead: not a letter or
179
+ // digit, which also rules out matching "kg" as a false-positive prefix of a longer word
180
+ const units = new RegExp(`(\\d)\\s+(?=(?:${DE_UNITS.map(escapeRegExp).join('|')})(?![\\p{L}\\p{N}]))`, 'gu');
181
+ const abbreviations = new RegExp(`\\b(${DE_ABBREVIATIONS.join('|')})\\.\\s+`, 'g');
182
+ return text.replace(units, `$1${NBSP}`).replace(abbreviations, `$1.${NBSP}`);
183
+ }
184
+ function escapeRegExp(literal) {
185
+ return literal.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
105
186
  }
106
187
  /** true when `key` resolves to something other than itself, in either language */
107
188
  export function has(key) {
@@ -133,4 +214,5 @@ export { parseFTL } from './Fluent.js';
133
214
  export { createCatalogFormatter } from './SemanticMessage.js';
134
215
  export { formatNumber, formatDate, formatList } from './Format.js';
135
216
  export { diffCatalogKeys, validateCatalog } from './Validate.js';
217
+ export { messageText, levenshteinDistance, findSimilarMessages, catalogUsage, catalogCompleteness, pluralFormCoverage, mergeCatalogKeys, } from './Content.js';
136
218
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAuBH,IAAI,IAAI,GAAmB,IAAI,CAAC;AAChC,IAAI,MAAM,GAAmB,IAAI,CAAC;AAClC,IAAI,WAAW,GAA4B,IAAI,CAAC;AAChD,IAAI,aAAa,GAA4B,IAAI,CAAC;AAElD,uEAAuE;AACvE,MAAM,UAAU,OAAO,CAAC,OAAgB;IACvC,IAAI,GAAG,OAAO,CAAC;AAChB,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,SAAS,CAAC,OAAuB;IAChD,MAAM,GAAG,OAAO,CAAC;IACjB,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CA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