@jjlmoya/utils-pets 1.12.0 → 1.13.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/pages/[locale]/[slug].astro +29 -13
- package/src/tests/locale_completeness.test.ts +4 -14
- package/src/tests/shared-test-helpers.ts +56 -0
- package/src/tests/tool_exports.test.ts +34 -0
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/petAge/bibliography.astro +2 -10
- package/src/tool/petAge/bibliography.ts +6 -0
- package/src/tool/petAge/entry.ts +2 -0
- package/src/tool/petAge/i18n/de.ts +2 -7
- package/src/tool/petAge/i18n/en.ts +2 -7
- package/src/tool/petAge/i18n/es.ts +2 -7
- package/src/tool/petAge/i18n/fr.ts +2 -7
- package/src/tool/petAge/i18n/id.ts +2 -7
- package/src/tool/petAge/i18n/it.ts +2 -7
- package/src/tool/petAge/i18n/ja.ts +2 -7
- package/src/tool/petAge/i18n/ko.ts +2 -7
- package/src/tool/petAge/i18n/nl.ts +2 -7
- package/src/tool/petAge/i18n/pl.ts +2 -7
- package/src/tool/petAge/i18n/pt.ts +2 -7
- package/src/tool/petAge/i18n/ru.ts +2 -7
- package/src/tool/petAge/i18n/sv.ts +2 -7
- package/src/tool/petAge/i18n/tr.ts +2 -7
- package/src/tool/petAge/i18n/zh.ts +2 -7
- package/src/tool/petAge/seo.astro +2 -48
- package/src/tool/petRation/bibliography.astro +2 -10
- package/src/tool/petRation/bibliography.ts +6 -0
- package/src/tool/petRation/entry.ts +2 -0
- package/src/tool/petRation/i18n/de.ts +2 -7
- package/src/tool/petRation/i18n/en.ts +2 -7
- package/src/tool/petRation/i18n/es.ts +2 -7
- package/src/tool/petRation/i18n/fr.ts +2 -7
- package/src/tool/petRation/i18n/id.ts +2 -7
- package/src/tool/petRation/i18n/it.ts +2 -7
- package/src/tool/petRation/i18n/ja.ts +2 -7
- package/src/tool/petRation/i18n/ko.ts +2 -7
- package/src/tool/petRation/i18n/nl.ts +2 -7
- package/src/tool/petRation/i18n/pl.ts +2 -7
- package/src/tool/petRation/i18n/pt.ts +2 -7
- package/src/tool/petRation/i18n/ru.ts +2 -7
- package/src/tool/petRation/i18n/sv.ts +2 -7
- package/src/tool/petRation/i18n/tr.ts +2 -7
- package/src/tool/petRation/i18n/zh.ts +2 -7
- package/src/tool/petRation/seo.astro +2 -48
- package/src/types.ts +0 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetAgeUI, PetAgeLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -66,11 +67,6 @@ const howTo: PetAgeLocaleContent['howTo'] = [
|
|
|
66
67
|
{ name: '分析生命阶段', text: '查看 结果 以 了解 您的 宠物 与 人类 相比 处于 幼年 、 青年 、 成年 还是 老年 阶段。' },
|
|
67
68
|
];
|
|
68
69
|
|
|
69
|
-
const bibliography: PetAgeLocaleContent['bibliography'] = [
|
|
70
|
-
{ name: 'AAHA 犬猫老年护理指南手册', url: 'https://www.aaha.org/wp-content/uploads/globalassets/02-guidelines/2023-aaha-senior-care-guidelines-for-dogs-and-cats/resources/2023-aaha-senior-care-guidelines-for-dogs-and-cats.pdf' },
|
|
71
|
-
{ name: 'AKC:如何将狗的寿命换算为人类寿命', url: 'https://www.akc.org/expert-advice/health/how-to-calculate-dog-years-to-human-years/' },
|
|
72
|
-
];
|
|
73
|
-
|
|
74
70
|
const seo: PetAgeLocaleContent['seo'] = [
|
|
75
71
|
{
|
|
76
72
|
type: 'summary',
|
|
@@ -180,9 +176,8 @@ export const content: PetAgeLocaleContent = {
|
|
|
180
176
|
description,
|
|
181
177
|
ui,
|
|
182
178
|
seo,
|
|
183
|
-
|
|
179
|
+
|
|
184
180
|
faq,
|
|
185
|
-
bibliographyTitle: '参考文献',
|
|
186
181
|
bibliography,
|
|
187
182
|
howTo,
|
|
188
183
|
schemas,
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
3
|
-
SEOTitle,
|
|
4
|
-
SEOCard,
|
|
5
|
-
SEOStats,
|
|
6
|
-
SEOTip,
|
|
7
|
-
SEOArticle,
|
|
8
|
-
SEOTable,
|
|
9
|
-
SEOProsCons,
|
|
10
|
-
SEOSummary,
|
|
11
|
-
SEOGlossary,
|
|
12
|
-
SEODiagnostic,
|
|
13
|
-
} from '@jjlmoya/utils-shared';
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
14
3
|
import { petAge } from './index';
|
|
15
4
|
import type { KnownLocale } from '../../types';
|
|
16
5
|
|
|
@@ -21,41 +10,6 @@ interface Props {
|
|
|
21
10
|
const { locale = 'es' } = Astro.props;
|
|
22
11
|
const content = await petAge.i18n[locale]?.();
|
|
23
12
|
if (!content) return null;
|
|
24
|
-
|
|
25
|
-
const { seo } = content;
|
|
26
13
|
---
|
|
27
14
|
|
|
28
|
-
<
|
|
29
|
-
{seo.map((section: any) => {
|
|
30
|
-
switch (section.type) {
|
|
31
|
-
case 'summary':
|
|
32
|
-
return <SEOSummary title={section.title} items={section.items} />;
|
|
33
|
-
case 'title':
|
|
34
|
-
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
35
|
-
case 'paragraph':
|
|
36
|
-
return <p set:html={section.html} />;
|
|
37
|
-
case 'stats':
|
|
38
|
-
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
39
|
-
case 'card':
|
|
40
|
-
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
41
|
-
case 'tip':
|
|
42
|
-
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
43
|
-
case 'table':
|
|
44
|
-
return (
|
|
45
|
-
<SEOTable headers={section.headers}>
|
|
46
|
-
{section.rows.map((row: string[]) => (
|
|
47
|
-
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
48
|
-
))}
|
|
49
|
-
</SEOTable>
|
|
50
|
-
);
|
|
51
|
-
case 'proscons':
|
|
52
|
-
return <SEOProsCons title={section.title} items={section.items} />;
|
|
53
|
-
case 'diagnostic':
|
|
54
|
-
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
55
|
-
case 'glossary':
|
|
56
|
-
return <SEOGlossary items={section.items} />;
|
|
57
|
-
default:
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
})}
|
|
61
|
-
</SEOArticle>
|
|
15
|
+
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
-
import {
|
|
4
|
-
import type { KnownLocale } from '../../types';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
locale?: KnownLocale;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { locale = 'es' } = Astro.props;
|
|
11
|
-
const content = await petRation.i18n[locale]?.();
|
|
3
|
+
import { bibliography } from './bibliography';
|
|
12
4
|
---
|
|
13
5
|
|
|
14
|
-
|
|
6
|
+
<SharedBibliography links={bibliography} />
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BibliographyEntry } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const bibliography: BibliographyEntry[] = [
|
|
4
|
+
{ name: 'WSAVA: Nutrition Toolkit and Calorie Recommendations', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
5
|
+
{ name: 'FEDIAF: Nutritional Guidelines for Complete and Complementary Pet Food', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
6
|
+
];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Kalorien des Futters pro kg eingeben', text: 'Suchen Sie auf der Futterverpackung nach dem genauen kcal/kg-Wert, damit die endgültige Ration in Gramm so präzise wie möglich für eine optimale Gesundheit berechnet wird.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Nutrition Toolkit und Kalorienempfehlungen', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Ernährungsrichtlinien für Alleinfuttermittel und Ergänzungsfuttermittel für Heimtiere', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliographie',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Enter the food calories per kg', text: 'Look on the pet food packaging for the exact kcal/kg value so the final ration in grams is as precise as possible for optimal health.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Nutrition Toolkit and Calorie Recommendations', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Nutritional Guidelines for Complete and Complementary Pet Food', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliography',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Introduce las calorías del alimento por kg', text: 'Busca en el envase del alimento para mascotas el valor exacto de kcal/kg para que la ración final en gramos sea lo más precisa posible para una salud óptima.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Kit de herramientas de nutrición y recomendaciones calóricas', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Guía nutricional para alimentos completos y complementarios para mascotas', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografía',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Entrez les calories de la nourriture par kg', text: 'Regardez sur l\'emballage de la nourriture pour animaux la valeur exacte en kcal/kg afin que le calcul de la ration finale en grammes soit aussi précis que possible pour une santé optimale.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA : Boîte à outils nutritionnelle et recommandations caloriques', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF : Directives nutritionnelles pour les aliments complets et complémentaires pour animaux de compagnie', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliographie',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Masukkan kalori makanan per kg', text: 'Lihat pada kemasan makanan hewan untuk nilai kcal/kg yang tepat sehingga penghitungan ransum akhir dalam gram seakurat mungkin untuk kesehatan yang optimal.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Toolkit Nutrisi dan Rekomendasi Kalori', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Pedoman Nutrisi untuk Makanan Hewan Peliharaan Lengkap dan Pelengkap', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografi',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Inserisci le calorie del cibo per kg', text: 'Cerca sulla confezione del cibo per animali il valore esatto di kcal/kg in modo che il calcolo della razione finale in grammi sia il più preciso possibile per una salute ottimale.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Kit di strumenti nutrizionali e raccomandazioni caloriche', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Linee guida nutrizionali per alimenti completi e complementari per animali domestici', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografia',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'フード パッケージ の カロリー を 入力', text: 'フード の 袋 に 記載 されている kcal/kg の 数値 を 確認 して 入力 して ください。 この 数値 が 正確 で ある こと で、 グラム 単位 の 給餌 量 が 健康 に 最適 な 値 で 算出 されます。' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: 栄養 ツールキット と カロリー 推奨 事項 ガイド', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: 総合 および 補完 フード 用 栄養 ガイドライン 指針', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: '関連 参考文献',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: '사료 포장지 의 칼로리 입력', text: '사료 포장지 에 적힌 kcal/kg 수치 를 확인 하여 입력 하세요 . 이 정보 가 정확 해야 그람 ( g ) 단위 의 급여량 이 건강 에 최적화 된 값 으로 산출 됩니다 .' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: 영양 툴킷 및 칼로리 권장 사항 가이드', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: 완전 및 보완 사료 를 위한 영양 가이드라인 지침서', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: '관련 참고 문헌',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Voer de calorieën van de voeding per kg in', text: 'Kijk op de verpakking van het huisdiervoer voor de exacte kcal/kg-waarde, zodat de uiteindelijke hoeveelheid in grammen zo precies mogelijk is voor een optimale gezondheid.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Nutrition Toolkit en calorieaanbevelingen', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Voedingsrichtlijnen voor volledige en aanvullende diervoeders', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografie',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Wprowadź kaloryczność karmy na kg', text: 'Poszukaj na opakowaniu karmy dla zwierząt dokładnej wartości kcal/kg, aby końcowa racja w gramach była jak najbardziej precyzyjna dla optymalnego zdrowia.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Zestaw narzędzi żywieniowych i rekomendacje kaloryczne', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Wytyczne żywieniowe dla pełnoporcjowych i uzupełniających karm dla zwierząt domowych', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografia',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Introduza as calorias do alimento por kg', text: 'Procure na embalagem do alimento para animais o valor exato de kcal/kg para que o cálculo da ração final em gramas seja o mais preciso possível para uma saúde óptima.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Kit de ferramentas de nutrição e recomendações calóricas', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Diretrizes Nutricionais para Alimentos Completos e Complementares para Animais de Estimação', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografia',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Введите калорийность корма', text: 'Найдите на упаковке корма значение ккал/кг или ккал/100г, чтобы расчет итоговой массы порции в граммах был максимально точным.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Инструментарий по питанию и рекомендации по калориям', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Руководство по питанию для полнорационных и дополнительных кормов', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Библиография',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Ange fodrets energiinnehåll', text: 'Titta på foderförpackningen för det exakta kcal/kg-värdet så att den slutgiltiga ransonen i gram blir så precis som möjligt för optimal hälsa.' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Nutrition Toolkit and Calorie Recommendations', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Nutritional Guidelines for Complete and Complementary Pet Food', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliografi',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: 'Mamanın Kalorisini Girin', text: 'Mama paketinin üzerindeki kcal/kg değerini bulun ve girin . Bu sayede gram cinsinden sonuç en doğru şekilde hesaplanarak evcil hayvanınızın sağlığını korumaya yardımcı olur .' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: Beslenme Araç Seti ve Kalori Önerileri Rehberi', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: Tam ve Tamamlayıcı Evcil Hayvan Mamaları İçin Beslenme Kılavuzları', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: 'Bibliyografya',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bibliography } from '../bibliography';
|
|
1
2
|
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
3
|
import type { PetRationUI, PetRationLocaleContent } from '../index';
|
|
3
4
|
|
|
@@ -65,11 +66,6 @@ const howTo: PetRationLocaleContent['howTo'] = [
|
|
|
65
66
|
{ name: '查阅 并 输入 粮袋 的 卡路里', text: '查阅 宠物 食品 包装 上 标注 的 kcal/kg 数值 后 输入 , 这样 计算器 就能 自动 算出 精确 到 克 的 每日 喂食 重量 。' },
|
|
66
67
|
];
|
|
67
68
|
|
|
68
|
-
const bibliography: PetRationLocaleContent['bibliography'] = [
|
|
69
|
-
{ name: 'WSAVA: 动物 营养 工具包 和 卡路里 指南 书', url: 'https://wsava.org/global-guidelines/global-nutrition-guidelines/' },
|
|
70
|
-
{ name: 'FEDIAF: 全价 及 补充 宠物 食品 营养 标准 指南', url: 'https://fediaf.org/self-regulation/nutrition.html' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
69
|
const seo: PetRationLocaleContent['seo'] = [
|
|
74
70
|
{
|
|
75
71
|
type: 'summary',
|
|
@@ -172,8 +168,7 @@ const schemas: PetRationLocaleContent['schemas'] = [
|
|
|
172
168
|
];
|
|
173
169
|
|
|
174
170
|
export const content: PetRationLocaleContent = {
|
|
175
|
-
|
|
176
|
-
bibliographyTitle: '更多 参考文献',
|
|
171
|
+
|
|
177
172
|
slug,
|
|
178
173
|
title,
|
|
179
174
|
description,
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
3
|
-
SEOTitle,
|
|
4
|
-
SEOCard,
|
|
5
|
-
SEOStats,
|
|
6
|
-
SEOTip,
|
|
7
|
-
SEOArticle,
|
|
8
|
-
SEOTable,
|
|
9
|
-
SEOProsCons,
|
|
10
|
-
SEOSummary,
|
|
11
|
-
SEOGlossary,
|
|
12
|
-
SEODiagnostic,
|
|
13
|
-
} from '@jjlmoya/utils-shared';
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
14
3
|
import { petRation } from './index';
|
|
15
4
|
import type { KnownLocale } from '../../types';
|
|
16
5
|
|
|
@@ -21,41 +10,6 @@ interface Props {
|
|
|
21
10
|
const { locale = 'es' } = Astro.props;
|
|
22
11
|
const content = await petRation.i18n[locale]?.();
|
|
23
12
|
if (!content) return null;
|
|
24
|
-
|
|
25
|
-
const { seo } = content;
|
|
26
13
|
---
|
|
27
14
|
|
|
28
|
-
<
|
|
29
|
-
{seo.map((section: any) => {
|
|
30
|
-
switch (section.type) {
|
|
31
|
-
case 'summary':
|
|
32
|
-
return <SEOSummary title={section.title} items={section.items} />;
|
|
33
|
-
case 'title':
|
|
34
|
-
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
35
|
-
case 'paragraph':
|
|
36
|
-
return <p set:html={section.html} />;
|
|
37
|
-
case 'stats':
|
|
38
|
-
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
39
|
-
case 'card':
|
|
40
|
-
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
41
|
-
case 'tip':
|
|
42
|
-
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
43
|
-
case 'table':
|
|
44
|
-
return (
|
|
45
|
-
<SEOTable headers={section.headers}>
|
|
46
|
-
{section.rows.map((row: string[]) => (
|
|
47
|
-
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
48
|
-
))}
|
|
49
|
-
</SEOTable>
|
|
50
|
-
);
|
|
51
|
-
case 'proscons':
|
|
52
|
-
return <SEOProsCons title={section.title} items={section.items} />;
|
|
53
|
-
case 'diagnostic':
|
|
54
|
-
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
55
|
-
case 'glossary':
|
|
56
|
-
return <SEOGlossary items={section.items} />;
|
|
57
|
-
default:
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
})}
|
|
61
|
-
</SEOArticle>
|
|
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>[];
|