@jjlmoya/utils-home 1.6.0 → 1.7.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 (102) hide show
  1. package/package.json +61 -60
  2. package/src/tests/i18n_coverage.test.ts +36 -0
  3. package/src/tests/schemas_fulfillment.test.ts +23 -0
  4. package/src/tests/slug_uniqueness.test.ts +81 -0
  5. package/src/tests/title_quality.test.ts +55 -0
  6. package/src/tool/dewPointCalculator/i18n/de.ts +178 -0
  7. package/src/tool/dewPointCalculator/i18n/en.ts +1 -1
  8. package/src/tool/dewPointCalculator/i18n/es.ts +1 -1
  9. package/src/tool/dewPointCalculator/i18n/fr.ts +1 -1
  10. package/src/tool/dewPointCalculator/i18n/id.ts +178 -0
  11. package/src/tool/dewPointCalculator/i18n/it.ts +178 -0
  12. package/src/tool/dewPointCalculator/i18n/ja.ts +178 -0
  13. package/src/tool/dewPointCalculator/i18n/ko.ts +178 -0
  14. package/src/tool/dewPointCalculator/i18n/nl.ts +178 -0
  15. package/src/tool/dewPointCalculator/i18n/pl.ts +178 -0
  16. package/src/tool/dewPointCalculator/i18n/pt.ts +178 -0
  17. package/src/tool/dewPointCalculator/i18n/ru.ts +178 -0
  18. package/src/tool/dewPointCalculator/i18n/sv.ts +178 -0
  19. package/src/tool/dewPointCalculator/i18n/tr.ts +178 -0
  20. package/src/tool/dewPointCalculator/i18n/zh.ts +178 -0
  21. package/src/tool/dewPointCalculator/index.ts +16 -6
  22. package/src/tool/heatingComparator/i18n/de.ts +340 -0
  23. package/src/tool/heatingComparator/i18n/id.ts +324 -0
  24. package/src/tool/heatingComparator/i18n/it.ts +336 -0
  25. package/src/tool/heatingComparator/i18n/ja.ts +311 -0
  26. package/src/tool/heatingComparator/i18n/ko.ts +307 -0
  27. package/src/tool/heatingComparator/i18n/nl.ts +336 -0
  28. package/src/tool/heatingComparator/i18n/pl.ts +311 -0
  29. package/src/tool/heatingComparator/i18n/pt.ts +336 -0
  30. package/src/tool/heatingComparator/i18n/ru.ts +307 -0
  31. package/src/tool/heatingComparator/i18n/sv.ts +311 -0
  32. package/src/tool/heatingComparator/i18n/tr.ts +324 -0
  33. package/src/tool/heatingComparator/i18n/zh.ts +307 -0
  34. package/src/tool/heatingComparator/index.ts +13 -1
  35. package/src/tool/ledSavingCalculator/i18n/de.ts +208 -0
  36. package/src/tool/ledSavingCalculator/i18n/fr.ts +1 -1
  37. package/src/tool/ledSavingCalculator/i18n/id.ts +208 -0
  38. package/src/tool/ledSavingCalculator/i18n/it.ts +208 -0
  39. package/src/tool/ledSavingCalculator/i18n/ja.ts +208 -0
  40. package/src/tool/ledSavingCalculator/i18n/ko.ts +208 -0
  41. package/src/tool/ledSavingCalculator/i18n/nl.ts +208 -0
  42. package/src/tool/ledSavingCalculator/i18n/pl.ts +208 -0
  43. package/src/tool/ledSavingCalculator/i18n/pt.ts +208 -0
  44. package/src/tool/ledSavingCalculator/i18n/ru.ts +208 -0
  45. package/src/tool/ledSavingCalculator/i18n/sv.ts +208 -0
  46. package/src/tool/ledSavingCalculator/i18n/tr.ts +208 -0
  47. package/src/tool/ledSavingCalculator/i18n/zh.ts +208 -0
  48. package/src/tool/ledSavingCalculator/index.ts +16 -7
  49. package/src/tool/projectorCalculator/i18n/de.ts +180 -0
  50. package/src/tool/projectorCalculator/i18n/fr.ts +1 -1
  51. package/src/tool/projectorCalculator/i18n/id.ts +181 -0
  52. package/src/tool/projectorCalculator/i18n/it.ts +180 -0
  53. package/src/tool/projectorCalculator/i18n/ja.ts +180 -0
  54. package/src/tool/projectorCalculator/i18n/ko.ts +180 -0
  55. package/src/tool/projectorCalculator/i18n/nl.ts +180 -0
  56. package/src/tool/projectorCalculator/i18n/pl.ts +180 -0
  57. package/src/tool/projectorCalculator/i18n/pt.ts +180 -0
  58. package/src/tool/projectorCalculator/i18n/ru.ts +180 -0
  59. package/src/tool/projectorCalculator/i18n/sv.ts +180 -0
  60. package/src/tool/projectorCalculator/i18n/tr.ts +180 -0
  61. package/src/tool/projectorCalculator/i18n/zh.ts +180 -0
  62. package/src/tool/projectorCalculator/index.ts +15 -6
  63. package/src/tool/qrGenerator/i18n/de.ts +203 -0
  64. package/src/tool/qrGenerator/i18n/id.ts +151 -0
  65. package/src/tool/qrGenerator/i18n/it.ts +174 -0
  66. package/src/tool/qrGenerator/i18n/ja.ts +151 -0
  67. package/src/tool/qrGenerator/i18n/ko.ts +151 -0
  68. package/src/tool/qrGenerator/i18n/nl.ts +151 -0
  69. package/src/tool/qrGenerator/i18n/pl.ts +151 -0
  70. package/src/tool/qrGenerator/i18n/pt.ts +151 -0
  71. package/src/tool/qrGenerator/i18n/ru.ts +151 -0
  72. package/src/tool/qrGenerator/i18n/sv.ts +151 -0
  73. package/src/tool/qrGenerator/i18n/tr.ts +151 -0
  74. package/src/tool/qrGenerator/i18n/zh.ts +151 -0
  75. package/src/tool/qrGenerator/index.ts +17 -9
  76. package/src/tool/solarCalculator/i18n/de.ts +146 -0
  77. package/src/tool/solarCalculator/i18n/id.ts +126 -0
  78. package/src/tool/solarCalculator/i18n/it.ts +126 -0
  79. package/src/tool/solarCalculator/i18n/ja.ts +126 -0
  80. package/src/tool/solarCalculator/i18n/ko.ts +121 -0
  81. package/src/tool/solarCalculator/i18n/nl.ts +120 -0
  82. package/src/tool/solarCalculator/i18n/pl.ts +121 -0
  83. package/src/tool/solarCalculator/i18n/pt.ts +126 -0
  84. package/src/tool/solarCalculator/i18n/ru.ts +110 -0
  85. package/src/tool/solarCalculator/i18n/sv.ts +110 -0
  86. package/src/tool/solarCalculator/i18n/tr.ts +120 -0
  87. package/src/tool/solarCalculator/i18n/zh.ts +121 -0
  88. package/src/tool/solarCalculator/index.ts +17 -9
  89. package/src/tool/tariffComparator/i18n/de.ts +133 -0
  90. package/src/tool/tariffComparator/i18n/id.ts +133 -0
  91. package/src/tool/tariffComparator/i18n/it.ts +133 -0
  92. package/src/tool/tariffComparator/i18n/ja.ts +133 -0
  93. package/src/tool/tariffComparator/i18n/ko.ts +133 -0
  94. package/src/tool/tariffComparator/i18n/nl.ts +133 -0
  95. package/src/tool/tariffComparator/i18n/pl.ts +133 -0
  96. package/src/tool/tariffComparator/i18n/pt.ts +133 -0
  97. package/src/tool/tariffComparator/i18n/ru.ts +106 -0
  98. package/src/tool/tariffComparator/i18n/sv.ts +111 -0
  99. package/src/tool/tariffComparator/i18n/tr.ts +133 -0
  100. package/src/tool/tariffComparator/i18n/zh.ts +133 -0
  101. package/src/tool/tariffComparator/index.ts +16 -7
  102. package/src/types.ts +1 -1
