@jjlmoya/utils-aquarium 1.59.0 → 1.61.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 (65) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +2 -1
  3. package/src/entries.ts +4 -1
  4. package/src/index.ts +2 -0
  5. package/src/tests/i18n_coverage.test.ts +1 -1
  6. package/src/tests/registry_contract.test.ts +67 -0
  7. package/src/tests/tool_validation.test.ts +4 -3
  8. package/src/tool/aquariumEvaporationTopOffPlanner/aquarium-evaporation-top-off-planner.css +490 -0
  9. package/src/tool/aquariumEvaporationTopOffPlanner/bibliography.astro +6 -0
  10. package/src/tool/aquariumEvaporationTopOffPlanner/bibliography.ts +10 -0
  11. package/src/tool/aquariumEvaporationTopOffPlanner/component.astro +61 -0
  12. package/src/tool/aquariumEvaporationTopOffPlanner/controller.ts +232 -0
  13. package/src/tool/aquariumEvaporationTopOffPlanner/dom-views.ts +39 -0
  14. package/src/tool/aquariumEvaporationTopOffPlanner/entry.ts +27 -0
  15. package/src/tool/aquariumEvaporationTopOffPlanner/evaluator.ts +9 -0
  16. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/de.ts +3 -0
  17. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/en.ts +179 -0
  18. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/es.ts +3 -0
  19. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/fr.ts +3 -0
  20. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/id.ts +3 -0
  21. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/it.ts +3 -0
  22. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/ja.ts +3 -0
  23. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/ko.ts +3 -0
  24. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/nl.ts +3 -0
  25. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/pl.ts +3 -0
  26. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/pt.ts +3 -0
  27. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/ru.ts +3 -0
  28. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/shared.ts +79 -0
  29. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/sv.ts +3 -0
  30. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/tr.ts +3 -0
  31. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/translations.ts +509 -0
  32. package/src/tool/aquariumEvaporationTopOffPlanner/i18n/zh.ts +3 -0
  33. package/src/tool/aquariumEvaporationTopOffPlanner/index.ts +11 -0
  34. package/src/tool/aquariumEvaporationTopOffPlanner/logic.test.ts +61 -0
  35. package/src/tool/aquariumEvaporationTopOffPlanner/logic.ts +102 -0
  36. package/src/tool/aquariumEvaporationTopOffPlanner/seo.astro +13 -0
  37. package/src/tool/aquariumEvaporationTopOffPlanner/storage.ts +28 -0
  38. package/src/tool/aquariumEvaporationTopOffPlanner/ui.ts +49 -0
  39. package/src/tool/aquariumLightingPhotoperiodPlanner/aquarium-lighting-photoperiod-planner.css +9 -9
  40. package/src/tool/aquariumLightingPhotoperiodPlanner/component.astro +3 -1
  41. package/src/tool/aquariumLightingPhotoperiodPlanner/controller.ts +21 -9
  42. package/src/tool/aquariumLightingPhotoperiodPlanner/dom-views.test.ts +2 -1
  43. package/src/tool/aquariumLightingPhotoperiodPlanner/dom-views.ts +20 -8
  44. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/de.ts +2 -0
  45. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/en.ts +2 -0
  46. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/es.ts +2 -0
  47. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/fr.ts +2 -0
  48. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/id.ts +2 -0
  49. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/it.ts +2 -0
  50. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/ja.ts +2 -0
  51. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/ko.ts +2 -0
  52. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/nl.ts +2 -0
  53. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/pl.ts +2 -0
  54. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/pt.ts +2 -0
  55. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/ru.ts +2 -0
  56. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/sv.ts +2 -0
  57. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/tr.ts +2 -0
  58. package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/zh.ts +4 -2
  59. package/src/tool/aquariumLightingPhotoperiodPlanner/logic.test.ts +10 -0
  60. package/src/tool/aquariumLightingPhotoperiodPlanner/logic.ts +10 -0
  61. package/src/tool/aquariumLightingPhotoperiodPlanner/storage.ts +12 -8
  62. package/src/tool/aquariumLightingPhotoperiodPlanner/ui.ts +2 -0
  63. package/src/tool/aquariumTankVolumeWaterChangeCalculator/i18n/fr.ts +1 -1
  64. package/src/tool/aquariumTankVolumeWaterChangeCalculator/i18n/it.ts +1 -1
  65. package/src/tools.ts +6 -0
