@jjlmoya/utils-science 1.18.0 → 1.20.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 (99) hide show
  1. package/package.json +1 -1
  2. package/src/pages/[locale]/[slug].astro +30 -14
  3. package/src/tests/locale_completeness.test.ts +3 -20
  4. package/src/tests/shared-test-helpers.ts +56 -0
  5. package/src/tests/tool_exports.test.ts +34 -0
  6. package/src/tool/asteroid-impact/asteroid-impact-simulator.css +2 -2
  7. package/src/tool/asteroid-impact/bibliography.astro +1 -1
  8. package/src/tool/asteroid-impact/bibliography.ts +24 -0
  9. package/src/tool/asteroid-impact/i18n/de.ts +4 -24
  10. package/src/tool/asteroid-impact/i18n/en.ts +4 -24
  11. package/src/tool/asteroid-impact/i18n/es.ts +4 -24
  12. package/src/tool/asteroid-impact/i18n/fr.ts +4 -24
  13. package/src/tool/asteroid-impact/i18n/id.ts +4 -24
  14. package/src/tool/asteroid-impact/i18n/it.ts +4 -24
  15. package/src/tool/asteroid-impact/i18n/ja.ts +4 -24
  16. package/src/tool/asteroid-impact/i18n/ko.ts +4 -24
  17. package/src/tool/asteroid-impact/i18n/nl.ts +4 -24
  18. package/src/tool/asteroid-impact/i18n/pl.ts +4 -24
  19. package/src/tool/asteroid-impact/i18n/pt.ts +4 -24
  20. package/src/tool/asteroid-impact/i18n/ru.ts +4 -24
  21. package/src/tool/asteroid-impact/i18n/sv.ts +4 -24
  22. package/src/tool/asteroid-impact/i18n/tr.ts +4 -24
  23. package/src/tool/asteroid-impact/i18n/zh.ts +4 -24
  24. package/src/tool/asteroid-impact/seo.astro +1 -1
  25. package/src/tool/cellular-renewal/bibliography.astro +1 -1
  26. package/src/tool/cellular-renewal/bibliography.ts +24 -0
  27. package/src/tool/cellular-renewal/i18n/de.ts +3 -24
  28. package/src/tool/cellular-renewal/i18n/en.ts +3 -24
  29. package/src/tool/cellular-renewal/i18n/es.ts +3 -24
  30. package/src/tool/cellular-renewal/i18n/fr.ts +3 -24
  31. package/src/tool/cellular-renewal/i18n/id.ts +3 -24
  32. package/src/tool/cellular-renewal/i18n/it.ts +3 -24
  33. package/src/tool/cellular-renewal/i18n/ja.ts +3 -24
  34. package/src/tool/cellular-renewal/i18n/ko.ts +3 -24
  35. package/src/tool/cellular-renewal/i18n/nl.ts +3 -24
  36. package/src/tool/cellular-renewal/i18n/pl.ts +3 -24
  37. package/src/tool/cellular-renewal/i18n/pt.ts +3 -24
  38. package/src/tool/cellular-renewal/i18n/ru.ts +3 -24
  39. package/src/tool/cellular-renewal/i18n/sv.ts +3 -24
  40. package/src/tool/cellular-renewal/i18n/tr.ts +3 -24
  41. package/src/tool/cellular-renewal/i18n/zh.ts +3 -24
  42. package/src/tool/cellular-renewal/seo.astro +2 -1
  43. package/src/tool/colony-counter/bibliography.astro +1 -1
  44. package/src/tool/colony-counter/bibliography.ts +12 -0
  45. package/src/tool/colony-counter/colony-counter.css +3 -3
  46. package/src/tool/colony-counter/i18n/de.ts +3 -12
  47. package/src/tool/colony-counter/i18n/en.ts +3 -12
  48. package/src/tool/colony-counter/i18n/es.ts +3 -12
  49. package/src/tool/colony-counter/i18n/fr.ts +3 -12
  50. package/src/tool/colony-counter/i18n/id.ts +3 -12
  51. package/src/tool/colony-counter/i18n/it.ts +3 -12
  52. package/src/tool/colony-counter/i18n/ja.ts +3 -12
  53. package/src/tool/colony-counter/i18n/ko.ts +3 -12
  54. package/src/tool/colony-counter/i18n/nl.ts +3 -12
  55. package/src/tool/colony-counter/i18n/pl.ts +3 -12
  56. package/src/tool/colony-counter/i18n/pt.ts +3 -12
  57. package/src/tool/colony-counter/i18n/ru.ts +3 -12
  58. package/src/tool/colony-counter/i18n/sv.ts +3 -12
  59. package/src/tool/colony-counter/i18n/tr.ts +3 -12
  60. package/src/tool/colony-counter/i18n/zh.ts +3 -12
  61. package/src/tool/colony-counter/seo.astro +1 -1
  62. package/src/tool/microwave-detector/bibliography.astro +1 -1
  63. package/src/tool/microwave-detector/bibliography.ts +16 -0
  64. package/src/tool/microwave-detector/i18n/de.ts +3 -16
  65. package/src/tool/microwave-detector/i18n/en.ts +3 -16
  66. package/src/tool/microwave-detector/i18n/es.ts +3 -16
  67. package/src/tool/microwave-detector/i18n/fr.ts +3 -16
  68. package/src/tool/microwave-detector/i18n/id.ts +3 -16
  69. package/src/tool/microwave-detector/i18n/it.ts +3 -16
  70. package/src/tool/microwave-detector/i18n/ja.ts +3 -16
  71. package/src/tool/microwave-detector/i18n/ko.ts +3 -16
  72. package/src/tool/microwave-detector/i18n/nl.ts +3 -16
  73. package/src/tool/microwave-detector/i18n/pl.ts +3 -16
  74. package/src/tool/microwave-detector/i18n/pt.ts +3 -16
  75. package/src/tool/microwave-detector/i18n/ru.ts +3 -16
  76. package/src/tool/microwave-detector/i18n/sv.ts +3 -16
  77. package/src/tool/microwave-detector/i18n/tr.ts +3 -16
  78. package/src/tool/microwave-detector/i18n/zh.ts +3 -16
  79. package/src/tool/microwave-detector/microwave-leak-detector.css +22 -25
  80. package/src/tool/microwave-detector/seo.astro +2 -1
  81. package/src/tool/simulation-probability/bibliography.astro +1 -1
  82. package/src/tool/simulation-probability/bibliography.ts +24 -0
  83. package/src/tool/simulation-probability/i18n/de.ts +3 -24
  84. package/src/tool/simulation-probability/i18n/en.ts +3 -24
  85. package/src/tool/simulation-probability/i18n/es.ts +3 -24
  86. package/src/tool/simulation-probability/i18n/fr.ts +3 -24
  87. package/src/tool/simulation-probability/i18n/id.ts +3 -24
  88. package/src/tool/simulation-probability/i18n/it.ts +3 -24
  89. package/src/tool/simulation-probability/i18n/ja.ts +3 -24
  90. package/src/tool/simulation-probability/i18n/ko.ts +3 -24
  91. package/src/tool/simulation-probability/i18n/nl.ts +3 -24
  92. package/src/tool/simulation-probability/i18n/pl.ts +3 -24
  93. package/src/tool/simulation-probability/i18n/pt.ts +3 -24
  94. package/src/tool/simulation-probability/i18n/ru.ts +3 -24
  95. package/src/tool/simulation-probability/i18n/sv.ts +3 -24
  96. package/src/tool/simulation-probability/i18n/tr.ts +3 -24
  97. package/src/tool/simulation-probability/i18n/zh.ts +3 -24
  98. package/src/tool/simulation-probability/seo.astro +2 -1
  99. package/src/types.ts +0 -2