@@ -0,0 +1,106 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { TariffComparatorUI } from '../ui';
4
+
5
+ const slug = 'sravnenie-tarifov-elektrichestva';
6
+ const title = 'Сравнение тарифов ЖКХ: Свободный vs Регулируемый';
7
+ const description =
8
+ 'Узнайте, какой тариф на свет вам выгоднее. Сравните регулируемый рынок и свободные предложения на основе вашего потребления.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'Где найти мое годовое потребление?',
13
+ answer:
14
+ 'Эта информация должна быть в вашем последнем счете за электричество в графе "Годовое потребление" или "Итого за год" в кВт·ч.',
15
+ },
16
+ ];
17
+
18
+ const howToData = [
19
+ {
20
+ name: 'Изучите счет',
21
+ text: 'Найдите потребление за год и вашу разрешенную мощность.',
22
+ },
23
+ ];
24
+
25
+ const faqSchema: WithContext<FAQPage> = {
26
+ '@context': 'https://schema.org',
27
+ '@type': 'FAQPage',
28
+ mainEntity: faqData.map((item) => ({
29
+ '@type': 'Question',
30
+ name: item.question,
31
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
32
+ })),
33
+ };
34
+
35
+ const howToSchema: WithContext<HowTo> = {
36
+ '@context': 'https://schema.org',
37
+ '@type': 'HowTo',
38
+ name: title,
39
+ description,
40
+ step: howToData.map((step) => ({
41
+ '@type': 'HowToStep',
42
+ name: step.name,
43
+ text: step.text,
44
+ })),
45
+ };
46
+
47
+ const appSchema: WithContext<SoftwareApplication> = {
48
+ '@context': 'https://schema.org',
49
+ '@type': 'SoftwareApplication',
50
+ name: title,
51
+ description,
52
+ applicationCategory: 'UtilityApplication',
53
+ operatingSystem: 'All',
54
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'RUB' },
55
+ inLanguage: 'ru',
56
+ };
57
+
58
+ export const content: ToolLocaleContent<TariffComparatorUI> = {
59
+ slug,
60
+ title,
61
+ description,
62
+ faqTitle: 'Часто задаваемые вопросы',
63
+ faq: faqData,
64
+ bibliographyTitle: 'Библиография',
65
+ bibliography: [
66
+ { name: 'Федеральная антимонопольная служба — Тарифы', url: 'https://fas.gov.ru' },
67
+ ],
68
+ howTo: howToData,
69
+ schemas: [faqSchema, howToSchema, appSchema],
70
+ seo: [
71
+ {
72
+ type: 'title',
73
+ text: 'Экономия на счетах за свет',
74
+ level: 2,
75
+ },
76
+ {
77
+ type: 'paragraph',
78
+ html: 'Правильный выбор тарифа может сэкономить тысячи в год.',
79
+ },
80
+ ],
81
+ ui: {
82
+ labelConsumption: 'Годовое потребление',
83
+ unitKwhYear: 'кВт·ч/год',
84
+ labelPower: 'Разрешенная мощность',
85
+ unitKw: 'кВт',
86
+ labelMarket: 'Регулируемый тариф',
87
+ labelFree: 'Свободный рынок (Фикс)',
88
+ labelAnnualEst: 'Оценка за год',
89
+ labelPowerTerm: 'За мощность (Фикс)',
90
+ labelEnergyTerm: 'За энергию (Перем)',
91
+ labelDashboard: 'Энерго-панель',
92
+ labelMaxPower: 'Пиковую нагрузку',
93
+ labelMaxPowerEst: 'Оценка пика',
94
+ labelCo2: 'Углеродный след',
95
+ labelCo2Est: 'Оценка за год',
96
+ labelSimulator: 'Симулятор сценариев',
97
+ labelSolar: 'Солнечная энергия',
98
+ labelSolarDesc: 'Сэкономить с панелями (снижение 30%)',
99
+ labelShift: 'Перенос на ночь',
100
+ labelShiftDesc: 'Потребление в дешевые часы:',
101
+ badgeBetter: 'Лучший вариант',
102
+ badgeWorseYear: 'год',
103
+ currencySign: '₽',
104
+ monthLabels: 'Янв,Фев,Мар,Апр,Май,Июн,Июл,Авг,Сен,Окт,Ноя,Дек',
105
+ },
106
+ };
@@ -0,0 +1,111 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { TariffComparatorUI } from '../ui';
4
+
5
+ const slug = 'jamfor-deltra-priser';
6
+ const title = 'Jämför Elavtal: Rörligt vs Fast Pris';
7
+ const description =
8
+ 'Se vilket elavtal som lönar sig mest för dig. Jämför det rörliga marknadspriset mot fasta avtal baserat på din årsförbrukning.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'Vad är bäst, fast eller rörligt elpris?',
13
+ answer:
14
+ 'Fast pris ger trygghet och förutsägbarhet. Rörligt pris är oftast billigast i längden men kan svänga kraftigt.',
15
+ },
16
+ {
17
+ question: 'Var hittar jag min årsförbrukning?',
18
+ answer:
19
+ 'Denna siffra hittar du på din senaste årsfaktura från ditt elbolag, angivet i kWh.',
20
+ },
21
+ ];
22
+
23
+ const howToData = [
24
+ {
25
+ name: 'Kolla fakturan',
26
+ text: 'Leta upp årsförbrukning (kWh) och din säkringsstorlek (kW).',
27
+ },
28
+ ];
29
+
30
+ const faqSchema: WithContext<FAQPage> = {
31
+ '@context': 'https://schema.org',
32
+ '@type': 'FAQPage',
33
+ mainEntity: faqData.map((item) => ({
34
+ '@type': 'Question',
35
+ name: item.question,
36
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
37
+ })),
38
+ };
39
+
40
+ const howToSchema: WithContext<HowTo> = {
41
+ '@context': 'https://schema.org',
42
+ '@type': 'HowTo',
43
+ name: title,
44
+ description,
45
+ step: howToData.map((step) => ({
46
+ '@type': 'HowToStep',
47
+ name: step.name,
48
+ text: step.text,
49
+ })),
50
+ };
51
+
52
+ const appSchema: WithContext<SoftwareApplication> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'SoftwareApplication',
55
+ name: title,
56
+ description,
57
+ applicationCategory: 'UtilityApplication',
58
+ operatingSystem: 'All',
59
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'SEK' },
60
+ inLanguage: 'sv',
61
+ };
62
+
63
+ export const content: ToolLocaleContent<TariffComparatorUI> = {
64
+ slug,
65
+ title,
66
+ description,
67
+ faqTitle: 'Vanliga Frågor',
68
+ faq: faqData,
69
+ bibliographyTitle: 'Referenser',
70
+ bibliography: [
71
+ { name: 'Energimarknadsinspektionen', url: 'https://www.ei.se' },
72
+ ],
73
+ howTo: howToData,
74
+ schemas: [faqSchema, howToSchema, appSchema],
75
+ seo: [
76
+ {
77
+ type: 'title',
78
+ text: 'Sänk din elkostnad',
79
+ level: 2,
80
+ },
81
+ {
82
+ type: 'paragraph',
83
+ html: 'Att välja rätt avtal kan spara tusenlappar per år.',
84
+ },
85
+ ],
86
+ ui: {
87
+ labelConsumption: 'Årsförbrukning',
88
+ unitKwhYear: 'kWh/år',
89
+ labelPower: 'Säkringsstorlek',
90
+ unitKw: 'kW',
91
+ labelMarket: 'Rörligt / Marknadspris',
92
+ labelFree: 'Fast Pris',
93
+ labelAnnualEst: 'Beräknad årskostnad',
94
+ labelPowerTerm: 'Fasta Avgifter',
95
+ labelEnergyTerm: 'Elkostnad (Rörlig)',
96
+ labelDashboard: 'Energiöversikt',
97
+ labelMaxPower: 'Toppbelastning',
98
+ labelMaxPowerEst: 'Beräknad topp',
99
+ labelCo2: 'Klimatavtryck',
100
+ labelCo2Est: 'Beräknat per år',
101
+ labelSimulator: 'Scenarie-simulator',
102
+ labelSolar: 'Solenergi',
103
+ labelSolarDesc: 'Simulera vinst med paneler (30% minskning)',
104
+ labelShift: 'Tidsförflyttning',
105
+ labelShiftDesc: 'Förbrukning flyttad till lågpris:',
106
+ badgeBetter: 'Billigaste alternativet',
107
+ badgeWorseYear: 'år',
108
+ currencySign: 'kr',
109
+ monthLabels: 'Jan,Feb,Mar,Apr,Maj,Jun,Jul,Aug,Sep,Okt,Nov,Dec',
110
+ },
111
+ };
@@ -0,0 +1,133 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { TariffComparatorUI } from '../ui';
4
+
5
+ const slug = 'elektrik-tarifesi-karsilastirma';
6
+ const title = 'Elektrik Tarifesi Karşılaştırıcı: Sabit vs Değişken';
7
+ const description =
8
+ 'Hangi elektrik tarifesinin size daha uygun olduğunu keşfedin. Tüketiminize göre sabit fiyatlı ve değişken tarifeleri karşılaştırın.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'Sabit fiyat mı yoksa değişken tarife mi daha iyidir?',
13
+ answer:
14
+ 'Sabit fiyatlar öngörülebilirlik sağlar. Değişken tarifeler piyasa fiyatları düştüğünde avantajlı olabilir ancak risklidir.',
15
+ },
16
+ {
17
+ question: 'Yıllık tüketimimi nasıl öğrenebilirim?',
18
+ answer:
19
+ 'Bu bilgiyi elektrik faturanızda "Yıllık Tüketim" (kWh) başlığı altında bulabilirsiniz.',
20
+ },
21
+ {
22
+ question: 'Sözleşme gücü nedir?',
23
+ answer:
24
+ 'Aynı anda kullanabileceğiniz maksimum elektrik yüküdür (kW).',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ {
30
+ name: 'Faturanızı kontrol edin',
31
+ text: 'Yıllık tüketim (kWh) ve gücü (kW) bulun.',
32
+ },
33
+ {
34
+ name: 'Değerleri girin',
35
+ text: 'Sürgüleri gerçek verilerinize göre ayarlayın.',
36
+ },
37
+ {
38
+ name: 'Sonuçları karşılaştırın',
39
+ text: 'İki seçenek arasındaki yıllık maliyet farkını görün.',
40
+ },
41
+ ];
42
+
43
+ const faqSchema: WithContext<FAQPage> = {
44
+ '@context': 'https://schema.org',
45
+ '@type': 'FAQPage',
46
+ mainEntity: faqData.map((item) => ({
47
+ '@type': 'Question',
48
+ name: item.question,
49
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
50
+ })),
51
+ };
52
+
53
+ const howToSchema: WithContext<HowTo> = {
54
+ '@context': 'https://schema.org',
55
+ '@type': 'HowTo',
56
+ name: title,
57
+ description,
58
+ step: howToData.map((step) => ({
59
+ '@type': 'HowToStep',
60
+ name: step.name,
61
+ text: step.text,
62
+ })),
63
+ };
64
+
65
+ const appSchema: WithContext<SoftwareApplication> = {
66
+ '@context': 'https://schema.org',
67
+ '@type': 'SoftwareApplication',
68
+ name: title,
69
+ description,
70
+ applicationCategory: 'UtilityApplication',
71
+ operatingSystem: 'All',
72
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'TRY' },
73
+ inLanguage: 'tr',
74
+ };
75
+
76
+ export const content: ToolLocaleContent<TariffComparatorUI> = {
77
+ slug,
78
+ title,
79
+ description,
80
+ faqTitle: 'Sıkça Sorulan Sorular',
81
+ faq: faqData,
82
+ bibliographyTitle: 'Kaynakça',
83
+ bibliography: [
84
+ { name: 'EPDK — Enerji Piyasası Düzenleme Kurumu', url: 'https://www.epdk.gov.tr' },
85
+ ],
86
+ howTo: howToData,
87
+ schemas: [faqSchema, howToSchema, appSchema],
88
+ seo: [
89
+ {
90
+ type: 'title',
91
+ text: 'Elektrik faturasında tasarruf edin',
92
+ level: 2,
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html: 'Doğru tarifeyi seçmek yılda önemli miktarda tasarruf sağlayabilir. Karşılaştırıcımızı kullanarak karar verin.',
97
+ },
98
+ {
99
+ type: 'summary',
100
+ title: 'Tasarruf ipuçları',
101
+ items: [
102
+ 'Piyasadaki yeni teklifleri düzenli olarak takip edin.',
103
+ 'İhtiyacınızdan fazla sözleşme gücü bedeli ödemeyin.',
104
+ 'Mümkünse tüketiminizi ucuz saatlere kaydırın.',
105
+ ],
106
+ },
107
+ ],
108
+ ui: {
109
+ labelConsumption: 'Yıllık Tüketim',
110
+ unitKwhYear: 'kWh/yıl',
111
+ labelPower: 'Sözleşme Gücü',
112
+ unitKw: 'kW',
113
+ labelMarket: 'Değişken Tarife',
114
+ labelFree: 'Sabit Fiyatlı Tarife',
115
+ labelAnnualEst: 'Yıllık Tahmin',
116
+ labelPowerTerm: 'Güç Bedeli (Sabit)',
117
+ labelEnergyTerm: 'Enerji Bedeli (Değişken)',
118
+ labelDashboard: 'Enerji Paneli',
119
+ labelMaxPower: 'Güç Zirvesi',
120
+ labelMaxPowerEst: 'Zirve tahmini',
121
+ labelCo2: 'CO₂ Ayak İzi',
122
+ labelCo2Est: 'Yıllık tahmin',
123
+ labelSimulator: 'Senaryo Simülatörü',
124
+ labelSolar: 'Güneş Paneli',
125
+ labelSolarDesc: 'Panel ile tasarruf simülasyonu (%30 düşüş)',
126
+ labelShift: 'Ucuz Saate Kaydırma',
127
+ labelShiftDesc: 'Ucuz saatlere kaydırılan tüketim:',
128
+ badgeBetter: 'En ucuz seçenek',
129
+ badgeWorseYear: 'yıl',
130
+ currencySign: '₺',
131
+ monthLabels: 'Oca,Şub,Mar,Nis,May,Haz,Tem,Ağu,Eyl,Eki,Kas,Ara',
132
+ },
133
+ };
@@ -0,0 +1,133 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { TariffComparatorUI } from '../ui';
4
+
5
+ const slug = 'electricity-tariff-comparator';
6
+ const title = '电费套餐对比:自由市场 vs 监管市场';
7
+ const description =
8
+ '了解哪种电费套餐最适合您。根据您的实际用电量对比自由市场套餐与监管市场套餐。';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '固定价格和动态价格哪个更好?',
13
+ answer:
14
+ '固定价格提供可预测性。动态价格(如监管市场)在发电量充沛时可能极低,但存在波动风险。本计算器可帮您做出选择。',
15
+ },
16
+ {
17
+ question: '如何获取我的年用电量?',
18
+ answer:
19
+ '您可以在最新的电费账单中找到“年用电量”(kWh) 这一数值。',
20
+ },
21
+ {
22
+ question: '什么是合同功率?',
23
+ answer:
24
+ '指您可以同时使用的最大电力负荷 (kW)。',
25
+ },
26
+ ];
27
+
28
+ const howToData = [
29
+ {
30
+ name: '查看账单',
31
+ text: '查找年用电量 (kWh) 和合同功率 (kW)。',
32
+ },
33
+ {
34
+ name: '调整数值',
35
+ text: '根据您的实际数据调节滑块。',
36
+ },
37
+ {
38
+ name: '对比结果',
39
+ text: '查看两种模式下的预估年支出差异。',
40
+ },
41
+ ];
42
+
43
+ const faqSchema: WithContext<FAQPage> = {
44
+ '@context': 'https://schema.org',
45
+ '@type': 'FAQPage',
46
+ mainEntity: faqData.map((item) => ({
47
+ '@type': 'Question',
48
+ name: item.question,
49
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
50
+ })),
51
+ };
52
+
53
+ const howToSchema: WithContext<HowTo> = {
54
+ '@context': 'https://schema.org',
55
+ '@type': 'HowTo',
56
+ name: title,
57
+ description,
58
+ step: howToData.map((step) => ({
59
+ '@type': 'HowToStep',
60
+ name: step.name,
61
+ text: step.text,
62
+ })),
63
+ };
64
+
65
+ const appSchema: WithContext<SoftwareApplication> = {
66
+ '@context': 'https://schema.org',
67
+ '@type': 'SoftwareApplication',
68
+ name: title,
69
+ description,
70
+ applicationCategory: 'UtilityApplication',
71
+ operatingSystem: 'All',
72
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' },
73
+ inLanguage: 'zh',
74
+ };
75
+
76
+ export const content: ToolLocaleContent<TariffComparatorUI> = {
77
+ slug,
78
+ title,
79
+ description,
80
+ faqTitle: '常见问题',
81
+ faq: faqData,
82
+ bibliographyTitle: '参考资料',
83
+ bibliography: [
84
+ { name: '能源监管部门官方指南', url: 'https://www.nea.gov.cn' },
85
+ ],
86
+ howTo: howToData,
87
+ schemas: [faqSchema, howToSchema, appSchema],
88
+ seo: [
89
+ {
90
+ type: 'title',
91
+ text: '节省您的电力开支',
92
+ level: 2,
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html: '选择合适的套餐每年可节省数百元。利用我们的对比工具做出决定。',
97
+ },
98
+ {
99
+ type: 'summary',
100
+ title: '省钱策略',
101
+ items: [
102
+ '定期对比市场上的新套餐。',
103
+ '合理设定合同功率,避免不必要的月租费。',
104
+ '尽量将大功率用电安排在低谷时段。',
105
+ ],
106
+ },
107
+ ],
108
+ ui: {
109
+ labelConsumption: '年用电量',
110
+ unitKwhYear: 'kWh/年',
111
+ labelPower: '合同功率',
112
+ unitKw: 'kW',
113
+ labelMarket: '监管市场 (动态)',
114
+ labelFree: '自由市场 (固定)',
115
+ labelAnnualEst: '预估年支出',
116
+ labelPowerTerm: '功率费 (固定)',
117
+ labelEnergyTerm: '电费 (变量)',
118
+ labelDashboard: '能源面板',
119
+ labelMaxPower: '峰值功率',
120
+ labelMaxPowerEst: '预估峰值',
121
+ labelCo2: '碳足迹',
122
+ labelCo2Est: '预估年排放量',
123
+ labelSimulator: '方案模拟器',
124
+ labelSolar: '太阳能自用',
125
+ labelSolarDesc: '模拟安装电池板后的节省(默认减少 30% 用电)',
126
+ labelShift: '低谷时段转移',
127
+ labelShiftDesc: '转移至低谷时段的比例:',
128
+ badgeBetter: '更佳性价比',
129
+ badgeWorseYear: '年',
130
+ currencySign: '¥',
131
+ monthLabels: '1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月',
132
+ },
133
+ };
@@ -7,20 +7,29 @@ import type { TariffComparatorUI } from './ui';
7
7
 
