@jjlmoya/utils-science 1.51.0 → 1.53.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 (339) hide show
  1. package/package.json +2 -2
  2. package/scripts/crystal-lattice-catalog-translations.mjs +1 -0
  3. package/src/category/i18n/es.ts +3 -4
  4. package/src/category/i18n/fr.ts +2 -2
  5. package/src/category/i18n/it.ts +2 -2
  6. package/src/category/i18n/pt.ts +2 -2
  7. package/src/category/index.ts +25 -25
  8. package/src/components/PreviewNavSidebar.astro +1 -1
  9. package/src/components/PreviewToolbar.astro +1 -1
  10. package/src/data.ts +1 -1
  11. package/src/env.d.ts +1 -1
  12. package/src/layouts/PreviewLayout.astro +1 -1
  13. package/src/pages/index.astro +1 -1
  14. package/src/tests/bibliography_wellformed_export.test.ts +46 -0
  15. package/src/tests/category_seo_quality.test.ts +76 -0
  16. package/src/tests/faq_count.test.ts +19 -19
  17. package/src/tests/i18n_coverage.test.ts +36 -36
  18. package/src/tests/mocks/astro_mock.js +1 -1
  19. package/src/tests/no_h1_in_components.test.ts +1 -1
  20. package/src/tests/script_density.test.ts +94 -94
  21. package/src/tests/seo_length.test.ts +24 -24
  22. package/src/tests/seo_parity.test.ts +5 -5
  23. package/src/tests/seo_translation_completeness.test.ts +76 -0
  24. package/src/tests/seo_wellformed_export.test.ts +65 -0
  25. package/src/tests/spanish_leakage.test.ts +175 -175
  26. package/src/tool/asteroid-impact/component.astro +251 -251
  27. package/src/tool/asteroid-impact/helpers.ts +17 -17
  28. package/src/tool/asteroid-impact/i18n/de.ts +2 -2
  29. package/src/tool/asteroid-impact/i18n/en.ts +2 -2
  30. package/src/tool/asteroid-impact/i18n/es.ts +2 -2
  31. package/src/tool/asteroid-impact/i18n/fr.ts +2 -2
  32. package/src/tool/asteroid-impact/i18n/id.ts +2 -2
  33. package/src/tool/asteroid-impact/i18n/it.ts +2 -2
  34. package/src/tool/asteroid-impact/i18n/ja.ts +2 -2
  35. package/src/tool/asteroid-impact/i18n/ko.ts +2 -2
  36. package/src/tool/asteroid-impact/i18n/nl.ts +2 -2
  37. package/src/tool/asteroid-impact/i18n/pl.ts +2 -2
  38. package/src/tool/asteroid-impact/i18n/pt.ts +2 -2
  39. package/src/tool/asteroid-impact/i18n/ru.ts +2 -2
  40. package/src/tool/asteroid-impact/i18n/sv.ts +2 -2
  41. package/src/tool/asteroid-impact/i18n/tr.ts +2 -2
  42. package/src/tool/asteroid-impact/i18n/zh.ts +2 -2
  43. package/src/tool/asteroid-impact/script.ts +262 -262
  44. package/src/tool/asteroid-impact/seo.astro +15 -15
  45. package/src/tool/asteroid-impact/ui.ts +69 -69
  46. package/src/tool/black-hole-event-horizon-simulator/i18n/de.ts +249 -241
  47. package/src/tool/black-hole-event-horizon-simulator/i18n/fr.ts +252 -247
  48. package/src/tool/black-hole-event-horizon-simulator/i18n/id.ts +259 -259
  49. package/src/tool/black-hole-event-horizon-simulator/i18n/it.ts +255 -252
  50. package/src/tool/black-hole-event-horizon-simulator/i18n/ja.ts +254 -252
  51. package/src/tool/black-hole-event-horizon-simulator/i18n/ko.ts +258 -258
  52. package/src/tool/black-hole-event-horizon-simulator/i18n/nl.ts +256 -252
  53. package/src/tool/black-hole-event-horizon-simulator/i18n/pl.ts +258 -258
  54. package/src/tool/black-hole-event-horizon-simulator/i18n/pt.ts +256 -252
  55. package/src/tool/black-hole-event-horizon-simulator/i18n/ru.ts +258 -258
  56. package/src/tool/black-hole-event-horizon-simulator/i18n/sv.ts +257 -252
  57. package/src/tool/black-hole-event-horizon-simulator/i18n/tr.ts +256 -251
  58. package/src/tool/black-hole-event-horizon-simulator/i18n/zh.ts +261 -252
  59. package/src/tool/cellular-renewal/component.astro +126 -126
  60. package/src/tool/cellular-renewal/i18n/de.ts +1 -1
  61. package/src/tool/cellular-renewal/i18n/en.ts +1 -1
  62. package/src/tool/cellular-renewal/i18n/es.ts +1 -1
  63. package/src/tool/cellular-renewal/i18n/fr.ts +1 -1
  64. package/src/tool/cellular-renewal/i18n/id.ts +1 -1
  65. package/src/tool/cellular-renewal/i18n/it.ts +1 -1
  66. package/src/tool/cellular-renewal/i18n/ja.ts +1 -1
  67. package/src/tool/cellular-renewal/i18n/ko.ts +1 -1
  68. package/src/tool/cellular-renewal/i18n/nl.ts +1 -1
  69. package/src/tool/cellular-renewal/i18n/pl.ts +1 -1
  70. package/src/tool/cellular-renewal/i18n/pt.ts +1 -1
  71. package/src/tool/cellular-renewal/i18n/ru.ts +1 -1
  72. package/src/tool/cellular-renewal/i18n/sv.ts +1 -1
  73. package/src/tool/cellular-renewal/i18n/tr.ts +1 -1
  74. package/src/tool/cellular-renewal/i18n/zh.ts +1 -1
  75. package/src/tool/cellular-renewal/seo.astro +15 -15
  76. package/src/tool/colony-counter/i18n/de.ts +1 -1
  77. package/src/tool/colony-counter/i18n/en.ts +1 -1
  78. package/src/tool/colony-counter/i18n/es.ts +1 -1
  79. package/src/tool/colony-counter/i18n/fr.ts +1 -1
  80. package/src/tool/colony-counter/i18n/id.ts +1 -1
  81. package/src/tool/colony-counter/i18n/it.ts +1 -1
  82. package/src/tool/colony-counter/i18n/ja.ts +1 -1
  83. package/src/tool/colony-counter/i18n/ko.ts +1 -1
  84. package/src/tool/colony-counter/i18n/nl.ts +1 -1
  85. package/src/tool/colony-counter/i18n/pl.ts +1 -1
  86. package/src/tool/colony-counter/i18n/pt.ts +1 -1
  87. package/src/tool/colony-counter/i18n/ru.ts +1 -1
  88. package/src/tool/colony-counter/i18n/sv.ts +1 -1
  89. package/src/tool/colony-counter/i18n/tr.ts +1 -1
  90. package/src/tool/colony-counter/i18n/zh.ts +1 -1
  91. package/src/tool/colony-counter/seo.astro +15 -15
  92. package/src/tool/conway-life-rule-lab/component.astro +1 -1
  93. package/src/tool/conway-life-rule-lab/i18n/de.ts +145 -141
  94. package/src/tool/conway-life-rule-lab/i18n/es.ts +146 -142
  95. package/src/tool/conway-life-rule-lab/i18n/fr.ts +146 -142
  96. package/src/tool/conway-life-rule-lab/i18n/id.ts +146 -145
  97. package/src/tool/conway-life-rule-lab/i18n/it.ts +146 -145
  98. package/src/tool/conway-life-rule-lab/i18n/ja.ts +146 -145
  99. package/src/tool/conway-life-rule-lab/i18n/ko.ts +146 -145
  100. package/src/tool/conway-life-rule-lab/i18n/nl.ts +147 -145
  101. package/src/tool/conway-life-rule-lab/i18n/pl.ts +147 -145
  102. package/src/tool/conway-life-rule-lab/i18n/pt.ts +147 -145
  103. package/src/tool/conway-life-rule-lab/i18n/ru.ts +147 -145
  104. package/src/tool/conway-life-rule-lab/i18n/sv.ts +147 -145
  105. package/src/tool/conway-life-rule-lab/i18n/tr.ts +147 -145
  106. package/src/tool/conway-life-rule-lab/i18n/zh.ts +147 -145
  107. package/src/tool/conway-life-rule-lab/logic/LifeLabRuntime.ts +2 -2
  108. package/src/tool/cosmic-inflation/i18n/ru.ts +105 -105
  109. package/src/tool/crystal-lattice-structure-finder/i18n/de.ts +217 -217
  110. package/src/tool/crystal-lattice-structure-finder/i18n/en.ts +1 -1
  111. package/src/tool/crystal-lattice-structure-finder/i18n/es.ts +217 -217
  112. package/src/tool/crystal-lattice-structure-finder/i18n/fr.ts +217 -217
  113. package/src/tool/crystal-lattice-structure-finder/i18n/id.ts +217 -217
  114. package/src/tool/crystal-lattice-structure-finder/i18n/it.ts +217 -217
  115. package/src/tool/crystal-lattice-structure-finder/i18n/ja.ts +217 -217
  116. package/src/tool/crystal-lattice-structure-finder/i18n/ko.ts +217 -217
  117. package/src/tool/crystal-lattice-structure-finder/i18n/nl.ts +217 -217
  118. package/src/tool/crystal-lattice-structure-finder/i18n/pl.ts +217 -217
  119. package/src/tool/crystal-lattice-structure-finder/i18n/pt.ts +217 -217
  120. package/src/tool/crystal-lattice-structure-finder/i18n/ru.ts +217 -217
  121. package/src/tool/crystal-lattice-structure-finder/i18n/sv.ts +217 -217
  122. package/src/tool/crystal-lattice-structure-finder/i18n/tr.ts +217 -217
  123. package/src/tool/crystal-lattice-structure-finder/i18n/zh.ts +217 -217
  124. package/src/tool/double-slit-decoherence/i18n/de.ts +181 -181
  125. package/src/tool/double-slit-decoherence/i18n/fr.ts +180 -180
  126. package/src/tool/double-slit-decoherence/i18n/id.ts +181 -181
  127. package/src/tool/double-slit-decoherence/i18n/it.ts +180 -180
  128. package/src/tool/double-slit-decoherence/i18n/ja.ts +181 -181
  129. package/src/tool/double-slit-decoherence/i18n/ko.ts +181 -181
  130. package/src/tool/double-slit-decoherence/i18n/nl.ts +181 -181
  131. package/src/tool/double-slit-decoherence/i18n/pl.ts +181 -181
  132. package/src/tool/double-slit-decoherence/i18n/pt.ts +178 -174
  133. package/src/tool/double-slit-decoherence/i18n/ru.ts +180 -180
  134. package/src/tool/double-slit-decoherence/i18n/sv.ts +176 -172
  135. package/src/tool/double-slit-decoherence/i18n/tr.ts +180 -180
  136. package/src/tool/double-slit-decoherence/i18n/zh.ts +181 -181
  137. package/src/tool/dyson-sphere-energy-capture/component.astro +253 -253
  138. package/src/tool/dyson-sphere-energy-capture/i18n/de.ts +194 -194
  139. package/src/tool/dyson-sphere-energy-capture/i18n/en.ts +6 -6
  140. package/src/tool/dyson-sphere-energy-capture/i18n/es.ts +6 -6
  141. package/src/tool/dyson-sphere-energy-capture/i18n/fr.ts +194 -194
  142. package/src/tool/dyson-sphere-energy-capture/i18n/id.ts +195 -195
  143. package/src/tool/dyson-sphere-energy-capture/i18n/it.ts +194 -194
  144. package/src/tool/dyson-sphere-energy-capture/i18n/ja.ts +194 -190
  145. package/src/tool/dyson-sphere-energy-capture/i18n/ko.ts +194 -193
  146. package/src/tool/dyson-sphere-energy-capture/i18n/nl.ts +197 -197
  147. package/src/tool/dyson-sphere-energy-capture/i18n/pl.ts +168 -166
  148. package/src/tool/dyson-sphere-energy-capture/i18n/pt.ts +194 -193
  149. package/src/tool/dyson-sphere-energy-capture/i18n/ru.ts +195 -193
  150. package/src/tool/dyson-sphere-energy-capture/i18n/sv.ts +195 -193
  151. package/src/tool/dyson-sphere-energy-capture/i18n/tr.ts +168 -166
  152. package/src/tool/dyson-sphere-energy-capture/i18n/zh.ts +194 -193
  153. package/src/tool/epidemic-sir-simulator/i18n/de.ts +347 -347
  154. package/src/tool/epidemic-sir-simulator/i18n/es.ts +347 -347
  155. package/src/tool/epidemic-sir-simulator/i18n/fr.ts +347 -347
  156. package/src/tool/epidemic-sir-simulator/i18n/it.ts +346 -346
  157. package/src/tool/epidemic-sir-simulator/i18n/nl.ts +347 -347
  158. package/src/tool/epidemic-sir-simulator/i18n/ru.ts +347 -347
  159. package/src/tool/epidemic-sir-simulator/i18n/sv.ts +347 -347
  160. package/src/tool/epidemic-sir-simulator/i18n/zh.ts +347 -347
  161. package/src/tool/exoplanet-biosignature-detector/i18n/de.ts +186 -186
  162. package/src/tool/exoplanet-biosignature-detector/i18n/en.ts +195 -195
  163. package/src/tool/exoplanet-biosignature-detector/i18n/es.ts +194 -194
  164. package/src/tool/exoplanet-biosignature-detector/i18n/fr.ts +183 -183
  165. package/src/tool/exoplanet-biosignature-detector/i18n/id.ts +193 -193
  166. package/src/tool/exoplanet-biosignature-detector/i18n/it.ts +194 -194
  167. package/src/tool/exoplanet-biosignature-detector/i18n/ja.ts +194 -194
  168. package/src/tool/exoplanet-biosignature-detector/i18n/ko.ts +194 -194
  169. package/src/tool/exoplanet-biosignature-detector/i18n/nl.ts +194 -194
  170. package/src/tool/exoplanet-biosignature-detector/i18n/pl.ts +144 -144
  171. package/src/tool/exoplanet-biosignature-detector/i18n/pt.ts +146 -146
  172. package/src/tool/exoplanet-biosignature-detector/i18n/ru.ts +143 -143
  173. package/src/tool/exoplanet-biosignature-detector/i18n/sv.ts +144 -144
  174. package/src/tool/exoplanet-biosignature-detector/i18n/tr.ts +145 -145
  175. package/src/tool/exoplanet-biosignature-detector/i18n/zh.ts +194 -194
  176. package/src/tool/global-albedo-snowball-simulator/component.astro +1 -1
  177. package/src/tool/global-albedo-snowball-simulator/i18n/de.ts +169 -169
  178. package/src/tool/global-albedo-snowball-simulator/i18n/fr.ts +169 -169
  179. package/src/tool/global-albedo-snowball-simulator/i18n/id.ts +169 -169
  180. package/src/tool/global-albedo-snowball-simulator/i18n/it.ts +87 -87
  181. package/src/tool/global-albedo-snowball-simulator/i18n/ja.ts +87 -87
  182. package/src/tool/global-albedo-snowball-simulator/i18n/ko.ts +169 -169
  183. package/src/tool/global-albedo-snowball-simulator/i18n/nl.ts +169 -169
  184. package/src/tool/global-albedo-snowball-simulator/i18n/pl.ts +169 -169
  185. package/src/tool/global-albedo-snowball-simulator/i18n/pt.ts +169 -169
  186. package/src/tool/global-albedo-snowball-simulator/i18n/ru.ts +165 -161
  187. package/src/tool/global-albedo-snowball-simulator/i18n/sv.ts +169 -169
  188. package/src/tool/global-albedo-snowball-simulator/i18n/tr.ts +169 -169
  189. package/src/tool/global-albedo-snowball-simulator/i18n/zh.ts +169 -169
  190. package/src/tool/lorenz-attractor/i18n/de.ts +144 -143
  191. package/src/tool/lorenz-attractor/i18n/fr.ts +144 -144
  192. package/src/tool/lorenz-attractor/i18n/id.ts +149 -149
  193. package/src/tool/lorenz-attractor/i18n/it.ts +149 -149
  194. package/src/tool/lorenz-attractor/i18n/ja.ts +149 -149
  195. package/src/tool/lorenz-attractor/i18n/ko.ts +149 -149
  196. package/src/tool/lorenz-attractor/i18n/nl.ts +149 -149
  197. package/src/tool/lorenz-attractor/i18n/pl.ts +149 -149
  198. package/src/tool/lorenz-attractor/i18n/pt.ts +142 -141
  199. package/src/tool/lorenz-attractor/i18n/ru.ts +149 -149
  200. package/src/tool/lorenz-attractor/i18n/sv.ts +149 -149
  201. package/src/tool/lorenz-attractor/i18n/tr.ts +149 -149
  202. package/src/tool/lorenz-attractor/i18n/zh.ts +149 -149
  203. package/src/tool/mandelbrot-fractal/i18n/de.ts +158 -158
  204. package/src/tool/mandelbrot-fractal/i18n/fr.ts +158 -158
  205. package/src/tool/mandelbrot-fractal/i18n/id.ts +159 -159
  206. package/src/tool/mandelbrot-fractal/i18n/it.ts +155 -151
  207. package/src/tool/mandelbrot-fractal/i18n/ja.ts +159 -159
  208. package/src/tool/mandelbrot-fractal/i18n/ko.ts +159 -159
  209. package/src/tool/mandelbrot-fractal/i18n/nl.ts +159 -159
  210. package/src/tool/mandelbrot-fractal/i18n/pl.ts +157 -153
  211. package/src/tool/mandelbrot-fractal/i18n/pt.ts +158 -158
  212. package/src/tool/mandelbrot-fractal/i18n/ru.ts +159 -159
  213. package/src/tool/mandelbrot-fractal/i18n/sv.ts +159 -150
  214. package/src/tool/mandelbrot-fractal/i18n/tr.ts +159 -159
  215. package/src/tool/mandelbrot-fractal/i18n/zh.ts +159 -159
  216. package/src/tool/microwave-detector/component.astro +238 -238
  217. package/src/tool/microwave-detector/i18n/de.ts +1 -1
  218. package/src/tool/microwave-detector/i18n/en.ts +1 -1
  219. package/src/tool/microwave-detector/i18n/es.ts +1 -1
  220. package/src/tool/microwave-detector/i18n/fr.ts +1 -1
  221. package/src/tool/microwave-detector/i18n/id.ts +1 -1
  222. package/src/tool/microwave-detector/i18n/it.ts +1 -1
  223. package/src/tool/microwave-detector/i18n/ja.ts +1 -1
  224. package/src/tool/microwave-detector/i18n/ko.ts +1 -1
  225. package/src/tool/microwave-detector/i18n/nl.ts +1 -1
  226. package/src/tool/microwave-detector/i18n/pl.ts +1 -1
  227. package/src/tool/microwave-detector/i18n/pt.ts +1 -1
  228. package/src/tool/microwave-detector/i18n/ru.ts +1 -1
  229. package/src/tool/microwave-detector/i18n/sv.ts +1 -1
  230. package/src/tool/microwave-detector/i18n/tr.ts +1 -1
  231. package/src/tool/microwave-detector/i18n/zh.ts +1 -1
  232. package/src/tool/microwave-detector/seo.astro +15 -15
  233. package/src/tool/natural-selection-drift/component.astro +135 -135
  234. package/src/tool/natural-selection-drift/i18n/de.ts +164 -160
  235. package/src/tool/natural-selection-drift/i18n/fr.ts +204 -204
  236. package/src/tool/natural-selection-drift/i18n/id.ts +156 -154
  237. package/src/tool/natural-selection-drift/i18n/it.ts +197 -193
  238. package/src/tool/natural-selection-drift/i18n/ja.ts +155 -154
  239. package/src/tool/natural-selection-drift/i18n/ko.ts +155 -154
  240. package/src/tool/natural-selection-drift/i18n/nl.ts +164 -163
  241. package/src/tool/natural-selection-drift/i18n/pl.ts +168 -166
  242. package/src/tool/natural-selection-drift/i18n/pt.ts +200 -195
  243. package/src/tool/natural-selection-drift/i18n/ru.ts +186 -184
  244. package/src/tool/natural-selection-drift/i18n/sv.ts +157 -154
  245. package/src/tool/natural-selection-drift/i18n/tr.ts +186 -184
  246. package/src/tool/natural-selection-drift/i18n/zh.ts +160 -154
  247. package/src/tool/natural-selection-drift/natural-selection-drift.css +563 -563
  248. package/src/tool/phase-diagram-critical-points/i18n/de.ts +178 -178
  249. package/src/tool/phase-diagram-critical-points/i18n/fr.ts +178 -178
  250. package/src/tool/phase-diagram-critical-points/i18n/id.ts +179 -179
  251. package/src/tool/phase-diagram-critical-points/i18n/it.ts +179 -179
  252. package/src/tool/phase-diagram-critical-points/i18n/ja.ts +179 -179
  253. package/src/tool/phase-diagram-critical-points/i18n/ko.ts +179 -179
  254. package/src/tool/phase-diagram-critical-points/i18n/nl.ts +179 -179
  255. package/src/tool/phase-diagram-critical-points/i18n/pl.ts +179 -179
  256. package/src/tool/phase-diagram-critical-points/i18n/pt.ts +179 -179
  257. package/src/tool/phase-diagram-critical-points/i18n/ru.ts +179 -179
  258. package/src/tool/phase-diagram-critical-points/i18n/sv.ts +179 -179
  259. package/src/tool/phase-diagram-critical-points/i18n/tr.ts +179 -179
  260. package/src/tool/phase-diagram-critical-points/i18n/zh.ts +179 -179
  261. package/src/tool/planet-atmosphere-survival/i18n/de.ts +255 -255
  262. package/src/tool/planet-atmosphere-survival/i18n/fr.ts +255 -255
  263. package/src/tool/planet-atmosphere-survival/i18n/id.ts +255 -255
  264. package/src/tool/planet-atmosphere-survival/i18n/it.ts +255 -255
  265. package/src/tool/planet-atmosphere-survival/i18n/ja.ts +255 -255
  266. package/src/tool/planet-atmosphere-survival/i18n/ko.ts +255 -255
  267. package/src/tool/planet-atmosphere-survival/i18n/nl.ts +255 -255
  268. package/src/tool/planet-atmosphere-survival/i18n/pl.ts +255 -255
  269. package/src/tool/planet-atmosphere-survival/i18n/pt.ts +255 -255
  270. package/src/tool/planet-atmosphere-survival/i18n/ru.ts +227 -223
  271. package/src/tool/planet-atmosphere-survival/i18n/sv.ts +255 -255
  272. package/src/tool/planet-atmosphere-survival/i18n/tr.ts +255 -255
  273. package/src/tool/planet-atmosphere-survival/i18n/zh.ts +255 -255
  274. package/src/tool/radioactive-decay/i18n/de.ts +168 -164
  275. package/src/tool/radioactive-decay/i18n/fr.ts +76 -75
  276. package/src/tool/radioactive-decay/i18n/id.ts +169 -165
  277. package/src/tool/radioactive-decay/i18n/it.ts +76 -74
  278. package/src/tool/radioactive-decay/i18n/ja.ts +168 -167
  279. package/src/tool/radioactive-decay/i18n/ko.ts +168 -167
  280. package/src/tool/radioactive-decay/i18n/nl.ts +170 -168
  281. package/src/tool/radioactive-decay/i18n/pl.ts +170 -168
  282. package/src/tool/radioactive-decay/i18n/pt.ts +169 -167
  283. package/src/tool/radioactive-decay/i18n/ru.ts +170 -168
  284. package/src/tool/radioactive-decay/i18n/sv.ts +170 -168
  285. package/src/tool/radioactive-decay/i18n/tr.ts +171 -168
  286. package/src/tool/radioactive-decay/i18n/zh.ts +171 -167
  287. package/src/tool/roche-limit-satellite-disruption/i18n/de.ts +241 -241
  288. package/src/tool/roche-limit-satellite-disruption/i18n/fr.ts +241 -241
  289. package/src/tool/roche-limit-satellite-disruption/i18n/id.ts +241 -241
  290. package/src/tool/roche-limit-satellite-disruption/i18n/it.ts +241 -241
  291. package/src/tool/roche-limit-satellite-disruption/i18n/ja.ts +241 -241
  292. package/src/tool/roche-limit-satellite-disruption/i18n/ko.ts +241 -241
  293. package/src/tool/roche-limit-satellite-disruption/i18n/nl.ts +241 -241
  294. package/src/tool/roche-limit-satellite-disruption/i18n/pl.ts +237 -229
  295. package/src/tool/roche-limit-satellite-disruption/i18n/pt.ts +241 -241
  296. package/src/tool/roche-limit-satellite-disruption/i18n/ru.ts +241 -241
  297. package/src/tool/roche-limit-satellite-disruption/i18n/sv.ts +241 -241
  298. package/src/tool/roche-limit-satellite-disruption/i18n/tr.ts +241 -241
  299. package/src/tool/roche-limit-satellite-disruption/i18n/zh.ts +241 -241
  300. package/src/tool/simulation-probability/component.astro +138 -138
  301. package/src/tool/simulation-probability/i18n/de.ts +1 -1
  302. package/src/tool/simulation-probability/i18n/en.ts +1 -1
  303. package/src/tool/simulation-probability/i18n/es.ts +1 -1
  304. package/src/tool/simulation-probability/i18n/fr.ts +1 -1
  305. package/src/tool/simulation-probability/i18n/id.ts +1 -1
  306. package/src/tool/simulation-probability/i18n/it.ts +1 -1
  307. package/src/tool/simulation-probability/i18n/ja.ts +1 -1
  308. package/src/tool/simulation-probability/i18n/ko.ts +1 -1
  309. package/src/tool/simulation-probability/i18n/nl.ts +1 -1
  310. package/src/tool/simulation-probability/i18n/pl.ts +1 -1
  311. package/src/tool/simulation-probability/i18n/pt.ts +1 -1
  312. package/src/tool/simulation-probability/i18n/ru.ts +1 -1
  313. package/src/tool/simulation-probability/i18n/sv.ts +1 -1
  314. package/src/tool/simulation-probability/i18n/tr.ts +1 -1
  315. package/src/tool/simulation-probability/i18n/zh.ts +1 -1
  316. package/src/tool/simulation-probability/seo.astro +15 -15
  317. package/src/tool/stellar-habitability-zone/i18n/ru.ts +189 -189
  318. package/src/tool/temperature-timeline/i18n/de.ts +2 -1
  319. package/src/tool/temperature-timeline/i18n/fr.ts +177 -177
  320. package/src/tool/temperature-timeline/i18n/it.ts +142 -141
  321. package/src/tool/temperature-timeline/i18n/pt.ts +3 -1
  322. package/src/tool/temperature-timeline/i18n/ru.ts +116 -114
  323. package/src/tool/three-body-problem/app.ts +4 -4
  324. package/src/tool/three-body-problem/component.astro +6 -6
  325. package/src/tool/twin-paradox-visualizer/i18n/de.ts +168 -168
  326. package/src/tool/twin-paradox-visualizer/i18n/es.ts +165 -165
  327. package/src/tool/twin-paradox-visualizer/i18n/fr.ts +168 -168
  328. package/src/tool/twin-paradox-visualizer/i18n/id.ts +168 -168
  329. package/src/tool/twin-paradox-visualizer/i18n/it.ts +168 -168
  330. package/src/tool/twin-paradox-visualizer/i18n/ja.ts +168 -168
  331. package/src/tool/twin-paradox-visualizer/i18n/ko.ts +168 -168
  332. package/src/tool/twin-paradox-visualizer/i18n/nl.ts +168 -168
  333. package/src/tool/twin-paradox-visualizer/i18n/pl.ts +168 -168
  334. package/src/tool/twin-paradox-visualizer/i18n/pt.ts +164 -160
  335. package/src/tool/twin-paradox-visualizer/i18n/ru.ts +168 -168
  336. package/src/tool/twin-paradox-visualizer/i18n/sv.ts +168 -168
  337. package/src/tool/twin-paradox-visualizer/i18n/tr.ts +168 -168
  338. package/src/tool/twin-paradox-visualizer/i18n/zh.ts +168 -168
  339. package/src/types.ts +1 -1
