@jjlmoya/utils-pets 1.21.0 → 1.23.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 (138) hide show
  1. package/package.json +2 -2
  2. package/src/category/i18n/de.ts +1 -1
  3. package/src/category/i18n/en.ts +2 -2
  4. package/src/category/i18n/es.ts +1 -1
  5. package/src/category/i18n/fr.ts +1 -1
  6. package/src/category/i18n/pt.ts +1 -1
  7. package/src/category/i18n/tr.ts +1 -1
  8. package/src/category/index.ts +28 -27
  9. package/src/entries.ts +16 -13
  10. package/src/index.ts +1 -0
  11. package/src/tests/bibliography_wellformed_export.test.ts +46 -0
  12. package/src/tests/category_seo_quality.test.ts +74 -0
  13. package/src/tests/faq_count.test.ts +22 -22
  14. package/src/tests/i18n_coverage.test.ts +5 -2
  15. package/src/tests/locale_completeness.test.ts +31 -31
  16. package/src/tests/no_h1_in_components.test.ts +1 -1
  17. package/src/tests/pet_logic.test.ts +49 -0
  18. package/src/tests/qa-test-helpers.ts +32 -0
  19. package/src/tests/qa_bibliography_links.test.ts +40 -0
  20. package/src/tests/qa_claim_evidence.test.ts +69 -0
  21. package/src/tests/qa_logic_reference_coverage.test.ts +46 -0
  22. package/src/tests/qa_runtime_i18n.test.ts +100 -0
  23. package/src/tests/seo_length.test.ts +54 -54
  24. package/src/tests/seo_parity.test.ts +2 -2
  25. package/src/tests/seo_wellformed_export.test.ts +65 -0
  26. package/src/tests/spanish_leakage.test.ts +175 -175
  27. package/src/tests/tool_validation.test.ts +139 -139
  28. package/src/tool/petAge/component.astro +3 -3
  29. package/src/tool/petAge/i18n/de.ts +184 -184
  30. package/src/tool/petAge/i18n/en.ts +184 -184
  31. package/src/tool/petAge/i18n/es.ts +184 -184
  32. package/src/tool/petAge/i18n/fr.ts +184 -184
  33. package/src/tool/petAge/i18n/id.ts +184 -184
  34. package/src/tool/petAge/i18n/it.ts +184 -184
  35. package/src/tool/petAge/i18n/ja.ts +184 -184
  36. package/src/tool/petAge/i18n/ko.ts +184 -184
  37. package/src/tool/petAge/i18n/nl.ts +184 -184
  38. package/src/tool/petAge/i18n/pl.ts +184 -184
  39. package/src/tool/petAge/i18n/pt.ts +184 -184
  40. package/src/tool/petAge/i18n/ru.ts +184 -184
  41. package/src/tool/petAge/i18n/sv.ts +184 -184
  42. package/src/tool/petAge/i18n/tr.ts +185 -185
  43. package/src/tool/petAge/i18n/zh.ts +184 -184
  44. package/src/tool/petAge/seo.astro +15 -15
  45. package/src/tool/petCarrierCrateSizePlanner/bibliography.astro +6 -0
  46. package/src/tool/petCarrierCrateSizePlanner/bibliography.ts +12 -0
  47. package/src/tool/petCarrierCrateSizePlanner/component.astro +89 -0
  48. package/src/tool/petCarrierCrateSizePlanner/controller.ts +128 -0
  49. package/src/tool/petCarrierCrateSizePlanner/dom-views.ts +96 -0
  50. package/src/tool/petCarrierCrateSizePlanner/entry.ts +27 -0
  51. package/src/tool/petCarrierCrateSizePlanner/evaluator.ts +14 -0
  52. package/src/tool/petCarrierCrateSizePlanner/i18n/de.ts +171 -0
  53. package/src/tool/petCarrierCrateSizePlanner/i18n/en.ts +171 -0
  54. package/src/tool/petCarrierCrateSizePlanner/i18n/es.ts +171 -0
  55. package/src/tool/petCarrierCrateSizePlanner/i18n/fr.ts +171 -0
  56. package/src/tool/petCarrierCrateSizePlanner/i18n/id.ts +171 -0
  57. package/src/tool/petCarrierCrateSizePlanner/i18n/it.ts +171 -0
  58. package/src/tool/petCarrierCrateSizePlanner/i18n/ja.ts +171 -0
  59. package/src/tool/petCarrierCrateSizePlanner/i18n/ko.ts +171 -0
  60. package/src/tool/petCarrierCrateSizePlanner/i18n/nl.ts +171 -0
  61. package/src/tool/petCarrierCrateSizePlanner/i18n/pl.ts +171 -0
  62. package/src/tool/petCarrierCrateSizePlanner/i18n/pt.ts +171 -0
  63. package/src/tool/petCarrierCrateSizePlanner/i18n/ru.ts +171 -0
  64. package/src/tool/petCarrierCrateSizePlanner/i18n/sv.ts +171 -0
  65. package/src/tool/petCarrierCrateSizePlanner/i18n/tr.ts +171 -0
  66. package/src/tool/petCarrierCrateSizePlanner/i18n/zh.ts +171 -0
  67. package/src/tool/petCarrierCrateSizePlanner/index.ts +12 -0
  68. package/src/tool/petCarrierCrateSizePlanner/logic.test.ts +49 -0
  69. package/src/tool/petCarrierCrateSizePlanner/logic.ts +77 -0
  70. package/src/tool/petCarrierCrateSizePlanner/pet-carrier-crate-size-planner.css +639 -0
  71. package/src/tool/petCarrierCrateSizePlanner/seo.astro +14 -0
  72. package/src/tool/petCarrierCrateSizePlanner/storage.ts +31 -0
  73. package/src/tool/petCarrierCrateSizePlanner/ui.ts +59 -0
  74. package/src/tool/petGestation/i18n/de.ts +0 -2
  75. package/src/tool/petGestation/i18n/en.ts +0 -2
  76. package/src/tool/petGestation/i18n/es.ts +0 -2
  77. package/src/tool/petGestation/i18n/fr.ts +0 -2
  78. package/src/tool/petGestation/i18n/id.ts +0 -2
  79. package/src/tool/petGestation/i18n/it.ts +0 -2
  80. package/src/tool/petGestation/i18n/ja.ts +0 -2
  81. package/src/tool/petGestation/i18n/ko.ts +0 -2
  82. package/src/tool/petGestation/i18n/nl.ts +0 -2
  83. package/src/tool/petGestation/i18n/pl.ts +0 -2
  84. package/src/tool/petGestation/i18n/pt.ts +0 -2
  85. package/src/tool/petGestation/i18n/ru.ts +0 -2
  86. package/src/tool/petGestation/i18n/sv.ts +0 -2
  87. package/src/tool/petGestation/i18n/tr.ts +0 -2
  88. package/src/tool/petGestation/i18n/zh.ts +0 -2
  89. package/src/tool/petGestation/ui.ts +0 -2
  90. package/src/tool/petRation/i18n/de.ts +181 -181
  91. package/src/tool/petRation/i18n/en.ts +181 -181
  92. package/src/tool/petRation/i18n/es.ts +181 -181
  93. package/src/tool/petRation/i18n/fr.ts +181 -181
  94. package/src/tool/petRation/i18n/id.ts +181 -181
  95. package/src/tool/petRation/i18n/it.ts +181 -181
  96. package/src/tool/petRation/i18n/ja.ts +181 -181
  97. package/src/tool/petRation/i18n/ko.ts +181 -181
  98. package/src/tool/petRation/i18n/nl.ts +181 -181
  99. package/src/tool/petRation/i18n/pl.ts +181 -181
  100. package/src/tool/petRation/i18n/pt.ts +181 -181
  101. package/src/tool/petRation/i18n/ru.ts +181 -181
  102. package/src/tool/petRation/i18n/sv.ts +181 -181
  103. package/src/tool/petRation/i18n/tr.ts +181 -181
  104. package/src/tool/petRation/i18n/zh.ts +181 -181
  105. package/src/tool/petRation/seo.astro +15 -15
  106. package/src/tool/petToxicity/i18n/de.ts +0 -2
  107. package/src/tool/petToxicity/i18n/en.ts +0 -2
  108. package/src/tool/petToxicity/i18n/es.ts +2 -4
  109. package/src/tool/petToxicity/i18n/fr.ts +0 -2
  110. package/src/tool/petToxicity/i18n/id.ts +0 -2
  111. package/src/tool/petToxicity/i18n/it.ts +0 -2
  112. package/src/tool/petToxicity/i18n/ja.ts +0 -2
  113. package/src/tool/petToxicity/i18n/ko.ts +0 -2
  114. package/src/tool/petToxicity/i18n/nl.ts +0 -2
  115. package/src/tool/petToxicity/i18n/pl.ts +0 -2
  116. package/src/tool/petToxicity/i18n/pt.ts +0 -2
  117. package/src/tool/petToxicity/i18n/ru.ts +0 -2
  118. package/src/tool/petToxicity/i18n/sv.ts +0 -2
  119. package/src/tool/petToxicity/i18n/tr.ts +0 -2
  120. package/src/tool/petToxicity/i18n/zh.ts +0 -2
  121. package/src/tool/petToxicity/ui.ts +0 -2
  122. package/src/tool/petWaterIntake/i18n/de.ts +0 -15
  123. package/src/tool/petWaterIntake/i18n/en.ts +0 -15
  124. package/src/tool/petWaterIntake/i18n/es.ts +2 -17
  125. package/src/tool/petWaterIntake/i18n/fr.ts +0 -15
  126. package/src/tool/petWaterIntake/i18n/id.ts +0 -15
  127. package/src/tool/petWaterIntake/i18n/it.ts +0 -15
  128. package/src/tool/petWaterIntake/i18n/ja.ts +0 -15
  129. package/src/tool/petWaterIntake/i18n/ko.ts +0 -15
  130. package/src/tool/petWaterIntake/i18n/nl.ts +0 -15
  131. package/src/tool/petWaterIntake/i18n/pl.ts +0 -15
  132. package/src/tool/petWaterIntake/i18n/pt.ts +0 -15
  133. package/src/tool/petWaterIntake/i18n/ru.ts +0 -15
  134. package/src/tool/petWaterIntake/i18n/sv.ts +0 -15
  135. package/src/tool/petWaterIntake/i18n/tr.ts +0 -15
  136. package/src/tool/petWaterIntake/i18n/zh.ts +0 -15
  137. package/src/tool/petWaterIntake/ui.ts +0 -15
  138. package/src/tools.ts +22 -19
