@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.
- package/package.json +1 -1
- package/src/category/index.ts +2 -1
- package/src/entries.ts +4 -1
- package/src/index.ts +2 -0
- package/src/tests/i18n_coverage.test.ts +1 -1
- package/src/tests/registry_contract.test.ts +67 -0
- package/src/tests/tool_validation.test.ts +4 -3
- package/src/tool/aquariumEvaporationTopOffPlanner/aquarium-evaporation-top-off-planner.css +490 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/bibliography.astro +6 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/bibliography.ts +10 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/component.astro +61 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/controller.ts +232 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/dom-views.ts +39 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/entry.ts +27 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/evaluator.ts +9 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/de.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/en.ts +179 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/es.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/fr.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/id.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/it.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/ja.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/ko.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/nl.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/pl.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/pt.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/ru.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/shared.ts +79 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/sv.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/tr.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/translations.ts +509 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/i18n/zh.ts +3 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/index.ts +11 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/logic.test.ts +61 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/logic.ts +102 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/seo.astro +13 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/storage.ts +28 -0
- package/src/tool/aquariumEvaporationTopOffPlanner/ui.ts +49 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/aquarium-lighting-photoperiod-planner.css +9 -9
- package/src/tool/aquariumLightingPhotoperiodPlanner/component.astro +3 -1
- package/src/tool/aquariumLightingPhotoperiodPlanner/controller.ts +21 -9
- package/src/tool/aquariumLightingPhotoperiodPlanner/dom-views.test.ts +2 -1
- package/src/tool/aquariumLightingPhotoperiodPlanner/dom-views.ts +20 -8
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/de.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/en.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/es.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/fr.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/id.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/it.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/ja.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/ko.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/nl.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/pl.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/pt.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/ru.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/sv.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/tr.ts +2 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/i18n/zh.ts +4 -2
- package/src/tool/aquariumLightingPhotoperiodPlanner/logic.test.ts +10 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/logic.ts +10 -0
- package/src/tool/aquariumLightingPhotoperiodPlanner/storage.ts +12 -8
- package/src/tool/aquariumLightingPhotoperiodPlanner/ui.ts +2 -0
- package/src/tool/aquariumTankVolumeWaterChangeCalculator/i18n/fr.ts +1 -1
- package/src/tool/aquariumTankVolumeWaterChangeCalculator/i18n/it.ts +1 -1
- 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
|
+
}
|