@@ -1,94 +1,94 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { ALL_TOOLS } from '../tools';
3
-
4
- type ScriptLocale = keyof typeof SCRIPT_RULES;
5
-
6
- const SCRIPT_RULES = {
7
- ja: {
8
- language: 'Japanese',
9
- scriptName: 'kana/kanji',
10
- scriptCharacters: /[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/gu,
11
- minScriptRatio: 0.45,
12
- },
13
- ko: {
14
- language: 'Korean',
15
- scriptName: 'hangul',
16
- scriptCharacters: /\p{Script=Hangul}/gu,
17
- minScriptRatio: 0.55,
18
- },
19
- ru: {
20
- language: 'Russian',
21
- scriptName: 'cyrillic',
22
- scriptCharacters: /\p{Script=Cyrillic}/gu,
23
- minScriptRatio: 0.65,
24
- },
25
- zh: {
26
- language: 'Chinese',
27
- scriptName: 'han',
28
- scriptCharacters: /\p{Script=Han}/gu,
29
- minScriptRatio: 0.45,
30
- },
31
- } as const;
32
-
33
- const LETTERS = /\p{L}/gu;
34
- const TRANSLATABLE_KEYS = ['title', 'description', 'ui', 'seo', 'faq', 'howTo'] as const;
35
-
36
- function collectStrings(value: unknown): string[] {
37
- if (typeof value === 'string') return [value];
38
- if (!value || typeof value !== 'object') return [];
39
- if (Array.isArray(value)) return value.flatMap(collectStrings);
40
- return Object.values(value).flatMap(collectStrings);
41
- }
42
-
43
- function normalizeText(value: unknown): string {
44
- return collectStrings(value).join(' ').normalize('NFC');
45
- }
46
-
47
- function translatableContent(content: Record<string, unknown>) {
48
- return TRANSLATABLE_KEYS.map((key) => content[key]);
49
- }
50
-
51
- function letterCount(text: string): number {
52
- return text.match(LETTERS)?.length ?? 0;
53
- }
54
-
55
- function scriptCount(text: string, locale: ScriptLocale): number {
56
- return text.match(SCRIPT_RULES[locale].scriptCharacters)?.length ?? 0;
57
- }
58
-
59
- function scriptRatio(text: string, locale: ScriptLocale): number {
60
- const letters = letterCount(text);
61
- if (letters === 0) return 0;
62
- return scriptCount(text, locale) / letters;
63
- }
64
-
65
- describe('Native script density validation', () => {
66
- ALL_TOOLS.forEach((tool) => {
67
- describe(`Tool: ${tool.entry.id}`, () => {
68
- Object.keys(SCRIPT_RULES).forEach((locale) => {
69
- it(`${locale} keeps most translated text in its native script`, async () => {
70
- const typedLocale = locale as ScriptLocale;
71
- const loader = tool.entry.i18n[typedLocale];
72
- if (!loader) return;
73
-
74
- const content = await loader();
75
- const rule = SCRIPT_RULES[typedLocale];
76
- const text = normalizeText(translatableContent(content as Record<string, unknown>));
77
- const letters = letterCount(text);
78
- const matches = scriptCount(text, typedLocale);
79
- const ratio = scriptRatio(text, typedLocale);
80
-
81
- expect(
82
- ratio,
83
- [
84
- `Possible broken translation detected in ${tool.entry.id}/${typedLocale} (${rule.language}).`,
85
- `The text has ${matches} ${rule.scriptName} characters out of ${letters} analyzed letters (${(ratio * 100).toFixed(1)}%).`,
86
- `Most translatable content should be written in ${rule.scriptName} script.`,
87
- 'Non-translatable fields such as slug, bibliography, and schemas are ignored to avoid false positives.',
88
- ].join(' '),
89
- ).toBeGreaterThanOrEqual(rule.minScriptRatio);
90
- });
91
- });
92
- });
93
- });
94
- });
1
+ import { describe, expect, it } from 'vitest';
2
+ import { ALL_TOOLS } from '../tools';
3
+
4
+ type ScriptLocale = keyof typeof SCRIPT_RULES;
5
+
6
+ const SCRIPT_RULES = {
7
+ ja: {
8
+ language: 'Japanese',
9
+ scriptName: 'kana/kanji',
10
+ scriptCharacters: /[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/gu,
11
+ minScriptRatio: 0.45,
12
+ },
13
+ ko: {
14
+ language: 'Korean',
15
+ scriptName: 'hangul',
16
+ scriptCharacters: /\p{Script=Hangul}/gu,
17
+ minScriptRatio: 0.55,
18
+ },
19
+ ru: {
20
+ language: 'Russian',
21
+ scriptName: 'cyrillic',
22
+ scriptCharacters: /\p{Script=Cyrillic}/gu,
23
+ minScriptRatio: 0.65,
24
+ },
25
+ zh: {
26
+ language: 'Chinese',
27
+ scriptName: 'han',
28
+ scriptCharacters: /\p{Script=Han}/gu,
29
+ minScriptRatio: 0.45,
30
+ },
31
+ } as const;
32
+
33
+ const LETTERS = /\p{L}/gu;
34
+ const TRANSLATABLE_KEYS = ['title', 'description', 'ui', 'seo', 'faq', 'howTo'] as const;
35
+
36
+ function collectStrings(value: unknown): string[] {
37
+ if (typeof value === 'string') return [value];
38
+ if (!value || typeof value !== 'object') return [];
39
+ if (Array.isArray(value)) return value.flatMap(collectStrings);
40
+ return Object.values(value).flatMap(collectStrings);
41
+ }
42
+
43
+ function normalizeText(value: unknown): string {
44
+ return collectStrings(value).join(' ').normalize('NFC');
45
+ }
46
+
47
+ function translatableContent(content: Record<string, unknown>) {
48
+ return TRANSLATABLE_KEYS.map((key) => content[key]);
49
+ }
50
+
51
+ function letterCount(text: string): number {
52
+ return text.match(LETTERS)?.length ?? 0;
53
+ }
54
+
55
+ function scriptCount(text: string, locale: ScriptLocale): number {
56
+ return text.match(SCRIPT_RULES[locale].scriptCharacters)?.length ?? 0;
57
+ }
58
+
59
+ function scriptRatio(text: string, locale: ScriptLocale): number {
60
+ const letters = letterCount(text);
61
+ if (letters === 0) return 0;
62
+ return scriptCount(text, locale) / letters;
63
+ }
64
+
65
+ describe('Native script density validation', () => {
66
+ ALL_TOOLS.forEach((tool) => {
67
+ describe(`Tool: ${tool.entry.id}`, () => {
68
+ Object.keys(SCRIPT_RULES).forEach((locale) => {
69
+ it(`${locale} keeps most translated text in its native script`, async () => {
70
+ const typedLocale = locale as ScriptLocale;
71
+ const loader = tool.entry.i18n[typedLocale];
72
+ if (!loader) return;
73
+
74
+ const content = await loader();
75
+ const rule = SCRIPT_RULES[typedLocale];
76
+ const text = normalizeText(translatableContent(content as Record<string, unknown>));
77
+ const letters = letterCount(text);
78
+ const matches = scriptCount(text, typedLocale);
79
+ const ratio = scriptRatio(text, typedLocale);
80
+
81
+ expect(
82
+ ratio,
83
+ [
84
+ `Possible broken translation detected in ${tool.entry.id}/${typedLocale} (${rule.language}).`,
85
+ `The text has ${matches} ${rule.scriptName} characters out of ${letters} analyzed letters (${(ratio * 100).toFixed(1)}%).`,
86
+ `Most translatable content should be written in ${rule.scriptName} script.`,
87
+ 'Non-translatable fields such as slug, bibliography, and schemas are ignored to avoid false positives.',
88
+ ].join(' '),
89
+ ).toBeGreaterThanOrEqual(rule.minScriptRatio);
90
+ });
91
+ });
92
+ });
93
+ });
94
+ });
@@ -1,24 +1,24 @@
1
- import { describe, it, expect } from 'vitest';
2
- import * as DATA from '../data';
3
-
4
- const ENTRIES = [
5
- { id: 'scienceCategory', i18n: DATA.scienceCategory.i18n },
6
- ];
7
-
8
- describe('SEO Content Length Validation', () => {
9
- ENTRIES.forEach((entry) => {
10
- describe(`Tool: ${entry.id}`, () => {
11
- Object.keys(entry.i18n).forEach((locale) => {
12
- it(`${locale}: SEO section should exist`, async () => {
13
- const loader = (entry.i18n as Record<string, () => Promise<{ seo?: unknown[] }>>)[locale];
14
- if (loader) {
15
- const content = await loader();
16
- if (!content.seo) return;
17
- expect(Array.isArray(content.seo)).toBe(true);
18
- }
19
- });
20
- });
21
- });
22
- });
23
- });
24
-
1
+ import { describe, it, expect } from 'vitest';
2
+ import * as DATA from '../data';
3
+
4
+ const ENTRIES = [
5
+ { id: 'scienceCategory', i18n: DATA.scienceCategory.i18n },
6
+ ];
7
+
8
+ describe('SEO Content Length Validation', () => {
9
+ ENTRIES.forEach((entry) => {
10
+ describe(`Tool: ${entry.id}`, () => {
11
+ Object.keys(entry.i18n).forEach((locale) => {
12
+ it(`${locale}: SEO section should exist`, async () => {
13
+ const loader = (entry.i18n as Record<string, () => Promise<{ seo?: unknown[] }>>)[locale];
14
+ if (loader) {
15
+ const content = await loader();
16
+ if (!content.seo) return;
17
+ expect(Array.isArray(content.seo)).toBe(true);
18
+ }
19
+ });
20
+ });
21
+ });
22
+ });
23
+ });
24
+
@@ -24,15 +24,15 @@ async function verifyLocaleParity(
24
24
  const locFaqCount = countItems(locContent?.faq);
25
25
  const locHowToCount = countItems(locContent?.howTo);
26
26
 
27
- expect(
27
+ expect.soft(
28
28
  locSeoCount,
29
- `Locale ${loc} SEO sections count (${locSeoCount}) must match EN (${expected.seo})`,
30
- ).toBe(expected.seo);
31
- expect(
29
+ `Locale ${loc} SEO sections count (${locSeoCount}) must include the EN structure (${expected.seo})`,
30
+ ).toBeGreaterThanOrEqual(expected.seo);
31
+ expect.soft(
32
32
  locFaqCount,
33
33
  `Locale ${loc} FAQ items count (${locFaqCount}) must match EN (${expected.faq})`,
34
34
  ).toBe(expected.faq);
35
- expect(
35
+ expect.soft(
36
36
  locHowToCount,
37
37
  `Locale ${loc} HowTo steps count (${locHowToCount}) must match EN (${expected.howTo})`,
38
38
  ).toBe(expected.howTo);
@@ -0,0 +1,76 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { ALL_TOOLS } from '../tools';
3
+
4
+ const ASIAN_LOCALES = ['ja', 'ko', 'zh'];
5
+
6
+ function getSimpleSectionLength(section: any): number {
7
+ if (section.type === 'title') return section.text ? section.text.length : 0;
8
+ if (section.type === 'paragraph') return section.html ? section.html.replace(/<[^>]*>/g, '').length : 0;
9
+ if (section.type === 'list') return section.items ? section.items.join('').length : 0;
10
+ return 0;
11
+ }
12
+
13
+ function getComplexSectionLength(section: any): number {
14
+ if (section.type === 'diagnostic' || section.type === 'tip') {
15
+ return (section.title ? section.title.length : 0) + (section.html ? section.html.replace(/<[^>]*>/g, '').length : 0);
16
+ }
17
+ if (section.type === 'table') {
18
+ return ((section.headers || []).join('').length) + ((section.rows || []).flat().join('').length);
19
+ }
20
+ return 0;
21
+ }
22
+
23
+ function getSectionLength(section: any): number {
24
+ return getSimpleSectionLength(section) || getComplexSectionLength(section);
25
+ }
26
+
27
+ function calculateSeoTextLength(seoSections: any[]): number {
28
+ return seoSections.reduce((acc, section) => acc + getSectionLength(section), 0);
29
+ }
30
+
31
+ function checkLocaleSeoLength(toolId: string, locale: string, localeLen: number, enLen: number): string | null {
32
+ const isAsian = ASIAN_LOCALES.includes(locale);
33
+ const minLength = Math.floor(enLen * (isAsian ? 0.25 : 0.70));
34
+ const msgType = isAsian ? 'suspiciously short' : 'truncated/lazy';
35
+
36
+ if (localeLen >= minLength) return null;
37
+
38
+ return `[LAZY SEO TRANSLATION] Tool "${toolId}" locale "${locale}" SEO text is ${msgType} (${localeLen} chars vs EN ${enLen} chars, expected min ${minLength})`;
39
+ }
40
+
41
+ async function auditSingleLocale(toolId: string, locale: string, loader: any, enSeoLength: number): Promise<string | null> {
42
+ if (locale === 'en' || !loader) return null;
43
+ const content = await loader();
44
+ if (!content.seo || !Array.isArray(content.seo)) return null;
45
+
46
+ return checkLocaleSeoLength(toolId, locale, calculateSeoTextLength(content.seo), enSeoLength);
47
+ }
48
+
49
+ describe('SEO Translation Completeness & Laziness Audit', () => {
50
+ ALL_TOOLS.forEach(({ entry }) => {
51
+ describe(`Tool: ${entry.id}`, () => {
52
+ it('should not have lazy or truncated SEO content compared to English reference', async () => {
53
+ const enLoader = entry.i18n['en' as keyof typeof entry.i18n];
54
+ if (!enLoader) return;
55
+
56
+ const enContent = await enLoader();
57
+ if (!enContent.seo || !Array.isArray(enContent.seo)) return;
58
+
59
+ const enSeoLength = calculateSeoTextLength(enContent.seo);
60
+
61
+ const failures: string[] = [];
62
+ for (const [locale, loader] of Object.entries(entry.i18n)) {
63
+ const failure = await auditSingleLocale(entry.id, locale, loader, enSeoLength);
64
+ if (failure) failures.push(failure);
65
+ }
66
+
67
+ expect(
68
+ failures,
69
+ failures.length > 0
70
+ ? `SEO translation completeness failures for "${entry.id}" (${failures.length}):\n${failures.map((failure, index) => `${index + 1}. ${failure}`).join('\n')}`
71
+ : undefined,
72
+ ).toEqual([]);
73
+ });
74
+ });
75
+ });
76
+ });
@@ -0,0 +1,65 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { readdirSync, readFileSync, existsSync } from 'fs';
3
+ import { join, relative } from 'path';
4
+
5
+ function findSeoAstroFiles(dir: string): string[] {
6
+ const files: string[] = [];
7
+ if (!existsSync(dir)) return files;
8
+ const entries = readdirSync(dir, { withFileTypes: true });
9
+
10
+ for (const entry of entries) {
11
+ const fullPath = join(dir, entry.name);
12
+ if (entry.isDirectory()) {
13
+ files.push(...findSeoAstroFiles(fullPath));
14
+ } else if (entry.isFile() && entry.name === 'seo.astro') {
15
+ files.push(fullPath);
16
+ }
17
+ }
18
+
19
+ return files;
20
+ }
21
+
22
+ const toolDir = join(process.cwd(), 'src', 'tool');
23
+ const seoFiles = findSeoAstroFiles(toolDir);
24
+
25
+ describe('SEO Component Wellformed Export', () => {
26
+ it('found tool seo.astro components', () => {
27
+ expect(seoFiles.length).toBeGreaterThan(0);
28
+ });
29
+
30
+ seoFiles.forEach((file) => {
31
+ const relativePath = relative(process.cwd(), file);
32
+
33
+ it(`${relativePath} should dynamically load SEO sections and use SEORenderer`, () => {
34
+ const content = readFileSync(file, 'utf-8');
35
+
36
+ const usesSeoRenderer =
37
+ content.includes('@jjlmoya/utils-shared') &&
38
+ (content.includes('SEORenderer') || content.includes('SEOArticle'));
39
+
40
+ const acquiresDynamicContent =
41
+ content.includes('.i18n') ||
42
+ content.includes('loader') ||
43
+ content.includes('await loader') ||
44
+ content.includes('.seo');
45
+
46
+ const isBrokenPattern =
47
+ /sections\s*=\s*\[\s*\]/.test(content) && !acquiresDynamicContent;
48
+
49
+ expect(
50
+ usesSeoRenderer,
51
+ `File "${relativePath}" does not import or use SEORenderer from @jjlmoya/utils-shared.`,
52
+ ).toBe(true);
53
+
54
+ expect(
55
+ isBrokenPattern,
56
+ `File "${relativePath}" relies on a static sections=[] prop default without fetching content from entry.i18n, resulting in empty SEO text on consumers.`,
57
+ ).toBe(false);
58
+
59
+ expect(
60
+ acquiresDynamicContent,
61
+ `File "${relativePath}" does not fetch dynamic i18n content for SEO rendering.`,
62
+ ).toBe(true);
63
+ });
64
+ });
65
+ });