@@ -1,184 +1,184 @@
1
- import { bibliography } from '../bibliography';
2
- import type { WithContext, SoftwareApplication } from 'schema-dts';
3
- import type { PetAgeUI, PetAgeLocaleContent } from '../index';
4
-
5
- const slug = 'pet-age-calculator';
6
- const title = '宠物年龄换算器';
7
- const description = '了解您的爱犬或爱猫换算成人类后的真实年龄。告别过时的\"乘7规则\"。使用我们基于最新兽医学研究的计算器,精准掌握宠物的生命阶段。';
8
-
9
- const ui: PetAgeUI = {
10
- toolTitle: '年龄计算器',
11
- toolSubtitle: '您的毛茸茸的朋友换算成人类后到底多少岁了?',
12
- petNameLabel: '宠物姓名(可选)',
13
- petNamePlaceholder: '例如:巴迪',
14
- petTypeDog: '狗',
15
- petTypeCat: '猫',
16
- sizeSmall: '小型',
17
- sizeMedium: '中型',
18
- sizeLarge: '大型',
19
- sizeGiant: '巨型',
20
- birthYearLabel: '出生年份',
21
- humanAgeLabel: '换算成人类年龄为',
22
- humanAgeUnit: '岁',
23
- humanAgeYears: '岁',
24
- lifeStageLabel: '生命阶段',
25
- milestoneLabel: '下一个里程碑',
26
- shareBtn: '分享结果',
27
- shareSuccess: '复制成功!正在打开卡片...',
28
- humanAgeTitle: '神奇年龄',
29
- recalculateBtn: '计算其他年龄',
30
- realAgeLabel: '实际年龄',
31
- defaultPetName: '您的宠物',
32
- stageDogPuppy: '顽皮幼犬期',
33
- stageDogTeen: '叛逆青春期',
34
- stageDogAdult: '巅峰成年期',
35
- stageDogMature: '优雅成熟期',
36
- stageDogSenior: '睿智暮年期',
37
- stageCatKitten: '好奇幼猫期',
38
- stageCatYouth: '活泼青少期',
39
- stageCatReign: '主宰成猫期',
40
- stageCatVeteran: '受宠老猫期',
41
- stageCatVenerable: '德高望重长寿期',
42
- };
43
-
44
- const faq: PetAgeLocaleContent['faq'] = [
45
- {
46
- question: '\"狗的一岁等于人类的七岁\"是真的吗?',
47
- answer: '不 是 真的。 这 是 一个 过度 简化 的 规则, 已经被 现代 兽医学 研究所 否定。 宠物 在 生命 的 最初 两年 成长 极其 迅速, 之后 这个 过程 会 随着 体重 和 品种 的 不同 而 显著 放缓。 最新 的 研究 发现 , 这种 传统 的 乘 7 比例 完全 无法 描绘 宠物 生物学 层面 的 老化 曲线。',
48
- },
49
- {
50
- question: '为什么大型犬老得更快?',
51
- answer: '大型 犬 具有 更快的 代谢 和 生长 速度, 这 会 导致 其 细胞 产生 更大的 氧化 应激。 这 意味着 与 小型犬 相比, 它们的 预期 寿命 通常 会 更短。 兽医 观察 到 大型 犬 的 器官 在 较低 的 年代 龄 时 就 开始 表现 出 老化 迹象。',
52
- },
53
- {
54
- question: '猫与人类相比是如何衰老的?',
55
- answer: '猫 在 一个月 大时 结束 婴儿期, 6 个月 大时 进入 青春期, 并在 2 岁 时 达到 成年 (相当于 人类 的 24 岁)。 之后, 猫 的 每一个 寿年 大约 相当于 人类 的 4 岁。 与 犬 类 相比 , 猫 的 衰老 曲线 相对 稳定 且 线性。',
56
- },
57
- {
58
- question: '宠物多大岁数被认为是\"老年\"?',
59
- answer: '通常 而言, 当 宠物 达到 其 预期 寿命 的 75% 时 就 被 视为 老年。 对于 猫 来说, 通常 是 从 7 到 11 岁 开始, 具体 取决于 它们的 健康 状况。 高龄 宠物 需要 更加 频繁 的 医疗 检查 和 专门 的 营养 支持。',
60
- },
61
- ];
62
-
63
- const howTo: PetAgeLocaleContent['howTo'] = [
64
- { name: '选择宠物种类', text: '选择 您 拥有 的 是 狗 还是 猫, 以 应用 正确 的 生物学 计算 公式。' },
65
- { name: '输入体型(仅限犬类)', text: '对于 狗 来说, 体重 是 关键 因素。 请 标明 它是 小型 (10 公斤 以下)、 中型 (10 至 25 公斤)、 大型 (25 至 45 公斤) 还是 巨型 (45 公斤 以上)。' },
66
- { name: '输入出生年份', text: '输入 您的 宠物 出生 的 年份, 以 计算 它们的 年代 龄。' },
67
- { name: '分析生命阶段', text: '查看 结果 以 了解 您的 宠物 与 人类 相比 处于 幼年 、 青年 、 成年 还是 老年 阶段。' },
68
- ];
69
-
70
- const seo: PetAgeLocaleContent['seo'] = [
71
- {
72
- type: 'summary',
73
- title: '关于宠物衰老您需要了解的知识',
74
- items: [
75
- '\"乘 7 规则\" 是 一个 误区 : 宠物 在 最初 的 2 年 呈 指数 级 成熟。',
76
- '1 岁 的 狗 相当于 15 岁 的 人类 ; 2 岁 的 狗 相当于 24 岁 的 人类。',
77
- '2 岁 之后, 大型 犬 的 衰老 速度 快于 小型 犬。',
78
- '猫 遵循 更加 线性 的 曲线 : 2 岁 后 每一个 猫 寿年 等于 人类 的 4 岁。',
79
- '了解 真实 的 生命 阶段 有助于 提供 针对性 的 医疗 护理。',
80
- '饮食 和 锻炼 环境 是 决定 宠物 衰老 速度 的 外部 关键 因素。',
81
- ],
82
- },
83
- { type: 'title', text: '关于您宠物年龄的科学真相', level: 2 },
84
- {
85
- type: 'paragraph',
86
- html: '您 知道 吗 ? 一只 2 岁 的 猫 已经 具备了 人类 24 岁 的 成熟度。 探索 为什么 \"乘 7 规则\" 只是 段子。 那个 \"1 个 狗 年 等于 7 个 人 类 年\" 的 老 传说 只是 一种 过度 的 简化。 生物学 上 的 现实 要 有趣 得 多 : 宠物 在 生命 的 最初 两年 以 惊人的 速度 成熟, 极快 地 达到 性成熟 和 体成熟。 之后, 这种 衰老 曲线 会 趋于 平缓 并 放缓。',
87
- },
88
- {
89
- type: 'paragraph',
90
- html: '通过 这个 科学 工具 , 您 可以 更好 地 了解 伴侣 动物 的 生理 状态 。 衰老 是 一个 复杂 的 生理 过程 , 涉及 细胞 修复 能力 的 下降 和 代谢 率 的 变化 。 最新 的 表观 遗传学 标记 研究 表明 , 狗 的 衰老 过程 在 早期 是 极富 爆发性 的 。 这种 知识 有助于 宠物 主人 在 正确 的 时间 进行 疫苗 接种 和 健康 筛查 。 从 幼年 的 发育 支持 到 老年 的 慢性病 预警 , 年龄 换算 器 都 能 提供 宝贵的 参考 。',
91
- },
92
- { type: 'title', text: '计算背后的科学原理', level: 3 },
93
- {
94
- type: 'paragraph',
95
- html: '此 工具 采用 <strong>美国 兽医 协会 (AAHA)</strong> 的 官方 指南 以及 关于 犬 类 DNA 甲基化 的 最新 研究 模型 , 旨在 为 您 提供 尽可能 准确 的 估算 。 DNA 甲基化 分析 被 称为 \"表观 遗传 钟\" , 通过 检测 遗传物质 上 的 化学 变化 来 揭示 生命体 内部 的 生物 年龄 。',
96
- },
97
- {
98
- type: 'paragraph',
99
- html: '我们的 算法 将 这些 前沿 数据 与 数百万 临床 案例 相 结合 , 为 不同 体型 的 犬 类 定制了 专属 的 折算系数 。 无论 您 的 宠物 是 娇小 的 贵宾 还是 壮硕 的 藏獒 , 都能 得到 符合 其实际 生理 状况 的 评价 。 这 这种 科学 的 态度 能够 极大 地 提升 宠物 的 福利水平 。',
100
- },
101
- {
102
- type: 'table',
103
- headers: ['物种', '第 1 年', '第 2 年', '第 3 年起'],
104
- rows: [
105
- ['猫', '15 岁 人类', '24 岁 人类', '每年 增加 4 岁'],
106
- ['小型犬', '15 岁 人类', '24 岁 人类', '每年 增加 5 岁'],
107
- ['中型犬', '15 岁 人类', '24 岁 人类', '每年 增加 6 岁'],
108
- ['大型犬', '15 岁 人类', '24 岁 人类', '每年 增加 7 岁'],
109
- ['巨型犬', '15 岁 人类', '24 岁 人类', '每年 增加 8 岁'],
110
- ],
111
- },
112
- { type: 'title', text: '生命阶段 : 每个 阶段 应该 注意 什么 ?', level: 3 },
113
- {
114
- type: 'paragraph',
115
- html: '了解 您 宠物 的 真实 年齢 有助于 您 理解 它们 在 每个 阶段 的 医疗 和 情感 需求 。 处于 不同 时期 的 动物 对 蛋白质 、 脂肪 以及 锻炼 量的 要求 完全 不同 。',
116
- },
117
- {
118
- type: 'card',
119
- title: '幼犬 或 少年期 (从 0 到 1 岁)',
120
- icon: 'mdi:star-shooting',
121
- html: '这是 爆发性 生长 的 阶段 。 骨骼 在 发育 , 牙齿 在 更换 , 大脑 像 海绵 一样 吸收 信息 。 疫苗 接种 和 早期 社交 在 此 阶段 至关重要 。 保证 优质 的 幼宠 粮 是 建立 坚实 健康 基础 的 关键 步骤 。',
122
- },
123
- {
124
- type: 'card',
125
- title: '成年期 (从 2 到 6 岁)',
126
- icon: 'mdi:shield-check',
127
- html: '身体 和 心理 的 巅峰 状态 。 性格 已经 定型 。 这是 享受 高强度 户外 活动 的 黄金 时间 。 保持 理想 体重 以 预防 未来 可能 出现 的 关节 或 心脏 疾病 是 这一 阶段 的 核心 任务 。',
128
- },
129
- {
130
- type: 'card',
131
- title: '老年期 (7 岁 以上)',
132
- icon: 'mdi:heart-pulse',
133
- html: '口鼻 周围 开始 出现 白毛 , 睡眠 时间 增加 。 代谢 明显 放缓 。 从 此 阶段 开始 , 建议 每 6 个月 进行 一次 兽医 检查 。 密切 关注 关节炎 和 牙齿 健康 。 合理 使用 膳食 补充剂 可以 显著 提升 晚年 生存 质量 。',
134
- },
135
- {
136
- type: 'tip',
137
- title: '兽医专业建议',
138
- html: '计算 出 的 年龄 是 一个 平均 的 生物学 估算 。 品种 、 遗传 以及 生活 方式 等 因素 都会 显著 影响 您 宠物 的 实际 衰老 速度 。 请 务必 定期 咨询 专业 兽医 以 获取 一对一 的 个性化 护理 方案 。',
139
- },
140
- ];
141
-
142
- const schemas: PetAgeLocaleContent['schemas'] = [
143
- {
144
- '@context': 'https://schema.org',
145
- '@type': 'SoftwareApplication',
146
- name: title,
147
- description: description,
148
- applicationCategory: 'UtilityApplication',
149
- operatingSystem: 'Web',
150
- offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
151
- } as WithContext<SoftwareApplication>,
152
- {
153
- '@context': 'https://schema.org',
154
- '@type': 'FAQPage',
155
- mainEntity: faq.map((f) => ({
156
- '@type': 'Question',
157
- name: f.question,
158
- acceptedAnswer: { '@type': 'Answer', text: f.answer },
159
- })),
160
- } as any,
161
- {
162
- '@context': 'https://schema.org',
163
- '@type': 'HowTo',
164
- name: title,
165
- step: howTo.map((h) => ({
166
- '@type': 'HowToStep',
167
- name: h.name,
168
- text: h.text,
169
- })),
170
- } as any,
171
- ];
172
-
173
- export const content: PetAgeLocaleContent = {
174
- slug,
175
- title,
176
- description,
177
- ui,
178
- seo,
179
-
180
- faq,
181
- bibliography,
182
- howTo,
183
- schemas,
184
- };
1
+ import { bibliography } from '../bibliography';
2
+ import type { WithContext, SoftwareApplication } from 'schema-dts';
3
+ import type { PetAgeUI, PetAgeLocaleContent } from '../index';
4
+
5
+ const slug = 'pet-age-calculator';
6
+ const title = '宠物年龄换算器';
7
+ const description = '了解您的爱犬或爱猫换算成人类后的真实年龄。告别过时的\"乘7规则\"。使用我们基于最新兽医学研究的计算器,精准掌握宠物的生命阶段。';
8
+
9
+ const ui: PetAgeUI = {
10
+ toolTitle: '年龄计算器',
11
+ toolSubtitle: '您的毛茸茸的朋友换算成人类后到底多少岁了?',
12
+ petNameLabel: '宠物姓名(可选)',
13
+ petNamePlaceholder: '例如:巴迪',
14
+ petTypeDog: '狗',
15
+ petTypeCat: '猫',
16
+ sizeSmall: '小型',
17
+ sizeMedium: '中型',
18
+ sizeLarge: '大型',
19
+ sizeGiant: '巨型',
20
+ birthYearLabel: '出生年份',
21
+ humanAgeLabel: '换算成人类年龄为',
22
+ humanAgeUnit: '岁',
23
+ humanAgeYears: '岁',
24
+ lifeStageLabel: '生命阶段',
25
+ milestoneLabel: '下一个里程碑',
26
+ shareBtn: '分享结果',
27
+ shareSuccess: '复制成功!正在打开卡片...',
28
+ humanAgeTitle: '神奇年龄',
29
+ recalculateBtn: '计算其他年龄',
30
+ realAgeLabel: '实际年龄',
31
+ defaultPetName: '您的宠物',
32
+ stageDogPuppy: '顽皮幼犬期',
33
+ stageDogTeen: '叛逆青春期',
34
+ stageDogAdult: '巅峰成年期',
35
+ stageDogMature: '优雅成熟期',
36
+ stageDogSenior: '睿智暮年期',
37
+ stageCatKitten: '好奇幼猫期',
38
+ stageCatYouth: '活泼青少期',
39
+ stageCatReign: '主宰成猫期',
40
+ stageCatVeteran: '受宠老猫期',
41
+ stageCatVenerable: '德高望重长寿期',
42
+ };
43
+
44
+ const faq: PetAgeLocaleContent['faq'] = [
45
+ {
46
+ question: '\"狗的一岁等于人类的七岁\"是真的吗?',
47
+ answer: '不 是 真的。 这 是 一个 过度 简化 的 规则, 已经被 现代 兽医学 研究所 否定。 宠物 在 生命 的 最初 两年 成长 极其 迅速, 之后 这个 过程 会 随着 体重 和 品种 的 不同 而 显著 放缓。 最新 的 研究 发现 , 这种 传统 的 乘 7 比例 完全 无法 描绘 宠物 生物学 层面 的 老化 曲线。',
48
+ },
49
+ {
50
+ question: '为什么大型犬老得更快?',
51
+ answer: '大型 犬 具有 更快的 代谢 和 生长 速度, 这 会 导致 其 细胞 产生 更大的 氧化 应激。 这 意味着 与 小型犬 相比, 它们的 预期 寿命 通常 会 更短。 兽医 观察 到 大型 犬 的 器官 在 较低 的 年代 龄 时 就 开始 表现 出 老化 迹象。',
52
+ },
53
+ {
54
+ question: '猫与人类相比是如何衰老的?',
55
+ answer: '猫 在 一个月 大时 结束 婴儿期, 6 个月 大时 进入 青春期, 并在 2 岁 时 达到 成年 (相当于 人类 的 24 岁)。 之后, 猫 的 每一个 寿年 大约 相当于 人类 的 4 岁。 与 犬 类 相比 , 猫 的 衰老 曲线 相对 稳定 且 线性。',
56
+ },
57
+ {
58
+ question: '宠物多大岁数被认为是\"老年\"?',
59
+ answer: '通常 而言, 当 宠物 达到 其 预期 寿命 的 75% 时 就 被 视为 老年。 对于 猫 来说, 通常 是 从 7 到 11 岁 开始, 具体 取决于 它们的 健康 状况。 高龄 宠物 需要 更加 频繁 的 医疗 检查 和 专门 的 营养 支持。',
60
+ },
61
+ ];
62
+
63
+ const howTo: PetAgeLocaleContent['howTo'] = [
64
+ { name: '选择宠物种类', text: '选择 您 拥有 的 是 狗 还是 猫, 以 应用 正确 的 生物学 计算 公式。' },
65
+ { name: '输入体型(仅限犬类)', text: '对于 狗 来说, 体重 是 关键 因素。 请 标明 它是 小型 (10 公斤 以下)、 中型 (10 至 25 公斤)、 大型 (25 至 45 公斤) 还是 巨型 (45 公斤 以上)。' },
66
+ { name: '输入出生年份', text: '输入 您的 宠物 出生 的 年份, 以 计算 它们的 年代 龄。' },
67
+ { name: '分析生命阶段', text: '查看 结果 以 了解 您的 宠物 与 人类 相比 处于 幼年 、 青年 、 成年 还是 老年 阶段。' },
68
+ ];
69
+
70
+ const seo: PetAgeLocaleContent['seo'] = [
71
+ {
72
+ type: 'summary',
73
+ title: '关于宠物衰老您需要了解的知识',
74
+ items: [
75
+ '\"乘 7 规则\" 是 一个 误区 : 宠物 在 最初 的 2 年 呈 指数 级 成熟。',
76
+ '1 岁 的 狗 相当于 15 岁 的 人类 ; 2 岁 的 狗 相当于 24 岁 的 人类。',
77
+ '2 岁 之后, 大型 犬 的 衰老 速度 快于 小型 犬。',
78
+ '猫 遵循 更加 线性 的 曲线 : 2 岁 后 每一个 猫 寿年 等于 人类 的 4 岁。',
79
+ '了解 真实 的 生命 阶段 有助于 提供 针对性 的 医疗 护理。',
80
+ '饮食 和 锻炼 环境 是 决定 宠物 衰老 速度 的 外部 关键 因素。',
81
+ ],
82
+ },
83
+ { type: 'title', text: '关于您宠物年龄的科学真相', level: 2 },
84
+ {
85
+ type: 'paragraph',
86
+ html: '您 知道 吗 ? 一只 2 岁 的 猫 已经 具备了 人类 24 岁 的 成熟度。 探索 为什么 \"乘 7 规则\" 只是 段子。 那个 \"1 个 狗 年 等于 7 个 人 类 年\" 的 老 传说 只是 一种 过度 的 简化。 生物学 上 的 现实 要 有趣 得 多 : 宠物 在 生命 的 最初 两年 以 惊人的 速度 成熟, 极快 地 达到 性成熟 和 体成熟。 之后, 这种 衰老 曲线 会 趋于 平缓 并 放缓。',
87
+ },
88
+ {
89
+ type: 'paragraph',
90
+ html: '通过 这个 科学 工具 , 您 可以 更好 地 了解 伴侣 动物 的 生理 状态 。 衰老 是 一个 复杂 的 生理 过程 , 涉及 细胞 修复 能力 的 下降 和 代谢 率 的 变化 。 最新 的 表观 遗传学 标记 研究 表明 , 狗 的 衰老 过程 在 早期 是 极富 爆发性 的 。 这种 知识 有助于 宠物 主人 在 正确 的 时间 进行 疫苗 接种 和 健康 筛查 。 从 幼年 的 发育 支持 到 老年 的 慢性病 预警 , 年龄 换算 器 都 能 提供 宝贵的 参考 。',
91
+ },
92
+ { type: 'title', text: '计算背后的科学原理', level: 3 },
93
+ {
94
+ type: 'paragraph',
95
+ html: '此 工具 采用 <strong>美国 兽医 协会 (AAHA)</strong> 的 官方 指南 以及 关于 犬 类 DNA 甲基化 的 最新 研究 模型 , 旨在 为 您 提供 尽可能 准确 的 估算 。 DNA 甲基化 分析 被 称为 \"表观 遗传 钟\" , 通过 检测 遗传物质 上 的 化学 变化 来 揭示 生命体 内部 的 生物 年龄 。',
96
+ },
97
+ {
98
+ type: 'paragraph',
99
+ html: '我们的 算法 将 这些 前沿 数据 与 数百万 临床 案例 相 结合 , 为 不同 体型 的 犬 类 定制了 专属 的 折算系数 。 无论 您 的 宠物 是 娇小 的 贵宾 还是 壮硕 的 藏獒 , 都能 得到 符合 其实际 生理 状况 的 评价 。 这 这种 科学 的 态度 能够 极大 地 提升 宠物 的 福利水平 。',
100
+ },
101
+ {
102
+ type: 'table',
103
+ headers: ['物种', '第 1 年', '第 2 年', '第 3 年起'],
104
+ rows: [
105
+ ['猫', '15 岁 人类', '24 岁 人类', '每年 增加 4 岁'],
106
+ ['小型犬', '15 岁 人类', '24 岁 人类', '每年 增加 5 岁'],
107
+ ['中型犬', '15 岁 人类', '24 岁 人类', '每年 增加 6 岁'],
108
+ ['大型犬', '15 岁 人类', '24 岁 人类', '每年 增加 7 岁'],
109
+ ['巨型犬', '15 岁 人类', '24 岁 人类', '每年 增加 8 岁'],
110
+ ],
111
+ },
112
+ { type: 'title', text: '生命阶段 : 每个 阶段 应该 注意 什么 ?', level: 3 },
113
+ {
114
+ type: 'paragraph',
115
+ html: '了解 您 宠物 的 真实 年齢 有助于 您 理解 它们 在 每个 阶段 的 医疗 和 情感 需求 。 处于 不同 时期 的 动物 对 蛋白质 、 脂肪 以及 锻炼 量的 要求 完全 不同 。',
116
+ },
117
+ {
118
+ type: 'card',
119
+ title: '幼犬 或 少年期 (从 0 到 1 岁)',
120
+ icon: 'mdi:star-shooting',
121
+ html: '这是 爆发性 生长 的 阶段 。 骨骼 在 发育 , 牙齿 在 更换 , 大脑 像 海绵 一样 吸收 信息 。 疫苗 接种 和 早期 社交 在 此 阶段 至关重要 。 保证 优质 的 幼宠 粮 是 建立 坚实 健康 基础 的 关键 步骤 。',
122
+ },
123
+ {
124
+ type: 'card',
125
+ title: '成年期 (从 2 到 6 岁)',
126
+ icon: 'mdi:shield-check',
127
+ html: '身体 和 心理 的 巅峰 状态 。 性格 已经 定型 。 这是 享受 高强度 户外 活动 的 黄金 时间 。 保持 理想 体重 以 预防 未来 可能 出现 的 关节 或 心脏 疾病 是 这一 阶段 的 核心 任务 。',
128
+ },
129
+ {
130
+ type: 'card',
131
+ title: '老年期 (7 岁 以上)',
132
+ icon: 'mdi:heart-pulse',
133
+ html: '口鼻 周围 开始 出现 白毛 , 睡眠 时间 增加 。 代谢 明显 放缓 。 从 此 阶段 开始 , 建议 每 6 个月 进行 一次 兽医 检查 。 密切 关注 关节炎 和 牙齿 健康 。 合理 使用 膳食 补充剂 可以 显著 提升 晚年 生存 质量 。',
134
+ },
135
+ {
136
+ type: 'tip',
137
+ title: '兽医专业建议',
138
+ html: '计算 出 的 年龄 是 一个 平均 的 生物学 估算 。 品种 、 遗传 以及 生活 方式 等 因素 都会 显著 影响 您 宠物 的 实际 衰老 速度 。 请 务必 定期 咨询 专业 兽医 以 获取 一对一 的 个性化 护理 方案 。',
139
+ },
140
+ ];
141
+
142
+ const schemas: PetAgeLocaleContent['schemas'] = [
143
+ {
144
+ '@context': 'https://schema.org',
145
+ '@type': 'SoftwareApplication',
146
+ name: title,
147
+ description: description,
148
+ applicationCategory: 'UtilityApplication',
149
+ operatingSystem: 'Web',
150
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
151
+ } as WithContext<SoftwareApplication>,
152
+ {
153
+ '@context': 'https://schema.org',
154
+ '@type': 'FAQPage',
155
+ mainEntity: faq.map((f) => ({
156
+ '@type': 'Question',
157
+ name: f.question,
158
+ acceptedAnswer: { '@type': 'Answer', text: f.answer },
159
+ })),
160
+ } as any,
161
+ {
162
+ '@context': 'https://schema.org',
163
+ '@type': 'HowTo',
164
+ name: title,
165
+ step: howTo.map((h) => ({
166
+ '@type': 'HowToStep',
167
+ name: h.name,
168
+ text: h.text,
169
+ })),
170
+ } as any,
171
+ ];
172
+
173
+ export const content: PetAgeLocaleContent = {
174
+ slug,
175
+ title,
176
+ description,
177
+ ui,
178
+ seo,
179
+
180
+ faq,
181
+ bibliography,
182
+ howTo,
183
+ schemas,
184
+ };
@@ -1,15 +1,15 @@
1
- ---
2
- import { SEORenderer } from '@jjlmoya/utils-shared';
3
- import { petAge } from './index';
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 petAge.i18n[locale]?.();
12
- if (!content) return null;
13
- ---
14
-
15
- {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { petAge } from './index';
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 petAge.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -0,0 +1,6 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { bibliography } from './bibliography';
4
+ ---
5
+
6
+ <SharedBibliography links={bibliography} />
@@ -0,0 +1,12 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export const bibliography: BibliographyEntry[] = [
4
+ {
5
+ name: 'International Air Transport Association: Traveler\'s Pet Corner',
6
+ url: 'https://www.iata.org/en/programs/cargo/live-animals/pets/',
7
+ },
8
+ {
9
+ name: 'USDA APHIS: Preparing Pets for Air Travel',
10
+ url: 'https://www.aphis.usda.gov/pet-travel/pets-on-planes/preparing-pets-air-travel',
11
+ },
12
+ ];
@@ -0,0 +1,89 @@
1
+ ---
2
+ import { Icon } from 'astro-icon/components';
3
+ import type { PetCarrierCrateSizePlannerUI } from './index';
4
+
5
+ interface Props {
6
+ ui: PetCarrierCrateSizePlannerUI;
7
+ }
8
+
9
+ const { ui } = Astro.props;
10
+ ---
11
+
12
+ <div class="pet-carrier-crate-size-planner" data-carrier-root>
13
+ <script is:inline type="application/json" data-carrier-ui set:html={JSON.stringify(ui)}></script>
14
+ <header class="carrier-hero">
15
+ <div class="carrier-hero-copy">
16
+ <p class="carrier-kicker">{ui.heroEyebrow}</p>
17
+ <p class="carrier-journey">{ui.journeyHint}</p>
18
+ </div>
19
+ <div class="unit-switch" role="group" aria-label={ui.unitLegend}>
20
+ <span>{ui.unitLegend}</span>
21
+ <button type="button" data-unit="metric" aria-pressed="true">{ui.metricUnit}</button>
22
+ <button type="button" data-unit="imperial" aria-pressed="false">{ui.imperialUnit}</button>
23
+ </div>
24
+ </header>
25
+ <div class="carrier-workbench">
26
+ <div class="carrier-controls">
27
+ <div class="carrier-panel-heading">
28
+ <span class="carrier-step">01</span>
29
+ <div><p>{ui.speciesStep}</p><h2>{ui.speciesLegend}</h2></div>
30
+ </div>
31
+ <fieldset>
32
+ <legend>{ui.speciesLegend}</legend>
33
+ <div class="choice-row">
34
+ <button type="button" data-species="cat" aria-pressed="true"><Icon name="mdi:cat" /><span>{ui.speciesCat}</span></button>
35
+ <button type="button" data-species="dog" aria-pressed="false"><Icon name="mdi:dog-side" /><span>{ui.speciesDog}</span></button>
36
+ </div>
37
+ </fieldset>
38
+ <fieldset>
39
+ <legend>{ui.modeLegend}</legend>
40
+ <div class="choice-row mode-row">
41
+ <button type="button" data-mode="car" aria-pressed="true"><Icon name="mdi:car-side" /><span>{ui.modeCar}</span></button>
42
+ <button type="button" data-mode="air" aria-pressed="false"><Icon name="mdi:airplane" /><span>{ui.modeAir}</span></button>
43
+ </div>
44
+ </fieldset>
45
+ <fieldset class="measurements">
46
+ <legend>{ui.measurementsLegend}</legend>
47
+ <label><span>{ui.noseTailLabel}<small>{ui.noseTailHint}</small></span><input data-field="noseToTail" type="number" min="1" step="0.1" inputmode="decimal" /><b data-length-unit>{ui.cmUnit}</b></label>
48
+ <label><span>{ui.elbowHeightLabel}</span><input data-field="elbowHeight" type="number" min="1" step="0.1" inputmode="decimal" /><b data-length-unit>{ui.cmUnit}</b></label>
49
+ <label><span>{ui.shoulderWidthLabel}</span><input data-field="shoulderWidth" type="number" min="1" step="0.1" inputmode="decimal" /><b data-length-unit>{ui.cmUnit}</b></label>
50
+ <label><span>{ui.standingHeightLabel}</span><input data-field="standingHeight" type="number" min="1" step="0.1" inputmode="decimal" /><b data-length-unit>{ui.cmUnit}</b></label>
51
+ <label><span>{ui.beddingLabel}</span><input data-field="bedding" type="number" min="0" step="0.1" inputmode="decimal" /><b data-length-unit>{ui.cmUnit}</b></label>
52
+ <label><span>{ui.weightLabel}</span><input data-field="weight" type="number" min="0.1" step="0.1" inputmode="decimal" /><b data-weight-unit>{ui.kgUnit}</b></label>
53
+ </fieldset>
54
+ <label class="snub-toggle"><input data-snub-nosed type="checkbox" /><span><strong>{ui.snubNosedLabel}</strong><small>{ui.snubNosedHint}</small></span></label>
55
+ <div class="preset-strip">
56
+ <span>{ui.presetLegend}</span>
57
+ <button type="button" data-preset="cat">{ui.presetCat}</button>
58
+ <button type="button" data-preset="smallDog">{ui.presetSmallDog}</button>
59
+ <button type="button" data-preset="mediumDog">{ui.presetMediumDog}</button>
60
+ <button type="button" data-preset="largeDog">{ui.presetLargeDog}</button>
61
+ </div>
62
+ <p class="carrier-error" data-error role="alert"></p>
63
+ </div>
64
+ <section class="carrier-result" data-result aria-live="polite">
65
+ <div class="result-heading"><div class="result-title-row"><div><p>{ui.resultEyebrow}</p><h2>{ui.resultTitle}</h2></div><span class="result-status" data-status></span></div><span class="result-status-detail" data-status-detail></span></div>
66
+ <div class="carrier-scene" data-scene aria-label={ui.blueprintLabel}></div>
67
+ <div class="dimension-ledger">
68
+ <p>{ui.resultDimensionLabel}</p>
69
+ <div class="dimension-primary"><div><span>{ui.lengthLabel}</span><strong data-length-result></strong></div><div><span>{ui.widthLabel}</span><strong data-width-result></strong></div><div><span>{ui.heightLabel}</span><strong data-height-result></strong></div></div>
70
+ <div class="dimension-context"><div><span>{ui.petWeightLabel}</span><strong data-weight-result></strong></div><div><span>{ui.journeyLabel}</span><strong data-mode-result></strong></div></div>
71
+ </div>
72
+ <div class="carrier-checklist">
73
+ <h3>{ui.checklistTitle}</h3>
74
+ <p><span>{ui.checkMark}</span>{ui.checklistStand}</p>
75
+ <p><span>{ui.checkMark}</span>{ui.checklistTurn}</p>
76
+ <p><span>{ui.checkMark}</span>{ui.checklistLie}</p>
77
+ <p><span>{ui.checkMark}</span>{ui.checklistAirline}</p>
78
+ </div>
79
+ </section>
80
+ </div>
81
+ <aside class="carrier-note"><strong>{ui.noteTitle}</strong><span>{ui.noteText}</span></aside>
82
+ <p class="carrier-method"><strong>{ui.methodTitle}</strong> {ui.methodText}</p>
83
+ </div>
84
+
85
+ <script>
86
+ import { initCarrierController } from './controller';
87
+ const root = document.querySelector<HTMLElement>('[data-carrier-root]');
88
+ if (root) initCarrierController(root);
89
+ </script>