@@ -41,14 +41,13 @@ const faq = [
41
41
  answer: 'Bilgisayarın geleceği hakkındaki inançlarınıza bağlıdır. Düşük değerler (100-1000) kaynak kısıtlamalarını varsayar. Yüksek değerler (milyonlar) pratik olarak sınırsız hesaplama gücü varsayar. Çoğu bilimsel tartışma 1000 ile 1 trilyon arasındaki değerleri kullanır.',
42
42
  },
43
43
  ];
44
+ import { bibliography } from '../bibliography';
44
45
  import type { ToolLocaleContent } from '../../../types';
45
46
 
46
47
  export const content: ToolLocaleContent = {
47
48
  slug,
48
49
  title,
49
50
  description,
50
- faqTitle: 'Sıkça Sorulan Sorular',
51
- bibliographyTitle: 'Kaynakça',
52
51
  ui: {
53
52
  copied: 'Kopyalandı',
54
53
  noHistory: 'Geçmiş yok',
@@ -167,28 +166,7 @@ export const content: ToolLocaleContent = {
167
166
  },
168
167
  ],
169
168
  faq,
170
- bibliography: [
171
- {
172
- name: 'Bostrom, N. (2003). Are You Living in a Computer Simulation? The Philosophical Quarterly, 53(211), 243-255.',
173
- url: 'https://www.nickbostrom.com/sim.html',
174
- },
175
- {
176
- name: 'Chalmers, D. J. (2005). The Matrix as Metaphysics. Science Fiction and Philosophy, 132-142.',
177
- url: 'https://consc.net/papers/matrix.html',
178
- },
179
- {
180
- name: 'Gefter, A. (2014). The Man Who Tried to Redeem the World with Logic: The Life and Work of Kurt Gödel. Nautilus Magazine.',
181
- url: 'https://nautil.us/articles/the-man-who-tried-to-redeem-the-world-with-logic',
182
- },
183
- {
184
- name: 'Tegmark, M. (2014). Our Mathematical Universe: My Quest for the Ultimate Nature of Reality. Knopf.',
185
- url: 'https://space.mit.edu/home/tegmark/mathematical-universe.html',
186
- },
187
- {
188
- name: 'Tyson, N. deG. (2014). Welcome to the Universe: An Astrophysical Tour. Princeton University Press.',
189
- url: 'https://www.haydenplanetarium.org/',
190
- },
191
- ],
169
+ bibliography,
192
170
  howTo,
193
171
 
194
172
  schemas: [
@@ -224,3 +202,4 @@ export const content: ToolLocaleContent = {
224
202
  },
225
203
  ],
226
204
  };