@@ -0,0 +1,79 @@
1
+ import type { FAQPage, HowTo, SoftwareApplication, WithContext } from 'schema-dts';
2
+ import type { SEOSection, ToolLocaleContent } from '../../../types';
3
+ import { bibliography } from '../bibliography';
4
+ import type { AquariumEvaporationTopOffPlannerUI } from '../ui';
5
+
6
+ export interface LocalizedCopy {
7
+ language: string;
8
+ slug: string;
9
+ title: string;
10
+ description: string;
11
+ ui: AquariumEvaporationTopOffPlannerUI;
12
+ seo: SEOSection[];
13
+ faq: Array<{ question: string; answer: string }>;
14
+ howTo: Array<{ name: string; text: string }>;
15
+ }
16
+
17
+ const uiKeys = [
18
+ 'unitsLabel', 'metricLabel', 'imperialLabel', 'tankVolumeLabel', 'measuredLossLabel',
19
+ 'lossUnitLabel', 'observationDaysLabel', 'refillIntervalLabel', 'reservoirCapacityLabel',
20
+ 'advancedLabel', 'waterTypeLabel', 'freshwaterLabel', 'marineLabel', 'startingSalinityLabel',
21
+ 'estimatedSalinityLabel', 'reservoirDaysLabel', 'criticalAlert', 'volumeHint', 'lossHint',
22
+ 'intervalHint', 'resultTitle', 'dailyLossLabel', 'dailyRateLabel', 'nextRefillLabel',
23
+ 'thirtyDayLabel', 'levelAfterIntervalLabel', 'twoPercentDaysLabel', 'scheduleTitle',
24
+ 'dayLabel', 'topOffLabel', 'everyLabel', 'levelLabel', 'stableStatus', 'watchStatus',
25
+ 'frequentStatus', 'emptyState', 'invalidState', 'measurementNote', 'saltwaterNote',
26
+ 'resetLabel', 'litreUnit', 'gallonUnit', 'millilitreUnit', 'fluidOunceUnit', 'dayUnit',
27
+ 'percentUnit',
28
+ ] as const;
29
+
30
+ export function makeUi(values: readonly string[]): AquariumEvaporationTopOffPlannerUI {
31
+ return Object.fromEntries(uiKeys.map((key, index) => [key, values[index] ?? ''])) as AquariumEvaporationTopOffPlannerUI;
32
+ }
33
+
34
+ export function buildContent(copy: LocalizedCopy): ToolLocaleContent<AquariumEvaporationTopOffPlannerUI> {
35
+ const faqSchema: WithContext<FAQPage> = {
36
+ '@context': 'https://schema.org',
37
+ '@type': 'FAQPage',
38
+ inLanguage: copy.language,
39
+ mainEntity: copy.faq.map((item) => ({
40
+ '@type': 'Question',
41
+ name: item.question,
42
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
43
+ })),
44
+ };
45
+ const howToSchema: WithContext<HowTo> = {
46
+ '@context': 'https://schema.org',
47
+ '@type': 'HowTo',
48
+ inLanguage: copy.language,
49
+ name: copy.title,
50
+ step: copy.howTo.map((step, index) => ({
51
+ '@type': 'HowToStep',
52
+ position: index + 1,
53
+ name: step.name,
54
+ text: step.text,
55
+ })),
56
+ };
57
+ const appSchema: WithContext<SoftwareApplication> = {
58
+ '@context': 'https://schema.org',
59
+ '@type': 'SoftwareApplication',
60
+ inLanguage: copy.language,
61
+ name: copy.title,
62
+ applicationCategory: 'UtilitiesApplication',
63
+ operatingSystem: 'Web',
64
+ description: copy.description,
65
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
66
+ };
67
+
68
+ return {
69
+ slug: copy.slug,
70
+ title: copy.title,
71
+ description: copy.description,
72
+ ui: copy.ui,
73
+ seo: copy.seo,
74
+ faq: copy.faq,
75
+ howTo: copy.howTo,
76
+ bibliography,
77
+ schemas: [appSchema, faqSchema, howToSchema],
78
+ };
79
+ }
@@ -0,0 +1,3 @@
1
+ import { localizedContents } from './translations';
2
+
3
+ export const content = localizedContents.sv;
@@ -0,0 +1,3 @@
1
+ import { localizedContents } from './translations';
2
+
3
+ export const content = localizedContents.tr;