@jjlmoya/utils-finance 1.30.0 → 1.32.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 (215) hide show
  1. package/package.json +1 -1
  2. package/src/category/i18n/en.ts +1 -1
  3. package/src/category/i18n/es.ts +4 -4
  4. package/src/category/i18n/fr.ts +159 -159
  5. package/src/category/i18n/pl.ts +1 -1
  6. package/src/category/i18n/ru.ts +158 -158
  7. package/src/category/index.ts +39 -38
  8. package/src/category/seo.astro +1 -1
  9. package/src/components/PreviewNavSidebar.astro +1 -1
  10. package/src/components/PreviewToolbar.astro +1 -1
  11. package/src/data.ts +1 -1
  12. package/src/entries.ts +4 -1
  13. package/src/env.d.ts +1 -1
  14. package/src/index.ts +1 -0
  15. package/src/layouts/PreviewLayout.astro +113 -113
  16. package/src/pages/index.astro +1 -1
  17. package/src/tests/bibliography_wellformed_export.test.ts +46 -0
  18. package/src/tests/category_seo_quality.test.ts +76 -0
  19. package/src/tests/faq_count.test.ts +1 -1
  20. package/src/tests/locale_completeness.test.ts +2 -2
  21. package/src/tests/mocks/astro_mock.js +1 -1
  22. package/src/tests/no_h1_in_components.test.ts +1 -1
  23. package/src/tests/script_density.test.ts +94 -94
  24. package/src/tests/seo_length.test.ts +23 -23
  25. package/src/tests/seo_translation_completeness.test.ts +69 -0
  26. package/src/tests/seo_wellformed_export.test.ts +65 -0
  27. package/src/tests/tool_validation.test.ts +17 -17
  28. package/src/tool/compoundInterest/compound-interest-calculator.css +236 -236
  29. package/src/tool/compoundInterest/entry.ts +32 -32
  30. package/src/tool/compoundInterest/i18n/de.ts +195 -195
  31. package/src/tool/compoundInterest/i18n/fr.ts +195 -195
  32. package/src/tool/compoundInterest/i18n/it.ts +195 -195
  33. package/src/tool/compoundInterest/i18n/pl.ts +194 -194
  34. package/src/tool/compoundInterest/i18n/ru.ts +195 -195
  35. package/src/tool/compoundInterest/i18n/tr.ts +195 -195
  36. package/src/tool/compoundInterest/i18n/zh.ts +189 -189
  37. package/src/tool/compoundInterest/seo.astro +15 -15
  38. package/src/tool/courtFeeCalculator/i18n/it.ts +158 -158
  39. package/src/tool/courtFeeCalculator/i18n/ru.ts +158 -158
  40. package/src/tool/courtFeeCalculator/i18n/tr.ts +158 -158
  41. package/src/tool/courtFeeCalculator/seo.astro +15 -15
  42. package/src/tool/courtFeeCalculator/spanish-court-fees-calculator.css +197 -197
  43. package/src/tool/debtSnowball/bibliography.ts +12 -12
  44. package/src/tool/debtSnowball/i18n/de.ts +16 -16
  45. package/src/tool/debtSnowball/i18n/id.ts +16 -16
  46. package/src/tool/debtSnowball/i18n/it.ts +168 -168
  47. package/src/tool/debtSnowball/i18n/nl.ts +16 -16
  48. package/src/tool/debtSnowball/i18n/pl.ts +168 -168
  49. package/src/tool/debtSnowball/i18n/pt.ts +1 -1
  50. package/src/tool/debtSnowball/i18n/ru.ts +1 -1
  51. package/src/tool/debtSnowball/i18n/sv.ts +22 -29
  52. package/src/tool/debtSnowball/i18n/tr.ts +168 -168
  53. package/src/tool/debtSnowball/i18n/zh.ts +168 -168
  54. package/src/tool/debtSnowball/seo.astro +15 -15
  55. package/src/tool/dividendYield/bibliography.astro +14 -0
  56. package/src/tool/dividendYield/bibliography.ts +12 -0
  57. package/src/tool/dividendYield/component.astro +83 -0
  58. package/src/tool/dividendYield/controller.ts +85 -0
  59. package/src/tool/dividendYield/dividend-yield-calculator.css +352 -0
  60. package/src/tool/dividendYield/dom-views.ts +58 -0
  61. package/src/tool/dividendYield/entry.ts +29 -0
  62. package/src/tool/dividendYield/evaluator.ts +16 -0
  63. package/src/tool/dividendYield/i18n/de.ts +53 -0
  64. package/src/tool/dividendYield/i18n/en.ts +138 -0
  65. package/src/tool/dividendYield/i18n/es.ts +49 -0
  66. package/src/tool/dividendYield/i18n/fr.ts +49 -0
  67. package/src/tool/dividendYield/i18n/id.ts +49 -0
  68. package/src/tool/dividendYield/i18n/it.ts +49 -0
  69. package/src/tool/dividendYield/i18n/ja.ts +49 -0
  70. package/src/tool/dividendYield/i18n/ko.ts +25 -0
  71. package/src/tool/dividendYield/i18n/nl.ts +25 -0
  72. package/src/tool/dividendYield/i18n/pl.ts +25 -0
  73. package/src/tool/dividendYield/i18n/pt.ts +25 -0
  74. package/src/tool/dividendYield/i18n/ru.ts +25 -0
  75. package/src/tool/dividendYield/i18n/sv.ts +25 -0
  76. package/src/tool/dividendYield/i18n/tr.ts +25 -0
  77. package/src/tool/dividendYield/i18n/zh.ts +25 -0
  78. package/src/tool/dividendYield/index.ts +11 -0
  79. package/src/tool/dividendYield/logic.test.ts +73 -0
  80. package/src/tool/dividendYield/logic.ts +55 -0
  81. package/src/tool/dividendYield/seo.astro +14 -0
  82. package/src/tool/dividendYield/storage.ts +24 -0
  83. package/src/tool/dividendYield/ui.ts +33 -0
  84. package/src/tool/financialFreedom/financial-freedom-calculator.css +311 -311
  85. package/src/tool/financialFreedom/i18n/en.ts +182 -182
  86. package/src/tool/financialFreedom/i18n/fr.ts +128 -128
  87. package/src/tool/financialFreedom/i18n/id.ts +24 -7
  88. package/src/tool/financialFreedom/i18n/it.ts +24 -7
  89. package/src/tool/financialFreedom/i18n/ja.ts +1 -1
  90. package/src/tool/financialFreedom/i18n/nl.ts +24 -7
  91. package/src/tool/financialFreedom/i18n/pl.ts +24 -7
  92. package/src/tool/financialFreedom/i18n/pt.ts +24 -7
  93. package/src/tool/financialFreedom/i18n/ru.ts +128 -128
  94. package/src/tool/financialFreedom/i18n/sv.ts +1 -1
  95. package/src/tool/financialFreedom/i18n/tr.ts +2 -2
  96. package/src/tool/financialFreedom/i18n/zh.ts +128 -128
  97. package/src/tool/fireCalculator/i18n/it.ts +241 -241
  98. package/src/tool/fireCalculator/i18n/ru.ts +241 -241
  99. package/src/tool/fireCalculator/i18n/tr.ts +241 -241
  100. package/src/tool/fireCalculator/i18n/zh.ts +241 -241
  101. package/src/tool/fireCalculator/seo.astro +15 -15
  102. package/src/tool/ibanBicSwiftConverter/i18n/fr.ts +151 -151
  103. package/src/tool/ibanBicSwiftConverter/i18n/it.ts +118 -118
  104. package/src/tool/ibanBicSwiftConverter/i18n/ru.ts +118 -118
  105. package/src/tool/ibanBicSwiftConverter/i18n/tr.ts +118 -118
  106. package/src/tool/ibanBicSwiftConverter/iban-to-bic-swift-converter.css +366 -366
  107. package/src/tool/ibanBicSwiftConverter/seo.astro +15 -15
  108. package/src/tool/inflation/bibliography.ts +20 -20
  109. package/src/tool/inflation/entry.ts +32 -32
  110. package/src/tool/inflation/i18n/de.ts +284 -284
  111. package/src/tool/inflation/i18n/fr.ts +284 -284
  112. package/src/tool/inflation/i18n/it.ts +284 -284
  113. package/src/tool/inflation/i18n/nl.ts +284 -284
  114. package/src/tool/inflation/i18n/pl.ts +284 -284
  115. package/src/tool/inflation/i18n/pt.ts +284 -284
  116. package/src/tool/inflation/i18n/ru.ts +284 -284
  117. package/src/tool/inflation/i18n/sv.ts +284 -284
  118. package/src/tool/inflation/i18n/tr.ts +284 -284
  119. package/src/tool/inflation/i18n/zh.ts +284 -284
  120. package/src/tool/inflation/seo.astro +15 -15
  121. package/src/tool/lateInterest/bibliography.ts +16 -16
  122. package/src/tool/lateInterest/entry.ts +32 -32
  123. package/src/tool/lateInterest/i18n/de.ts +213 -213
  124. package/src/tool/lateInterest/i18n/es.ts +213 -213
  125. package/src/tool/lateInterest/i18n/it.ts +213 -213
  126. package/src/tool/lateInterest/i18n/nl.ts +213 -213
  127. package/src/tool/lateInterest/i18n/pl.ts +213 -213
  128. package/src/tool/lateInterest/i18n/pt.ts +213 -213
  129. package/src/tool/lateInterest/i18n/ru.ts +213 -213
  130. package/src/tool/lateInterest/i18n/sv.ts +213 -213
  131. package/src/tool/lateInterest/i18n/tr.ts +213 -213
  132. package/src/tool/lateInterest/i18n/zh.ts +213 -213
  133. package/src/tool/lateInterest/seo.astro +15 -15
  134. package/src/tool/legalInterestRate/i18n/it.ts +129 -129
  135. package/src/tool/legalInterestRate/i18n/ru.ts +129 -129
  136. package/src/tool/legalInterestRate/i18n/tr.ts +128 -121
  137. package/src/tool/legalInterestRate/i18n/zh.ts +11 -4
  138. package/src/tool/legalInterestRate/seo.astro +15 -15
  139. package/src/tool/lotteryOptimizer/i18n/it.ts +163 -163
  140. package/src/tool/lotteryOptimizer/i18n/pl.ts +163 -163
  141. package/src/tool/lotteryOptimizer/i18n/ru.ts +163 -163
  142. package/src/tool/lotteryOptimizer/i18n/tr.ts +163 -163
  143. package/src/tool/lotteryOptimizer/i18n/zh.ts +162 -155
  144. package/src/tool/lotteryOptimizer/seo.astro +15 -15
  145. package/src/tool/mortgage/bibliography.ts +20 -20
  146. package/src/tool/mortgage/entry.ts +32 -32
  147. package/src/tool/mortgage/i18n/de.ts +210 -210
  148. package/src/tool/mortgage/i18n/es.ts +210 -210
  149. package/src/tool/mortgage/i18n/fr.ts +210 -210
  150. package/src/tool/mortgage/i18n/id.ts +210 -210
  151. package/src/tool/mortgage/i18n/it.ts +210 -210
  152. package/src/tool/mortgage/i18n/nl.ts +210 -210
  153. package/src/tool/mortgage/i18n/pl.ts +210 -210
  154. package/src/tool/mortgage/i18n/ru.ts +210 -210
  155. package/src/tool/mortgage/i18n/tr.ts +210 -210
  156. package/src/tool/mortgage/i18n/zh.ts +210 -210
  157. package/src/tool/mortgage/mortgage-calculator.css +595 -595
  158. package/src/tool/mortgage/seo.astro +15 -15
  159. package/src/tool/percentageCalculator/bibliography.ts +16 -16
  160. package/src/tool/percentageCalculator/entry.ts +32 -32
  161. package/src/tool/percentageCalculator/i18n/de.ts +220 -220
  162. package/src/tool/percentageCalculator/i18n/en.ts +220 -220
  163. package/src/tool/percentageCalculator/i18n/es.ts +220 -220
  164. package/src/tool/percentageCalculator/i18n/fr.ts +220 -220
  165. package/src/tool/percentageCalculator/i18n/it.ts +220 -220
  166. package/src/tool/percentageCalculator/i18n/pl.ts +220 -220
  167. package/src/tool/percentageCalculator/i18n/ru.ts +220 -220
  168. package/src/tool/percentageCalculator/i18n/tr.ts +220 -220
  169. package/src/tool/percentageCalculator/i18n/zh.ts +220 -220
  170. package/src/tool/percentageCalculator/seo.astro +15 -15
  171. package/src/tool/profitability/i18n/de.ts +24 -7
  172. package/src/tool/profitability/i18n/fr.ts +121 -104
  173. package/src/tool/profitability/i18n/id.ts +2 -2
  174. package/src/tool/profitability/i18n/it.ts +24 -7
  175. package/src/tool/profitability/i18n/ja.ts +1 -1
  176. package/src/tool/profitability/i18n/nl.ts +24 -7
  177. package/src/tool/profitability/i18n/pl.ts +1 -1
  178. package/src/tool/profitability/i18n/pt.ts +24 -7
  179. package/src/tool/profitability/i18n/ru.ts +118 -118
  180. package/src/tool/profitability/i18n/sv.ts +1 -1
  181. package/src/tool/profitability/i18n/tr.ts +1 -1
  182. package/src/tool/profitability/i18n/zh.ts +118 -118
  183. package/src/tool/profitability/profitability-calculator.css +229 -229
  184. package/src/tool/rentIncreaseCalculator/i18n/it.ts +125 -125
  185. package/src/tool/rentIncreaseCalculator/i18n/tr.ts +125 -125
  186. package/src/tool/rentIncreaseCalculator/rent-increase-calculator.css +326 -326
  187. package/src/tool/rentIncreaseCalculator/seo.astro +15 -15
  188. package/src/tool/revolvingCardCalculator/i18n/de.ts +38 -20
  189. package/src/tool/revolvingCardCalculator/i18n/es.ts +19 -18
  190. package/src/tool/revolvingCardCalculator/i18n/fr.ts +32 -28
  191. package/src/tool/revolvingCardCalculator/i18n/id.ts +18 -18
  192. package/src/tool/revolvingCardCalculator/i18n/it.ts +18 -18
  193. package/src/tool/revolvingCardCalculator/i18n/ja.ts +2 -2
  194. package/src/tool/revolvingCardCalculator/i18n/ko.ts +2 -2
  195. package/src/tool/revolvingCardCalculator/i18n/nl.ts +22 -19
  196. package/src/tool/revolvingCardCalculator/i18n/pl.ts +2 -2
  197. package/src/tool/revolvingCardCalculator/i18n/pt.ts +2 -2
  198. package/src/tool/revolvingCardCalculator/i18n/ru.ts +2 -2
  199. package/src/tool/revolvingCardCalculator/i18n/sv.ts +2 -2
  200. package/src/tool/revolvingCardCalculator/i18n/tr.ts +2 -2
  201. package/src/tool/revolvingCardCalculator/i18n/zh.ts +6 -6
  202. package/src/tool/salaryEmployerCost/i18n/de.ts +10 -10
  203. package/src/tool/salaryEmployerCost/i18n/fr.ts +9 -9
  204. package/src/tool/salaryEmployerCost/i18n/id.ts +9 -9
  205. package/src/tool/salaryEmployerCost/i18n/it.ts +9 -9
  206. package/src/tool/salaryEmployerCost/i18n/ja.ts +1 -1
  207. package/src/tool/salaryEmployerCost/i18n/ko.ts +1 -1
  208. package/src/tool/salaryEmployerCost/i18n/nl.ts +2 -2
  209. package/src/tool/salaryEmployerCost/i18n/pl.ts +2 -2
  210. package/src/tool/salaryEmployerCost/i18n/pt.ts +2 -2
  211. package/src/tool/salaryEmployerCost/i18n/ru.ts +2 -2
  212. package/src/tool/salaryEmployerCost/i18n/sv.ts +2 -2
  213. package/src/tool/salaryEmployerCost/i18n/tr.ts +2 -2
  214. package/src/tool/salaryEmployerCost/i18n/zh.ts +2 -2
  215. package/src/tools.ts +2 -1
