@jjlmoya/utils-science 1.51.0 → 1.52.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.
- package/package.json +2 -2
- package/src/category/i18n/es.ts +3 -4
- package/src/category/i18n/fr.ts +2 -2
- package/src/category/i18n/it.ts +2 -2
- package/src/category/i18n/pt.ts +2 -2
- package/src/category/index.ts +25 -25
- package/src/components/PreviewNavSidebar.astro +1 -1
- package/src/components/PreviewToolbar.astro +1 -1
- package/src/data.ts +1 -1
- package/src/env.d.ts +1 -1
- package/src/layouts/PreviewLayout.astro +1 -1
- package/src/pages/index.astro +1 -1
- package/src/tests/bibliography_wellformed_export.test.ts +46 -0
- package/src/tests/category_seo_quality.test.ts +76 -0
- package/src/tests/faq_count.test.ts +19 -19
- package/src/tests/i18n_coverage.test.ts +36 -36
- package/src/tests/mocks/astro_mock.js +1 -1
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/script_density.test.ts +94 -94
- package/src/tests/seo_length.test.ts +24 -24
- package/src/tests/seo_parity.test.ts +5 -5
- package/src/tests/seo_translation_completeness.test.ts +76 -0
- package/src/tests/seo_wellformed_export.test.ts +65 -0
- package/src/tests/spanish_leakage.test.ts +175 -175
- package/src/tool/asteroid-impact/component.astro +251 -251
- package/src/tool/asteroid-impact/helpers.ts +17 -17
- package/src/tool/asteroid-impact/i18n/de.ts +2 -2
- package/src/tool/asteroid-impact/i18n/en.ts +2 -2
- package/src/tool/asteroid-impact/i18n/es.ts +2 -2
- package/src/tool/asteroid-impact/i18n/fr.ts +2 -2
- package/src/tool/asteroid-impact/i18n/id.ts +2 -2
- package/src/tool/asteroid-impact/i18n/it.ts +2 -2
- package/src/tool/asteroid-impact/i18n/ja.ts +2 -2
- package/src/tool/asteroid-impact/i18n/ko.ts +2 -2
- package/src/tool/asteroid-impact/i18n/nl.ts +2 -2
- package/src/tool/asteroid-impact/i18n/pl.ts +2 -2
- package/src/tool/asteroid-impact/i18n/pt.ts +2 -2
- package/src/tool/asteroid-impact/i18n/ru.ts +2 -2
- package/src/tool/asteroid-impact/i18n/sv.ts +2 -2
- package/src/tool/asteroid-impact/i18n/tr.ts +2 -2
- package/src/tool/asteroid-impact/i18n/zh.ts +2 -2
- package/src/tool/asteroid-impact/script.ts +262 -262
- package/src/tool/asteroid-impact/seo.astro +15 -15
- package/src/tool/asteroid-impact/ui.ts +69 -69
- package/src/tool/black-hole-event-horizon-simulator/i18n/de.ts +249 -241
- package/src/tool/black-hole-event-horizon-simulator/i18n/fr.ts +252 -247
- package/src/tool/black-hole-event-horizon-simulator/i18n/id.ts +259 -259
- package/src/tool/black-hole-event-horizon-simulator/i18n/it.ts +255 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/ja.ts +254 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/ko.ts +258 -258
- package/src/tool/black-hole-event-horizon-simulator/i18n/nl.ts +256 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/pl.ts +258 -258
- package/src/tool/black-hole-event-horizon-simulator/i18n/pt.ts +256 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/ru.ts +258 -258
- package/src/tool/black-hole-event-horizon-simulator/i18n/sv.ts +257 -252
- package/src/tool/black-hole-event-horizon-simulator/i18n/tr.ts +256 -251
- package/src/tool/black-hole-event-horizon-simulator/i18n/zh.ts +261 -252
- package/src/tool/cellular-renewal/component.astro +126 -126
- package/src/tool/cellular-renewal/i18n/de.ts +1 -1
- package/src/tool/cellular-renewal/i18n/en.ts +1 -1
- package/src/tool/cellular-renewal/i18n/es.ts +1 -1
- package/src/tool/cellular-renewal/i18n/fr.ts +1 -1
- package/src/tool/cellular-renewal/i18n/id.ts +1 -1
- package/src/tool/cellular-renewal/i18n/it.ts +1 -1
- package/src/tool/cellular-renewal/i18n/ja.ts +1 -1
- package/src/tool/cellular-renewal/i18n/ko.ts +1 -1
- package/src/tool/cellular-renewal/i18n/nl.ts +1 -1
- package/src/tool/cellular-renewal/i18n/pl.ts +1 -1
- package/src/tool/cellular-renewal/i18n/pt.ts +1 -1
- package/src/tool/cellular-renewal/i18n/ru.ts +1 -1
- package/src/tool/cellular-renewal/i18n/sv.ts +1 -1
- package/src/tool/cellular-renewal/i18n/tr.ts +1 -1
- package/src/tool/cellular-renewal/i18n/zh.ts +1 -1
- package/src/tool/cellular-renewal/seo.astro +15 -15
- package/src/tool/colony-counter/i18n/de.ts +1 -1
- package/src/tool/colony-counter/i18n/en.ts +1 -1
- package/src/tool/colony-counter/i18n/es.ts +1 -1
- package/src/tool/colony-counter/i18n/fr.ts +1 -1
- package/src/tool/colony-counter/i18n/id.ts +1 -1
- package/src/tool/colony-counter/i18n/it.ts +1 -1
- package/src/tool/colony-counter/i18n/ja.ts +1 -1
- package/src/tool/colony-counter/i18n/ko.ts +1 -1
- package/src/tool/colony-counter/i18n/nl.ts +1 -1
- package/src/tool/colony-counter/i18n/pl.ts +1 -1
- package/src/tool/colony-counter/i18n/pt.ts +1 -1
- package/src/tool/colony-counter/i18n/ru.ts +1 -1
- package/src/tool/colony-counter/i18n/sv.ts +1 -1
- package/src/tool/colony-counter/i18n/tr.ts +1 -1
- package/src/tool/colony-counter/i18n/zh.ts +1 -1
- package/src/tool/colony-counter/seo.astro +15 -15
- package/src/tool/conway-life-rule-lab/component.astro +1 -1
- package/src/tool/conway-life-rule-lab/i18n/de.ts +145 -141
- package/src/tool/conway-life-rule-lab/i18n/es.ts +146 -142
- package/src/tool/conway-life-rule-lab/i18n/fr.ts +146 -142
- package/src/tool/conway-life-rule-lab/i18n/id.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/it.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/ja.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/ko.ts +146 -145
- package/src/tool/conway-life-rule-lab/i18n/nl.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/pl.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/pt.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/ru.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/sv.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/tr.ts +147 -145
- package/src/tool/conway-life-rule-lab/i18n/zh.ts +147 -145
- package/src/tool/conway-life-rule-lab/logic/LifeLabRuntime.ts +2 -2
- package/src/tool/cosmic-inflation/i18n/ru.ts +105 -105
- package/src/tool/crystal-lattice-structure-finder/i18n/de.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/en.ts +1 -1
- package/src/tool/crystal-lattice-structure-finder/i18n/es.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/fr.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/id.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/it.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/ja.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/ko.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/nl.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/pl.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/pt.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/ru.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/sv.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/tr.ts +217 -217
- package/src/tool/crystal-lattice-structure-finder/i18n/zh.ts +217 -217
- package/src/tool/double-slit-decoherence/i18n/de.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/fr.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/id.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/it.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/ja.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/ko.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/nl.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/pl.ts +181 -181
- package/src/tool/double-slit-decoherence/i18n/pt.ts +178 -174
- package/src/tool/double-slit-decoherence/i18n/ru.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/sv.ts +176 -172
- package/src/tool/double-slit-decoherence/i18n/tr.ts +180 -180
- package/src/tool/double-slit-decoherence/i18n/zh.ts +181 -181
- package/src/tool/dyson-sphere-energy-capture/component.astro +253 -253
- package/src/tool/dyson-sphere-energy-capture/i18n/de.ts +194 -194
- package/src/tool/dyson-sphere-energy-capture/i18n/en.ts +6 -6
- package/src/tool/dyson-sphere-energy-capture/i18n/es.ts +6 -6
- package/src/tool/dyson-sphere-energy-capture/i18n/fr.ts +194 -194
- package/src/tool/dyson-sphere-energy-capture/i18n/id.ts +195 -195
- package/src/tool/dyson-sphere-energy-capture/i18n/it.ts +194 -194
- package/src/tool/dyson-sphere-energy-capture/i18n/ja.ts +194 -190
- package/src/tool/dyson-sphere-energy-capture/i18n/ko.ts +194 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/nl.ts +197 -197
- package/src/tool/dyson-sphere-energy-capture/i18n/pl.ts +168 -166
- package/src/tool/dyson-sphere-energy-capture/i18n/pt.ts +194 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/ru.ts +195 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/sv.ts +195 -193
- package/src/tool/dyson-sphere-energy-capture/i18n/tr.ts +168 -166
- package/src/tool/dyson-sphere-energy-capture/i18n/zh.ts +194 -193
- package/src/tool/epidemic-sir-simulator/i18n/de.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/es.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/fr.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/it.ts +346 -346
- package/src/tool/epidemic-sir-simulator/i18n/nl.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/ru.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/sv.ts +347 -347
- package/src/tool/epidemic-sir-simulator/i18n/zh.ts +347 -347
- package/src/tool/exoplanet-biosignature-detector/i18n/de.ts +186 -186
- package/src/tool/exoplanet-biosignature-detector/i18n/en.ts +195 -195
- package/src/tool/exoplanet-biosignature-detector/i18n/es.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/fr.ts +183 -183
- package/src/tool/exoplanet-biosignature-detector/i18n/id.ts +193 -193
- package/src/tool/exoplanet-biosignature-detector/i18n/it.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/ja.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/ko.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/nl.ts +194 -194
- package/src/tool/exoplanet-biosignature-detector/i18n/pl.ts +144 -144
- package/src/tool/exoplanet-biosignature-detector/i18n/pt.ts +146 -146
- package/src/tool/exoplanet-biosignature-detector/i18n/ru.ts +143 -143
- package/src/tool/exoplanet-biosignature-detector/i18n/sv.ts +144 -144
- package/src/tool/exoplanet-biosignature-detector/i18n/tr.ts +145 -145
- package/src/tool/exoplanet-biosignature-detector/i18n/zh.ts +194 -194
- package/src/tool/global-albedo-snowball-simulator/component.astro +1 -1
- package/src/tool/global-albedo-snowball-simulator/i18n/de.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/fr.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/id.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/it.ts +87 -87
- package/src/tool/global-albedo-snowball-simulator/i18n/ja.ts +87 -87
- package/src/tool/global-albedo-snowball-simulator/i18n/ko.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/nl.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/pl.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/pt.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/ru.ts +165 -161
- package/src/tool/global-albedo-snowball-simulator/i18n/sv.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/tr.ts +169 -169
- package/src/tool/global-albedo-snowball-simulator/i18n/zh.ts +169 -169
- package/src/tool/lorenz-attractor/i18n/de.ts +144 -143
- package/src/tool/lorenz-attractor/i18n/fr.ts +144 -144
- package/src/tool/lorenz-attractor/i18n/id.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/it.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/ja.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/ko.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/nl.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/pl.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/pt.ts +142 -141
- package/src/tool/lorenz-attractor/i18n/ru.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/sv.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/tr.ts +149 -149
- package/src/tool/lorenz-attractor/i18n/zh.ts +149 -149
- package/src/tool/mandelbrot-fractal/i18n/de.ts +158 -158
- package/src/tool/mandelbrot-fractal/i18n/fr.ts +158 -158
- package/src/tool/mandelbrot-fractal/i18n/id.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/it.ts +155 -151
- package/src/tool/mandelbrot-fractal/i18n/ja.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/ko.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/nl.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/pl.ts +157 -153
- package/src/tool/mandelbrot-fractal/i18n/pt.ts +158 -158
- package/src/tool/mandelbrot-fractal/i18n/ru.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/sv.ts +159 -150
- package/src/tool/mandelbrot-fractal/i18n/tr.ts +159 -159
- package/src/tool/mandelbrot-fractal/i18n/zh.ts +159 -159
- package/src/tool/microwave-detector/component.astro +238 -238
- package/src/tool/microwave-detector/i18n/de.ts +1 -1
- package/src/tool/microwave-detector/i18n/en.ts +1 -1
- package/src/tool/microwave-detector/i18n/es.ts +1 -1
- package/src/tool/microwave-detector/i18n/fr.ts +1 -1
- package/src/tool/microwave-detector/i18n/id.ts +1 -1
- package/src/tool/microwave-detector/i18n/it.ts +1 -1
- package/src/tool/microwave-detector/i18n/ja.ts +1 -1
- package/src/tool/microwave-detector/i18n/ko.ts +1 -1
- package/src/tool/microwave-detector/i18n/nl.ts +1 -1
- package/src/tool/microwave-detector/i18n/pl.ts +1 -1
- package/src/tool/microwave-detector/i18n/pt.ts +1 -1
- package/src/tool/microwave-detector/i18n/ru.ts +1 -1
- package/src/tool/microwave-detector/i18n/sv.ts +1 -1
- package/src/tool/microwave-detector/i18n/tr.ts +1 -1
- package/src/tool/microwave-detector/i18n/zh.ts +1 -1
- package/src/tool/microwave-detector/seo.astro +15 -15
- package/src/tool/natural-selection-drift/component.astro +135 -135
- package/src/tool/natural-selection-drift/i18n/de.ts +164 -160
- package/src/tool/natural-selection-drift/i18n/fr.ts +204 -204
- package/src/tool/natural-selection-drift/i18n/id.ts +156 -154
- package/src/tool/natural-selection-drift/i18n/it.ts +197 -193
- package/src/tool/natural-selection-drift/i18n/ja.ts +155 -154
- package/src/tool/natural-selection-drift/i18n/ko.ts +155 -154
- package/src/tool/natural-selection-drift/i18n/nl.ts +164 -163
- package/src/tool/natural-selection-drift/i18n/pl.ts +168 -166
- package/src/tool/natural-selection-drift/i18n/pt.ts +200 -195
- package/src/tool/natural-selection-drift/i18n/ru.ts +186 -184
- package/src/tool/natural-selection-drift/i18n/sv.ts +157 -154
- package/src/tool/natural-selection-drift/i18n/tr.ts +186 -184
- package/src/tool/natural-selection-drift/i18n/zh.ts +160 -154
- package/src/tool/natural-selection-drift/natural-selection-drift.css +563 -563
- package/src/tool/phase-diagram-critical-points/i18n/de.ts +178 -178
- package/src/tool/phase-diagram-critical-points/i18n/fr.ts +178 -178
- package/src/tool/phase-diagram-critical-points/i18n/id.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/it.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/ja.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/ko.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/nl.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/pl.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/pt.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/ru.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/sv.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/tr.ts +179 -179
- package/src/tool/phase-diagram-critical-points/i18n/zh.ts +179 -179
- package/src/tool/planet-atmosphere-survival/i18n/de.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/fr.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/id.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/it.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/ja.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/ko.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/nl.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/pl.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/pt.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/ru.ts +227 -223
- package/src/tool/planet-atmosphere-survival/i18n/sv.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/tr.ts +255 -255
- package/src/tool/planet-atmosphere-survival/i18n/zh.ts +255 -255
- package/src/tool/radioactive-decay/i18n/de.ts +168 -164
- package/src/tool/radioactive-decay/i18n/fr.ts +76 -75
- package/src/tool/radioactive-decay/i18n/id.ts +169 -165
- package/src/tool/radioactive-decay/i18n/it.ts +76 -74
- package/src/tool/radioactive-decay/i18n/ja.ts +168 -167
- package/src/tool/radioactive-decay/i18n/ko.ts +168 -167
- package/src/tool/radioactive-decay/i18n/nl.ts +170 -168
- package/src/tool/radioactive-decay/i18n/pl.ts +170 -168
- package/src/tool/radioactive-decay/i18n/pt.ts +169 -167
- package/src/tool/radioactive-decay/i18n/ru.ts +170 -168
- package/src/tool/radioactive-decay/i18n/sv.ts +170 -168
- package/src/tool/radioactive-decay/i18n/tr.ts +171 -168
- package/src/tool/radioactive-decay/i18n/zh.ts +171 -167
- package/src/tool/roche-limit-satellite-disruption/i18n/de.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/fr.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/id.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/it.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/ja.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/ko.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/nl.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/pl.ts +237 -229
- package/src/tool/roche-limit-satellite-disruption/i18n/pt.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/ru.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/sv.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/tr.ts +241 -241
- package/src/tool/roche-limit-satellite-disruption/i18n/zh.ts +241 -241
- package/src/tool/simulation-probability/component.astro +138 -138
- package/src/tool/simulation-probability/i18n/de.ts +1 -1
- package/src/tool/simulation-probability/i18n/en.ts +1 -1
- package/src/tool/simulation-probability/i18n/es.ts +1 -1
- package/src/tool/simulation-probability/i18n/fr.ts +1 -1
- package/src/tool/simulation-probability/i18n/id.ts +1 -1
- package/src/tool/simulation-probability/i18n/it.ts +1 -1
- package/src/tool/simulation-probability/i18n/ja.ts +1 -1
- package/src/tool/simulation-probability/i18n/ko.ts +1 -1
- package/src/tool/simulation-probability/i18n/nl.ts +1 -1
- package/src/tool/simulation-probability/i18n/pl.ts +1 -1
- package/src/tool/simulation-probability/i18n/pt.ts +1 -1
- package/src/tool/simulation-probability/i18n/ru.ts +1 -1
- package/src/tool/simulation-probability/i18n/sv.ts +1 -1
- package/src/tool/simulation-probability/i18n/tr.ts +1 -1
- package/src/tool/simulation-probability/i18n/zh.ts +1 -1
- package/src/tool/simulation-probability/seo.astro +15 -15
- package/src/tool/stellar-habitability-zone/i18n/ru.ts +189 -189
- package/src/tool/temperature-timeline/i18n/de.ts +2 -1
- package/src/tool/temperature-timeline/i18n/fr.ts +177 -177
- package/src/tool/temperature-timeline/i18n/it.ts +142 -141
- package/src/tool/temperature-timeline/i18n/pt.ts +3 -1
- package/src/tool/temperature-timeline/i18n/ru.ts +116 -114
- package/src/tool/three-body-problem/app.ts +4 -4
- package/src/tool/three-body-problem/component.astro +6 -6
- package/src/tool/twin-paradox-visualizer/i18n/de.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/es.ts +165 -165
- package/src/tool/twin-paradox-visualizer/i18n/fr.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/id.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/it.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/ja.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/ko.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/nl.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/pl.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/pt.ts +164 -160
- package/src/tool/twin-paradox-visualizer/i18n/ru.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/sv.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/tr.ts +168 -168
- package/src/tool/twin-paradox-visualizer/i18n/zh.ts +168 -168
- package/src/types.ts +1 -1
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { ALL_ENTRIES } from '../entries';
|
|
3
|
-
|
|
4
|
-
const STRUCTURAL_KEYS = new Set([
|
|
5
|
-
'id',
|
|
6
|
-
'slug',
|
|
7
|
-
'url',
|
|
8
|
-
'icon',
|
|
9
|
-
'image',
|
|
10
|
-
'imageUrl',
|
|
11
|
-
'keywords',
|
|
12
|
-
'category',
|
|
13
|
-
'tags',
|
|
14
|
-
'toolId',
|
|
15
|
-
'type',
|
|
16
|
-
'locale',
|
|
17
|
-
'language',
|
|
18
|
-
'direction',
|
|
19
|
-
]);
|
|
20
|
-
|
|
21
|
-
const TRANSLATABLE_KEYS = [
|
|
22
|
-
'title',
|
|
23
|
-
'description',
|
|
24
|
-
'faqTitle',
|
|
25
|
-
'faq',
|
|
26
|
-
'howTo',
|
|
27
|
-
'seo',
|
|
28
|
-
'schemas',
|
|
29
|
-
] as const;
|
|
30
|
-
|
|
31
|
-
const COPY_THRESHOLD = 0.9;
|
|
32
|
-
|
|
33
|
-
const SPANISH_MARKERS = [
|
|
34
|
-
['sangre', /\bsangre\b/gi],
|
|
35
|
-
['molino', /\bmolino\b/gi],
|
|
36
|
-
['grano', /\bgrano\b/gi],
|
|
37
|
-
['paladar', /\bpaladar\b/gi],
|
|
38
|
-
['cuchillas', /\bcuchillas\b/gi],
|
|
39
|
-
['trozos', /\btrozos\b/gi],
|
|
40
|
-
['frescura', /\bfrescura\b/gi],
|
|
41
|
-
['ingresa', /\bingresa\b/gi],
|
|
42
|
-
['selecciona', /\bselecciona\b/gi],
|
|
43
|
-
['herramienta', /\bherramienta\b/gi],
|
|
44
|
-
['según', /\bsegún\b/gi],
|
|
45
|
-
['después', /\bdespués\b/gi],
|
|
46
|
-
['puedes', /\bpuedes\b/gi],
|
|
47
|
-
['debes', /\bdebes\b/gi],
|
|
48
|
-
['tus', /\btus\b/gi],
|
|
49
|
-
['a la vez', /\ba la vez\b/gi],
|
|
50
|
-
['los datos', /\blos datos\b/gi],
|
|
51
|
-
['las opciones', /\blas opciones\b/gi],
|
|
52
|
-
['el resultado', /\bel resultado\b/gi],
|
|
53
|
-
['método de extracción', /\bmétodo de extracción\b/gi],
|
|
54
|
-
['uniformidad del molino', /\buniformidad del molino\b/gi],
|
|
55
|
-
['café recién tostado', /\bcafé recién tostado\b/gi],
|
|
56
|
-
] as const;
|
|
57
|
-
|
|
58
|
-
type UnknownRecord = Record<string, unknown>;
|
|
59
|
-
|
|
60
|
-
function normalize(value: string): string {
|
|
61
|
-
return value
|
|
62
|
-
.replace(/<[^>]*>/g, ' ')
|
|
63
|
-
.replace(/ /gi, ' ')
|
|
64
|
-
.replace(/\s+/g, ' ')
|
|
65
|
-
.trim()
|
|
66
|
-
.toLocaleLowerCase('es');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function isTechnicalInvariant(text: string): boolean {
|
|
70
|
-
const ledUnitMatches = text.match(/\b\d+(?:-\d+)?\s*(?:w|lm)\b/g) ?? [];
|
|
71
|
-
return [
|
|
72
|
-
'data:image/svg+xml;base64',
|
|
73
|
-
'background-image: url',
|
|
74
|
-
'.layout-playground {',
|
|
75
|
-
'const samplerate =',
|
|
76
|
-
].some((pattern) => text.includes(pattern)) ||
|
|
77
|
-
(text.includes('presets') && text.includes('hz')) ||
|
|
78
|
-
(text.includes('t_rectal') && text.includes('exp(-k * t)')) ||
|
|
79
|
-
(text.includes('led') && ledUnitMatches.length >= 3);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function collectString(value: string, output: string[]): void {
|
|
83
|
-
const text = normalize(value);
|
|
84
|
-
if (!isTechnicalInvariant(text) && text.length >= 20) output.push(text);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function collectObject(value: UnknownRecord, output: string[]): void {
|
|
88
|
-
Object.entries(value).forEach(([childKey, childValue]) => {
|
|
89
|
-
collectText(childValue, output, childKey);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function collectText(value: unknown, output: string[], key?: string): void {
|
|
94
|
-
if (key && STRUCTURAL_KEYS.has(key)) return;
|
|
95
|
-
if (typeof value === 'string') return collectString(value, output);
|
|
96
|
-
if (Array.isArray(value)) return value.forEach((item) => collectText(item, output));
|
|
97
|
-
if (value && typeof value === 'object') collectObject(value as UnknownRecord, output);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
async function loadText(loader: unknown): Promise<string[]> {
|
|
101
|
-
if (typeof loader !== 'function') return [];
|
|
102
|
-
const module = await (loader as () => Promise<unknown>)();
|
|
103
|
-
const output: string[] = [];
|
|
104
|
-
if (module && typeof module === 'object') {
|
|
105
|
-
const record = module as UnknownRecord;
|
|
106
|
-
for (const key of TRANSLATABLE_KEYS) {
|
|
107
|
-
collectText(record[key], output, key);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return output;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function findSpanishMarkers(text: string[]): string[] {
|
|
114
|
-
const corpus = text.join(' ');
|
|
115
|
-
return SPANISH_MARKERS.flatMap(([label, pattern]) =>
|
|
116
|
-
pattern.test(corpus) ? [label] : [],
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function similarity(left: string, right: string): number {
|
|
121
|
-
const leftTokens = left.split(/\s+/);
|
|
122
|
-
const rightCounts = new Map<string, number>();
|
|
123
|
-
right.split(/\s+/).forEach((token) => rightCounts.set(token, (rightCounts.get(token) ?? 0) + 1));
|
|
124
|
-
const matches = leftTokens.reduce((total, token) => {
|
|
125
|
-
const count = rightCounts.get(token) ?? 0;
|
|
126
|
-
if (count > 0) rightCounts.set(token, count - 1);
|
|
127
|
-
return total + (count > 0 ? 1 : 0);
|
|
128
|
-
}, 0);
|
|
129
|
-
return (2 * matches) / (leftTokens.length + right.split(/\s+/).length);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function findCopiedFragments(spanish: string[], translated: string[]): string[] {
|
|
133
|
-
return spanish
|
|
134
|
-
.filter((fragment) => fragment.length >= 80)
|
|
135
|
-
.filter((fragment) => translated.some((candidate) =>
|
|
136
|
-
candidate.length >= 80 &&
|
|
137
|
-
Math.min(fragment.length, candidate.length) / Math.max(fragment.length, candidate.length) >= COPY_THRESHOLD &&
|
|
138
|
-
similarity(fragment, candidate) >= COPY_THRESHOLD,
|
|
139
|
-
))
|
|
140
|
-
.sort((a, b) => b.length - a.length)
|
|
141
|
-
.slice(0, 3);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
describe('Locales must not contain copied Spanish content', () => {
|
|
145
|
-
for (const entry of ALL_ENTRIES) {
|
|
146
|
-
it(`${entry.id} has no untranslated Spanish blocks`, async () => {
|
|
147
|
-
const spanish = await loadText(entry.i18n.es);
|
|
148
|
-
const failures: string[] = [];
|
|
149
|
-
|
|
150
|
-
for (const [locale, loader] of Object.entries(entry.i18n)) {
|
|
151
|
-
if (locale === 'es') continue;
|
|
152
|
-
|
|
153
|
-
const translated = await loadText(loader);
|
|
154
|
-
const copiedFragments = findCopiedFragments(spanish, translated);
|
|
155
|
-
const markerHits = findSpanishMarkers(translated);
|
|
156
|
-
|
|
157
|
-
if (copiedFragments.length > 0 || markerHits.length >= 2) {
|
|
158
|
-
const details = [
|
|
159
|
-
copiedFragments.length > 0
|
|
160
|
-
? `copied fragments: ${copiedFragments
|
|
161
|
-
.map((fragment) => JSON.stringify(fragment.slice(0, 120)))
|
|
162
|
-
.join(', ')}`
|
|
163
|
-
: '',
|
|
164
|
-
markerHits.length >= 2 ? `Spanish markers: ${markerHits.join(', ')}` : '',
|
|
165
|
-
]
|
|
166
|
-
.filter(Boolean)
|
|
167
|
-
.join('; ');
|
|
168
|
-
failures.push(`${locale}: ${details}`);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
expect(failures, failures.join('\n')).toEqual([]);
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
});
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { ALL_ENTRIES } from '../entries';
|
|
3
|
+
|
|
4
|
+
const STRUCTURAL_KEYS = new Set([
|
|
5
|
+
'id',
|
|
6
|
+
'slug',
|
|
7
|
+
'url',
|
|
8
|
+
'icon',
|
|
9
|
+
'image',
|
|
10
|
+
'imageUrl',
|
|
11
|
+
'keywords',
|
|
12
|
+
'category',
|
|
13
|
+
'tags',
|
|
14
|
+
'toolId',
|
|
15
|
+
'type',
|
|
16
|
+
'locale',
|
|
17
|
+
'language',
|
|
18
|
+
'direction',
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
const TRANSLATABLE_KEYS = [
|
|
22
|
+
'title',
|
|
23
|
+
'description',
|
|
24
|
+
'faqTitle',
|
|
25
|
+
'faq',
|
|
26
|
+
'howTo',
|
|
27
|
+
'seo',
|
|
28
|
+
'schemas',
|
|
29
|
+
] as const;
|
|
30
|
+
|
|
31
|
+
const COPY_THRESHOLD = 0.9;
|
|
32
|
+
|
|
33
|
+
const SPANISH_MARKERS = [
|
|
34
|
+
['sangre', /\bsangre\b/gi],
|
|
35
|
+
['molino', /\bmolino\b/gi],
|
|
36
|
+
['grano', /\bgrano\b/gi],
|
|
37
|
+
['paladar', /\bpaladar\b/gi],
|
|
38
|
+
['cuchillas', /\bcuchillas\b/gi],
|
|
39
|
+
['trozos', /\btrozos\b/gi],
|
|
40
|
+
['frescura', /\bfrescura\b/gi],
|
|
41
|
+
['ingresa', /\bingresa\b/gi],
|
|
42
|
+
['selecciona', /\bselecciona\b/gi],
|
|
43
|
+
['herramienta', /\bherramienta\b/gi],
|
|
44
|
+
['según', /\bsegún\b/gi],
|
|
45
|
+
['después', /\bdespués\b/gi],
|
|
46
|
+
['puedes', /\bpuedes\b/gi],
|
|
47
|
+
['debes', /\bdebes\b/gi],
|
|
48
|
+
['tus', /\btus\b/gi],
|
|
49
|
+
['a la vez', /\ba la vez\b/gi],
|
|
50
|
+
['los datos', /\blos datos\b/gi],
|
|
51
|
+
['las opciones', /\blas opciones\b/gi],
|
|
52
|
+
['el resultado', /\bel resultado\b/gi],
|
|
53
|
+
['método de extracción', /\bmétodo de extracción\b/gi],
|
|
54
|
+
['uniformidad del molino', /\buniformidad del molino\b/gi],
|
|
55
|
+
['café recién tostado', /\bcafé recién tostado\b/gi],
|
|
56
|
+
] as const;
|
|
57
|
+
|
|
58
|
+
type UnknownRecord = Record<string, unknown>;
|
|
59
|
+
|
|
60
|
+
function normalize(value: string): string {
|
|
61
|
+
return value
|
|
62
|
+
.replace(/<[^>]*>/g, ' ')
|
|
63
|
+
.replace(/ /gi, ' ')
|
|
64
|
+
.replace(/\s+/g, ' ')
|
|
65
|
+
.trim()
|
|
66
|
+
.toLocaleLowerCase('es');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function isTechnicalInvariant(text: string): boolean {
|
|
70
|
+
const ledUnitMatches = text.match(/\b\d+(?:-\d+)?\s*(?:w|lm)\b/g) ?? [];
|
|
71
|
+
return [
|
|
72
|
+
'data:image/svg+xml;base64',
|
|
73
|
+
'background-image: url',
|
|
74
|
+
'.layout-playground {',
|
|
75
|
+
'const samplerate =',
|
|
76
|
+
].some((pattern) => text.includes(pattern)) ||
|
|
77
|
+
(text.includes('presets') && text.includes('hz')) ||
|
|
78
|
+
(text.includes('t_rectal') && text.includes('exp(-k * t)')) ||
|
|
79
|
+
(text.includes('led') && ledUnitMatches.length >= 3);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function collectString(value: string, output: string[]): void {
|
|
83
|
+
const text = normalize(value);
|
|
84
|
+
if (!isTechnicalInvariant(text) && text.length >= 20) output.push(text);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function collectObject(value: UnknownRecord, output: string[]): void {
|
|
88
|
+
Object.entries(value).forEach(([childKey, childValue]) => {
|
|
89
|
+
collectText(childValue, output, childKey);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function collectText(value: unknown, output: string[], key?: string): void {
|
|
94
|
+
if (key && STRUCTURAL_KEYS.has(key)) return;
|
|
95
|
+
if (typeof value === 'string') return collectString(value, output);
|
|
96
|
+
if (Array.isArray(value)) return value.forEach((item) => collectText(item, output));
|
|
97
|
+
if (value && typeof value === 'object') collectObject(value as UnknownRecord, output);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async function loadText(loader: unknown): Promise<string[]> {
|
|
101
|
+
if (typeof loader !== 'function') return [];
|
|
102
|
+
const module = await (loader as () => Promise<unknown>)();
|
|
103
|
+
const output: string[] = [];
|
|
104
|
+
if (module && typeof module === 'object') {
|
|
105
|
+
const record = module as UnknownRecord;
|
|
106
|
+
for (const key of TRANSLATABLE_KEYS) {
|
|
107
|
+
collectText(record[key], output, key);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return output;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function findSpanishMarkers(text: string[]): string[] {
|
|
114
|
+
const corpus = text.join(' ');
|
|
115
|
+
return SPANISH_MARKERS.flatMap(([label, pattern]) =>
|
|
116
|
+
pattern.test(corpus) ? [label] : [],
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function similarity(left: string, right: string): number {
|
|
121
|
+
const leftTokens = left.split(/\s+/);
|
|
122
|
+
const rightCounts = new Map<string, number>();
|
|
123
|
+
right.split(/\s+/).forEach((token) => rightCounts.set(token, (rightCounts.get(token) ?? 0) + 1));
|
|
124
|
+
const matches = leftTokens.reduce((total, token) => {
|
|
125
|
+
const count = rightCounts.get(token) ?? 0;
|
|
126
|
+
if (count > 0) rightCounts.set(token, count - 1);
|
|
127
|
+
return total + (count > 0 ? 1 : 0);
|
|
128
|
+
}, 0);
|
|
129
|
+
return (2 * matches) / (leftTokens.length + right.split(/\s+/).length);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function findCopiedFragments(spanish: string[], translated: string[]): string[] {
|
|
133
|
+
return spanish
|
|
134
|
+
.filter((fragment) => fragment.length >= 80)
|
|
135
|
+
.filter((fragment) => translated.some((candidate) =>
|
|
136
|
+
candidate.length >= 80 &&
|
|
137
|
+
Math.min(fragment.length, candidate.length) / Math.max(fragment.length, candidate.length) >= COPY_THRESHOLD &&
|
|
138
|
+
similarity(fragment, candidate) >= COPY_THRESHOLD,
|
|
139
|
+
))
|
|
140
|
+
.sort((a, b) => b.length - a.length)
|
|
141
|
+
.slice(0, 3);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
describe('Locales must not contain copied Spanish content', () => {
|
|
145
|
+
for (const entry of ALL_ENTRIES) {
|
|
146
|
+
it(`${entry.id} has no untranslated Spanish blocks`, async () => {
|
|
147
|
+
const spanish = await loadText(entry.i18n.es);
|
|
148
|
+
const failures: string[] = [];
|
|
149
|
+
|
|
150
|
+
for (const [locale, loader] of Object.entries(entry.i18n)) {
|
|
151
|
+
if (locale === 'es') continue;
|
|
152
|
+
|
|
153
|
+
const translated = await loadText(loader);
|
|
154
|
+
const copiedFragments = findCopiedFragments(spanish, translated);
|
|
155
|
+
const markerHits = findSpanishMarkers(translated);
|
|
156
|
+
|
|
157
|
+
if (copiedFragments.length > 0 || markerHits.length >= 2) {
|
|
158
|
+
const details = [
|
|
159
|
+
copiedFragments.length > 0
|
|
160
|
+
? `copied fragments: ${copiedFragments
|
|
161
|
+
.map((fragment) => JSON.stringify(fragment.slice(0, 120)))
|
|
162
|
+
.join(', ')}`
|
|
163
|
+
: '',
|
|
164
|
+
markerHits.length >= 2 ? `Spanish markers: ${markerHits.join(', ')}` : '',
|
|
165
|
+
]
|
|
166
|
+
.filter(Boolean)
|
|
167
|
+
.join('; ');
|
|
168
|
+
failures.push(`${locale}: ${details}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
expect(failures, failures.join('\n')).toEqual([]);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
});
|