205
+
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { ToolLocaleContent } from '../../../types';
2
3
 
3
4
  const slug = 'simulation-probability-calculator';
@@ -50,8 +51,6 @@ export const content: ToolLocaleContent = {
50
51
  slug,
51
52
  title,
52
53
  description,
53
- faqTitle: '常见问题',
54
- bibliographyTitle: '参考文献',
55
54
  ui: {
56
55
  copied: '已复制',
57
56
  noHistory: '暂无历史记录',
@@ -169,28 +168,7 @@ export const content: ToolLocaleContent = {
169
168
  },
170
169
  ],
171
170
  faq,
172
- bibliography: [
173
- {
174
- name: 'Bostrom, N. (2003). Are You Living in a Computer Simulation? The Philosophical Quarterly, 53(211), 243-255.',
175
- url: 'https://www.nickbostrom.com/sim.html',
176
- },
177
- {
178
- name: 'Chalmers, D. J. (2005). The Matrix as Metaphysics. Science Fiction and Philosophy, 132-142.',
179
- url: 'https://consc.net/papers/matrix.html',
180
- },
181
- {
182
- name: 'Gefter, A. (2014). The Man Who Tried to Redeem the World with Logic: The Life and Work of Kurt Gödel. Nautilus Magazine.',
183
- url: 'https://nautil.us/articles/the-man-who-tried-to-redeem-the-world-with-logic',
184
- },
185
- {
186
- name: 'Tegmark, M. (2014). Our Mathematical Universe: My Quest for the Ultimate Nature of Reality. Knopf.',
187
- url: 'https://space.mit.edu/home/tegmark/mathematical-universe.html',
188
- },
189
- {
190
- name: 'Tyson, N. deG. (2014). Welcome to the Universe: An Astrophysical Tour. Princeton University Press.',
191
- url: 'https://www.haydenplanetarium.org/',
192
- },
193
- ],
171
+ bibliography,
194
172
  howTo,
195
173
  schemas: [
196
174
  {
@@ -225,3 +203,4 @@ export const content: ToolLocaleContent = {
225
203
  },
226
204
  ],
227
205
  };
206
+
@@ -9,6 +9,7 @@ interface Props {
9
9
 
10
10
  const { locale = 'es' } = Astro.props;
11
11
  const content = await simulationProbability.i18n[locale]?.();
12
+ if (!content) return null;
12
13
  ---
13
14
 
14
- {content && <SEORenderer content={{ sections: content.seo, locale }} />}
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
package/src/types.ts CHANGED
@@ -29,9 +29,7 @@ export interface ToolLocaleContent<TUI extends Record<string, string> = Record<s
29
29
  description: string;
30
30
  ui: TUI;
31
31
  seo: SEOSection[];
32
- faqTitle?: string;
33
32
  faq: FAQItem[];
34
- bibliographyTitle?: string;
35
33
  bibliography: BibliographyEntry[];
36
34
  howTo: HowToStep[];
37
35
  schemas: WithContext<Thing>[];