8
8
  export type TariffComparatorLocaleContent = ToolLocaleContent<TariffComparatorUI>;
9
9
 
10
- import { content as es } from './i18n/es';
11
- import { content as en } from './i18n/en';
12
- import { content as fr } from './i18n/fr';
13
10
 
14
11
  export const tariffComparator: HomeToolEntry<TariffComparatorUI> = {
15
12
  id: 'tariff-comparator',
16
13
  icons: {
17
14
  bg: 'mdi:lightning-bolt',
18
- fg: 'mdi:compare',
15
+ fg: 'mdi:compare-horizontal',
19
16
  },
20
17
  i18n: {
21
- es: async () => es,
22
- en: async () => en,
23
- fr: async () => fr,
18
+ de: async () => (await import('./i18n/de')).content,
19
+ en: async () => (await import('./i18n/en')).content,
20
+ es: async () => (await import('./i18n/es')).content,
21
+ fr: async () => (await import('./i18n/fr')).content,
22
+ id: async () => (await import('./i18n/id')).content,
23
+ it: async () => (await import('./i18n/it')).content,
24
+ ja: async () => (await import('./i18n/ja')).content,
25
+ ko: async () => (await import('./i18n/ko')).content,
26
+ nl: async () => (await import('./i18n/nl')).content,
27
+ pl: async () => (await import('./i18n/pl')).content,
28
+ pt: async () => (await import('./i18n/pt')).content,
29
+ ru: async () => (await import('./i18n/ru')).content,
30
+ sv: async () => (await import('./i18n/sv')).content,
31
+ tr: async () => (await import('./i18n/tr')).content,
32
+ zh: async () => (await import('./i18n/zh')).content,
24
33
  },
25
34
  };
26
35
 
package/src/types.ts CHANGED
@@ -5,7 +5,7 @@ export type { SEOSection };
5
5
 
6
6
  export type KnownLocale =
7
7
  | 'ar' | 'da' | 'de' | 'en' | 'es' | 'fi'
8
- | 'fr' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
8
+ | 'fr' | 'id' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
9
9
  | 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
10
10
 
11
11
  export interface FAQItem {