@@ -1,220 +1,220 @@
1
- import { bibliography } from '../bibliography'
2
- import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
3
- import type { ToolLocaleContent } from '../../../types';
4
- import type { PercentageCalculatorUI } from '../ui';
5
-
6
- const slug = 'percentage-calculator';
7
- const title = '四合一百分比计算器:折扣、涨幅与降幅';
8
- const description =
9
- '在线轻松免费计算百分比。四合一工具,包含计算 Y 的 X%、百分比差异、增减增值税、打折和自动小费计算。';
10
-
11
- const faqData = [
12
- {
13
- question: '这个计算器是如何工作的?',
14
- answer:
15
- '只需在符合您问题的用例框中输入数值,我们的计算器就会自动处理公式,无需点击任何"计算"按钮。',
16
- },
17
- {
18
- question: '它可以用来计算增值税或税费吗?',
19
- answer:
20
- '是的,第 4 块("增加或减少百分比")专门为在基础价格上应用 13% 或 9% 的增值税,或者计算个人所得税扣除等情况而设计。',
21
- },
22
- {
23
- question: '它可以处理小数和负数吗?',
24
- answer:
25
- '当然可以。您可以输入小数(使用点号),如果您需要分析亏损状态的会计账单,它也支持负值。',
26
- },
27
- {
28
- question: '我可以复制结果吗?',
29
- answer:
30
- '可以,每个板块的结果框中都有一个按钮,点击可立即将数字复制到设备的剪贴板,以便粘贴到其他应用或文档中。',
31
- },
32
- ];
33
-
34
- const howToData = [
35
- {
36
- name: '明确您的数学问题',
37
- text: '阅读 4 个板块的标题并选择与您想知道的内容匹配的一个(例如:50 的 20% 是多少?-> 板块 1)。',
38
- },
39
- {
40
- name: '输入数值',
41
- text: '填写"X"和"Y"字段。不用担心顺序,每个板块的描述语句会视觉化地引导您。',
42
- },
43
- {
44
- name: '复制即时结果',
45
- text: '数值会在您输入的同时在下方实时显示。如果您想将其带到别处,请点击复制图标。',
46
- },
47
- ];
48
-
49
- const faqSchema: WithContext<FAQPage> = {
50
- '@context': 'https://schema.org',
51
- '@type': 'FAQPage',
52
- mainEntity: faqData.map((item) => ({
53
- '@type': 'Question',
54
- name: item.question,
55
- acceptedAnswer: { '@type': 'Answer', text: item.answer },
56
- })),
57
- };
58
-
59
- const howToSchema: WithContext<HowTo> = {
60
- '@context': 'https://schema.org',
61
- '@type': 'HowTo',
62
- name: title,
63
- description,
64
- step: howToData.map((step, i) => ({
65
- '@type': 'HowToStep',
66
- position: i + 1,
67
- name: step.name,
68
- text: step.text,
69
- })),
70
- };
71
-
72
- const appSchema: WithContext<SoftwareApplication> = {
73
- '@context': 'https://schema.org',
74
- '@type': 'SoftwareApplication',
75
- name: title,
76
- description,
77
- applicationCategory: 'FinanceApplication',
78
- operatingSystem: 'All',
79
- offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' },
80
- inLanguage: 'zh',
81
- };
82
-
83
- export const content: ToolLocaleContent<PercentageCalculatorUI> = {
84
- slug,
85
- title,
86
- description,
87
- faq: faqData,
88
- bibliography,
89
-
90
- howTo: howToData,
91
- schemas: [faqSchema, howToSchema, appSchema],
92
- seo: [
93
- {
94
- type: 'title',
95
- text: '四合一百分比计算器:掌握快速计算',
96
- level: 2,
97
- },
98
- {
99
- type: 'title',
100
- text: '多功能百分比计算器有什么用?',
101
- level: 3,
102
- },
103
- {
104
- type: 'paragraph',
105
- html: '计算百分比是日常生活中最常见的数学运算之一。从商场打折时计算折扣、在餐厅确定合适的小费金额,到确定企业的利润率或贷款利息。尽管是日常操作,但并非总能轻松地进行心算或记住准确的公式。',
106
- },
107
- {
108
- type: 'paragraph',
109
- html: '我们的四合一百分比计算器汇总了需求量最大的场景。您不再需要去 Google 搜索"如何算百分之二十"或"百分比计算公式"。您在一个地方就可以完成四项基本运算,交互式且结果即时。',
110
- },
111
- {
112
- type: 'title',
113
- text: '解析 4 个最常用的用例',
114
- level: 3,
115
- },
116
- {
117
- type: 'paragraph',
118
- html: '为了方便您的使用,我们将工具分为四个清晰的视觉板块,解决我们每天面临的实际问题:',
119
- },
120
- {
121
- type: 'card',
122
- icon: 'mdi:percent',
123
- title: '1. Y 的 X% 是多少?',
124
- html: '<p><strong>最经典的案例。</strong> 常用于计算折扣或小费。如果您想知道 120 元的 15% 是多少,这个工具就是为您准备的。其背后的公式只是将百分比除以 100 并乘以总值。</p>',
125
- },
126
- {
127
- type: 'card',
128
- icon: 'mdi:division',
129
- title: '2. X 是 Y 的百分之几?',
130
- html: '<p><strong>非常适合比例计算。</strong> 如果您在 60 分的考试中得了 45 分,换算成 100 分制是多少?此功能将部分除以整体并乘以一百,为您提供准确的相对权重。</p>',
131
- },
132
- {
133
- type: 'card',
134
- icon: 'mdi:chart-line-variant',
135
- title: '3. 百分比增长或减少',
136
- html: '<p><strong>非常适合财务和数据分析。</strong> 租金比去年涨了多少?如果您以前付 8000 元,现在付 8400 元,这个功能会告诉您增长了 5%。它测量两个数字之间的增长或缩减。</p>',
137
- },
138
- {
139
- type: 'card',
140
- icon: 'mdi:calculator',
141
- title: '4. 在某个值上增加或减少百分比',
142
- html: '<p><strong>对增值税计算超级有用。</strong> 如果您有一个基础价格(例如 100 元)并需要增加 13% 的加价,此计算器将直接为您得出 113 元的结果,而无需进行中间运算。同样,它也适用于应用直接折扣(例如减去 20%)。</p>',
143
- },
144
- {
145
- type: 'title',
146
- text: '关于百分比计算的常见误区',
147
- level: 3,
148
- },
149
- {
150
- type: 'paragraph',
151
- html: '看到大百分比或小数时,我们经常会卡壳,但有一些数学"小技巧"可以让您的生活更轻松。最著名的一个就是<strong>百分比的可逆性</strong>。',
152
- },
153
- {
154
- type: 'tip',
155
- title: '可逆性技巧',
156
- html: '<p>您知道吗,Y 的 X% 与 X 的 Y% 完全相等。例如,如果您被要求在心算中计算 50 的 18%,听起来可能很复杂。但如果您反过来想,"18 的 50%",就非常简单了:是 9!这适用于绝对任何数字,是日常生活中惊人的提速秘诀。</p>',
157
- },
158
- {
159
- type: 'title',
160
- text: '为什么我们在计算增长时会犯错',
161
- level: 3,
162
- },
163
- {
164
- type: 'paragraph',
165
- html: '最常见的错误之一发生在案例 3:百分比的增加或减少。假设一支股票价格为 100 元,下跌了 50%,第二天上涨了 50%。直觉告诉我们它会回到 100 元,但这是错误的。',
166
- },
167
- {
168
- type: 'paragraph',
169
- html: '如果从 100 元下跌 50%,其新价格为 50 元。如果从这 50 元上涨 50%,涨幅是 50 的一半(25 元)。因此,最终价格将是 75 元。这是一个经典的例子,说明了为什么百分比的涨跌不是对称的,以及为什么像这样的动态计算器可以防止严重的财务错误。',
170
- },
171
- {
172
- type: 'title',
173
- text: '专业与学术用途',
174
- level: 3,
175
- },
176
- {
177
- type: 'paragraph',
178
- html: '我们的界面简洁无干扰,专为<strong>高效工作</strong>而设计。您可以将其固定在浏览器标签页中,在各个字段之间灵活切换,并借助结果旁边的复制按钮,将准确的数据传输到 Excel 或 Google 表格中,无惧录入错误。',
179
- },
180
- {
181
- type: 'list',
182
- items: [
183
- '电商与实体店:应用利润率并加上税费,快速计算销售价。',
184
- '人力资源管理:确定薪资差距、所得税代扣代缴以及参考 CPI 进行调薪计算。',
185
- '大学教育:教师进行成绩加权平滑或科学领域的学生分析实验偏差。',
186
- '数字营销:衡量电商中的 CTR(点击率)、ROAS(广告支出回报率)或转化率。',
187
- ],
188
- },
189
- ],
190
- ui: {
191
- labelTitle: '百分比计算器',
192
- labelCase1Title: '用例 1',
193
- labelCase1Question: 'Y 的 X% 是多少?',
194
- labelCase1Placeholder1: 'X',
195
- labelCase1Placeholder2: 'Y',
196
- labelCase1Formula: '公式: (X / 100) × Y',
197
- labelCase2Title: '用例 2',
198
- labelCase2Question: 'X 是 Y 的百分之几?',
199
- labelCase2Placeholder1: 'X',
200
- labelCase2Placeholder2: 'Y',
201
- labelCase2Formula: '公式: (X / Y) × 100',
202
- labelCase3Title: '用例 3',
203
- labelCase3Question: '两个数值之间的百分比差异',
204
- labelCase3Placeholder1: '数值 1',
205
- labelCase3Placeholder2: '数值 2',
206
- labelCase3Formula: '公式: ((数值 2 - 数值 1) / |数值 1|) × 100',
207
- labelCase4Title: '用例 4',
208
- labelCase4Question: '在某个值上增加或减少百分比',
209
- labelCase4Placeholder1: '数值',
210
- labelCase4Placeholder2: '%',
211
- labelCase4Formula: '公式: 数值 ± (数值 × (% / 100))',
212
- labelCase4AddLabel: '相加 (值 + %)',
213
- labelCase4SubtractLabel: '相减 (值 - %)',
214
- labelResult: '结果',
215
- labelDifference: '差异',
216
- labelCopyTooltip: '复制结果',
217
- labelFormula: '公式',
218
- percentSymbol: '%',
219
- },
220
- };
1
+ import { bibliography } from '../bibliography'
2
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
3
+ import type { ToolLocaleContent } from '../../../types';
4
+ import type { PercentageCalculatorUI } from '../ui';
5
+
6
+ const slug = 'percentage-calculator';
7
+ const title = '四合一百分比计算器:折扣、涨幅与降幅';
8
+ const description =
9
+ '在线轻松免费计算百分比。四合一工具,包含计算 Y 的 X%、百分比差异、增减增值税、打折和自动小费计算。';
10
+
11
+ const faqData = [
12
+ {
13
+ question: '这个计算器是如何工作的?',
14
+ answer:
15
+ '只需在符合您问题的用例框中输入数值,我们的计算器就会自动处理公式,无需点击任何"计算"按钮。',
16
+ },
17
+ {
18
+ question: '它可以用来计算增值税或税费吗?',
19
+ answer:
20
+ '是的,第 4 块("增加或减少百分比")专门为在基础价格上应用 13% 或 9% 的增值税,或者计算个人所得税扣除等情况而设计。',
21
+ },
22
+ {
23
+ question: '它可以处理小数和负数吗?',
24
+ answer:
25
+ '当然可以。您可以输入小数(使用点号),如果您需要分析亏损状态的会计账单,它也支持负值。',
26
+ },
27
+ {
28
+ question: '我可以复制结果吗?',
29
+ answer:
30
+ '可以,每个板块的结果框中都有一个按钮,点击可立即将数字复制到设备的剪贴板,以便粘贴到其他应用或文档中。',
31
+ },
32
+ ];
33
+
34
+ const howToData = [
35
+ {
36
+ name: '明确您的数学问题',
37
+ text: '阅读 4 个板块的标题并选择与您想知道的内容匹配的一个(例如:50 的 20% 是多少?-> 板块 1)。',
38
+ },
39
+ {
40
+ name: '输入数值',
41
+ text: '填写"X"和"Y"字段。不用担心顺序,每个板块的描述语句会视觉化地引导您。',
42
+ },
43
+ {
44
+ name: '复制即时结果',
45
+ text: '数值会在您输入的同时在下方实时显示。如果您想将其带到别处,请点击复制图标。',
46
+ },
47
+ ];
48
+
49
+ const faqSchema: WithContext<FAQPage> = {
50
+ '@context': 'https://schema.org',
51
+ '@type': 'FAQPage',
52
+ mainEntity: faqData.map((item) => ({
53
+ '@type': 'Question',
54
+ name: item.question,
55
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
56
+ })),
57
+ };
58
+
59
+ const howToSchema: WithContext<HowTo> = {
60
+ '@context': 'https://schema.org',
61
+ '@type': 'HowTo',
62
+ name: title,
63
+ description,
64
+ step: howToData.map((step, i) => ({
65
+ '@type': 'HowToStep',
66
+ position: i + 1,
67
+ name: step.name,
68
+ text: step.text,
69
+ })),
70
+ };
71
+
72
+ const appSchema: WithContext<SoftwareApplication> = {
73
+ '@context': 'https://schema.org',
74
+ '@type': 'SoftwareApplication',
75
+ name: title,
76
+ description,
77
+ applicationCategory: 'FinanceApplication',
78
+ operatingSystem: 'All',
79
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' },
80
+ inLanguage: 'zh',
81
+ };
82
+
83
+ export const content: ToolLocaleContent<PercentageCalculatorUI> = {
84
+ slug,
85
+ title,
86
+ description,
87
+ faq: faqData,
88
+ bibliography,
89
+
90
+ howTo: howToData,
91
+ schemas: [faqSchema, howToSchema, appSchema],
92
+ seo: [
93
+ {
94
+ type: 'title',
95
+ text: '四合一百分比计算器:掌握快速计算',
96
+ level: 2,
97
+ },
98
+ {
99
+ type: 'title',
100
+ text: '多功能百分比计算器有什么用?',
101
+ level: 3,
102
+ },
103
+ {
104
+ type: 'paragraph',
105
+ html: '计算百分比是日常生活中最常见的数学运算之一。从商场打折时计算折扣、在餐厅确定合适的小费金额,到确定企业的利润率或贷款利息。尽管是日常操作,但并非总能轻松地进行心算或记住准确的公式。',
106
+ },
107
+ {
108
+ type: 'paragraph',
109
+ html: '我们的四合一百分比计算器汇总了需求量最大的场景。您不再需要去 Google 搜索"如何算百分之二十"或"百分比计算公式"。您在一个地方就可以完成四项基本运算,交互式且结果即时。',
110
+ },
111
+ {
112
+ type: 'title',
113
+ text: '解析 4 个最常用的用例',
114
+ level: 3,
115
+ },
116
+ {
117
+ type: 'paragraph',
118
+ html: '为了方便您的使用,我们将工具分为四个清晰的视觉板块,解决我们每天面临的实际问题:',
119
+ },
120
+ {
121
+ type: 'card',
122
+ icon: 'mdi:percent',
123
+ title: '1. Y 的 X% 是多少?',
124
+ html: '<p><strong>最经典的案例。</strong> 常用于计算折扣或小费。如果您想知道 120 元的 15% 是多少,这个工具就是为您准备的。其背后的公式只是将百分比除以 100 并乘以总值。</p>',
125
+ },
126
+ {
127
+ type: 'card',
128
+ icon: 'mdi:division',
129
+ title: '2. X 是 Y 的百分之几?',
130
+ html: '<p><strong>非常适合比例计算。</strong> 如果您在 60 分的考试中得了 45 分,换算成 100 分制是多少?此功能将部分除以整体并乘以一百,为您提供准确的相对权重。</p>',
131
+ },
132
+ {
133
+ type: 'card',
134
+ icon: 'mdi:chart-line-variant',
135
+ title: '3. 百分比增长或减少',
136
+ html: '<p><strong>非常适合财务和数据分析。</strong> 租金比去年涨了多少?如果您以前付 8000 元,现在付 8400 元,这个功能会告诉您增长了 5%。它测量两个数字之间的增长或缩减。</p>',
137
+ },
138
+ {
139
+ type: 'card',
140
+ icon: 'mdi:calculator',
141
+ title: '4. 在某个值上增加或减少百分比',
142
+ html: '<p><strong>对增值税计算超级有用。</strong> 如果您有一个基础价格(例如 100 元)并需要增加 13% 的加价,此计算器将直接为您得出 113 元的结果,而无需进行中间运算。同样,它也适用于应用直接折扣(例如减去 20%)。</p>',
143
+ },
144
+ {
145
+ type: 'title',
146
+ text: '关于百分比计算的常见误区',
147
+ level: 3,
148
+ },
149
+ {
150
+ type: 'paragraph',
151
+ html: '看到大百分比或小数时,我们经常会卡壳,但有一些数学"小技巧"可以让您的生活更轻松。最著名的一个就是<strong>百分比的可逆性</strong>。',
152
+ },
153
+ {
154
+ type: 'tip',
155
+ title: '可逆性技巧',
156
+ html: '<p>您知道吗,Y 的 X% 与 X 的 Y% 完全相等。例如,如果您被要求在心算中计算 50 的 18%,听起来可能很复杂。但如果您反过来想,"18 的 50%",就非常简单了:是 9!这适用于绝对任何数字,是日常生活中惊人的提速秘诀。</p>',
157
+ },
158
+ {
159
+ type: 'title',
160
+ text: '为什么我们在计算增长时会犯错',
161
+ level: 3,
162
+ },
163
+ {
164
+ type: 'paragraph',
165
+ html: '最常见的错误之一发生在案例 3:百分比的增加或减少。假设一支股票价格为 100 元,下跌了 50%,第二天上涨了 50%。直觉告诉我们它会回到 100 元,但这是错误的。',
166
+ },
167
+ {
168
+ type: 'paragraph',
169
+ html: '如果从 100 元下跌 50%,其新价格为 50 元。如果从这 50 元上涨 50%,涨幅是 50 的一半(25 元)。因此,最终价格将是 75 元。这是一个经典的例子,说明了为什么百分比的涨跌不是对称的,以及为什么像这样的动态计算器可以防止严重的财务错误。',
170
+ },
171
+ {
172
+ type: 'title',
173
+ text: '专业与学术用途',
174
+ level: 3,
175
+ },
176
+ {
177
+ type: 'paragraph',
178
+ html: '我们的界面简洁无干扰,专为<strong>高效工作</strong>而设计。您可以将其固定在浏览器标签页中,在各个字段之间灵活切换,并借助结果旁边的复制按钮,将准确的数据传输到 Excel 或 Google 表格中,无惧录入错误。',
179
+ },
180
+ {
181
+ type: 'list',
182
+ items: [
183
+ '电商与实体店:应用利润率并加上税费,快速计算销售价。',
184
+ '人力资源管理:确定薪资差距、所得税代扣代缴以及参考 CPI 进行调薪计算。',
185
+ '大学教育:教师进行成绩加权平滑或科学领域的学生分析实验偏差。',
186
+ '数字营销:衡量电商中的 CTR(点击率)、ROAS(广告支出回报率)或转化率。',
187
+ ],
188
+ },
189
+ ],
190
+ ui: {
191
+ labelTitle: '百分比计算器',
192
+ labelCase1Title: '用例 1',
193
+ labelCase1Question: 'Y 的 X% 是多少?',
194
+ labelCase1Placeholder1: 'X',
195
+ labelCase1Placeholder2: 'Y',
196
+ labelCase1Formula: '公式: (X / 100) × Y',
197
+ labelCase2Title: '用例 2',
198
+ labelCase2Question: 'X 是 Y 的百分之几?',
199
+ labelCase2Placeholder1: 'X',
200
+ labelCase2Placeholder2: 'Y',
201
+ labelCase2Formula: '公式: (X / Y) × 100',
202
+ labelCase3Title: '用例 3',
203
+ labelCase3Question: '两个数值之间的百分比差异',
204
+ labelCase3Placeholder1: '数值 1',
205
+ labelCase3Placeholder2: '数值 2',
206
+ labelCase3Formula: '公式: ((数值 2 - 数值 1) / |数值 1|) × 100',
207
+ labelCase4Title: '用例 4',
208
+ labelCase4Question: '在某个值上增加或减少百分比',
209
+ labelCase4Placeholder1: '数值',
210
+ labelCase4Placeholder2: '%',
211
+ labelCase4Formula: '公式: 数值 ± (数值 × (% / 100))',
212
+ labelCase4AddLabel: '相加 (值 + %)',
213
+ labelCase4SubtractLabel: '相减 (值 - %)',
214
+ labelResult: '结果',
215
+ labelDifference: '差异',
216
+ labelCopyTooltip: '复制结果',
217
+ labelFormula: '公式',
218
+ percentSymbol: '%',
219
+ },
220
+ };
@@ -1,15 +1,15 @@
1
- ---
2
- import { SEORenderer } from '@jjlmoya/utils-shared';
3
- import { percentageCalculator } 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 percentageCalculator.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 { percentageCalculator } 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 percentageCalculator.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -66,14 +66,31 @@ export const content: ToolLocaleContent<ProfitabilityUI> = {
66
66
  },
67
67
  {
68
68
  type: 'paragraph',
69
- html: 'Der <strong>ROI</strong> zeigt den prozentualen Gesamtgewinn, ignoriert aber die Zeit. Die <strong>CAGR</strong> ist besser für langfristige Analysen.',
69
+ html: 'Der <strong>ROI</strong> zeigt den prozentualen Gesamtgewinn, ignoriert aber die Zeit. Die <strong>CAGR</strong> ist für langfristige Analysen aussagekräftiger, weil sie das Ergebnis auf eine jährliche, zusammengesetzte Wachstumsrate umrechnet und Investitionen mit unterschiedlicher Laufzeit vergleichbar macht.',
70
70
  },
71
-
72
- { type: 'paragraph', html: "Nutzen Sie das Ergebnis zur Planung und zum Szenarienvergleich; es ersetzt keine offizielle Berechnung oder Fachberatung." },
73
- { type: 'paragraph', html: "Deuten Sie das Ergebnis gemeinsam mit den angezeigten Annahmen, bevor Sie es verwenden." },
74
- { type: 'paragraph', html: "Prüfen Sie Eingaben, Einheiten, Rundung, Datum und Recht, weil jedes Element die Schätzung verändern kann." },
75
- { type: 'paragraph', html: "Nutzen Sie das Ergebnis zur Planung und zum Szenarienvergleich; es ersetzt keine offizielle Berechnung oder Fachberatung." },
76
- { type: 'paragraph', html: "Deuten Sie das Ergebnis gemeinsam mit den angezeigten Annahmen, bevor Sie es verwenden." },],
71
+ {
72
+ type: 'title',
73
+ text: 'So verwenden Sie den Rentabilitätsrechner',
74
+ level: 3,
75
+ },
76
+ {
77
+ type: 'paragraph',
78
+ html: 'Geben Sie das Anfangskapital, den aktuellen Wert oder Verkaufspreis und die Haltedauer in Tagen, Monaten oder Jahren ein. Der Rechner ermittelt Gewinn oder Verlust, den Gesamt-ROI und die geometrische Jahresrendite. Verwenden Sie bei Vergleichen dieselben Zeitangaben und berücksichtigen Sie, ob Gebühren, Einzahlungen, Entnahmen und Dividenden enthalten sind.',
79
+ },
80
+ {
81
+ type: 'title',
82
+ text: 'Gesamt-ROI oder annualisierte Rendite?',
83
+ level: 3,
84
+ },
85
+ {
86
+ type: 'paragraph',
87
+ html: 'Der ROI beantwortet die Frage, wie viel Sie insgesamt gewonnen oder verloren haben. Die CAGR beantwortet, welcher konstante jährliche Zinseszinssatz denselben Anfangs- und Endwert ergeben hätte. 20 % in einem Jahr sind deshalb nicht mit 20 % in fünf Jahren gleichzusetzen. Die Visualisierung stellt lineares und zusammengesetztes Wachstum gegenüber.',
88
+ },
89
+ {
90
+ type: 'paragraph',
91
+ html: 'Die CAGR ist ein theoretischer Durchschnitt und verbirgt den tatsächlichen Kursverlauf und die Volatilität. Prüfen Sie Daten, Einheiten, Rundung, Zeitraum und Annahmen, bevor Sie das Ergebnis nutzen. Es dient der Orientierung und ersetzt keine persönliche Finanzberatung.',
92
+ },
93
+ ],
77
94
  faq,
78
95
  bibliography: [
79
96
  {