@jjlmoya/utils-textiles 1.20.0 → 1.22.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 (209) hide show
  1. package/package.json +1 -1
  2. package/src/category/i18n/de.ts +76 -76
  3. package/src/category/i18n/en.ts +76 -76
  4. package/src/category/i18n/es.ts +76 -76
  5. package/src/category/i18n/fr.ts +76 -76
  6. package/src/category/i18n/id.ts +76 -76
  7. package/src/category/i18n/it.ts +76 -76
  8. package/src/category/i18n/ja.ts +76 -76
  9. package/src/category/i18n/ko.ts +76 -76
  10. package/src/category/i18n/nl.ts +76 -76
  11. package/src/category/i18n/pl.ts +76 -76
  12. package/src/category/i18n/pt.ts +76 -76
  13. package/src/category/i18n/ru.ts +76 -76
  14. package/src/category/i18n/sv.ts +76 -76
  15. package/src/category/i18n/zh.ts +76 -76
  16. package/src/category/index.ts +2 -0
  17. package/src/category/seo.astro +1 -1
  18. package/src/components/PreviewNavSidebar.astro +1 -1
  19. package/src/components/PreviewToolbar.astro +1 -1
  20. package/src/data.ts +1 -1
  21. package/src/entries.ts +4 -1
  22. package/src/env.d.ts +1 -1
  23. package/src/index.ts +1 -1
  24. package/src/layouts/PreviewLayout.astro +113 -113
  25. package/src/pages/index.astro +1 -1
  26. package/src/tests/faq_count.test.ts +19 -19
  27. package/src/tests/i18n_coverage.test.ts +4 -2
  28. package/src/tests/locale_spelling.test.ts +44 -0
  29. package/src/tests/mocks/astro_mock.js +1 -1
  30. package/src/tests/no_en_dash.test.ts +70 -70
  31. package/src/tests/no_h1_in_components.test.ts +1 -1
  32. package/src/tests/seo_length.test.ts +22 -22
  33. package/src/tests/seo_translation_completeness.test.ts +69 -0
  34. package/src/tests/spanish_leakage.test.ts +175 -153
  35. package/src/tests/tool_validation.test.ts +17 -17
  36. package/src/tool/burnTest/i18n/es.ts +211 -211
  37. package/src/tool/burnTest/i18n/fr.ts +211 -211
  38. package/src/tool/burnTest/i18n/ja.ts +211 -211
  39. package/src/tool/burnTest/i18n/ko.ts +211 -211
  40. package/src/tool/burnTest/i18n/pl.ts +211 -211
  41. package/src/tool/burnTest/i18n/ru.ts +211 -211
  42. package/src/tool/burnTest/i18n/sv.ts +211 -211
  43. package/src/tool/burnTest/i18n/zh.ts +211 -211
  44. package/src/tool/burnTest/seo.astro +15 -15
  45. package/src/tool/clothingSizeConverter/i18n/de.ts +348 -348
  46. package/src/tool/clothingSizeConverter/i18n/en.ts +348 -348
  47. package/src/tool/clothingSizeConverter/i18n/fr.ts +348 -348
  48. package/src/tool/clothingSizeConverter/i18n/ja.ts +348 -348
  49. package/src/tool/clothingSizeConverter/i18n/ko.ts +348 -348
  50. package/src/tool/clothingSizeConverter/i18n/nl.ts +348 -348
  51. package/src/tool/clothingSizeConverter/i18n/pl.ts +348 -348
  52. package/src/tool/clothingSizeConverter/i18n/ru.ts +348 -348
  53. package/src/tool/clothingSizeConverter/i18n/sv.ts +348 -348
  54. package/src/tool/clothingSizeConverter/i18n/tr.ts +348 -348
  55. package/src/tool/clothingSizeConverter/i18n/zh.ts +348 -348
  56. package/src/tool/clothingSizeConverter/seo.astro +15 -15
  57. package/src/tool/embroideryStitchPricingEstimator/bibliography.astro +6 -0
  58. package/src/tool/embroideryStitchPricingEstimator/bibliography.ts +12 -0
  59. package/src/tool/embroideryStitchPricingEstimator/component.astro +111 -0
  60. package/src/tool/embroideryStitchPricingEstimator/controller.ts +111 -0
  61. package/src/tool/embroideryStitchPricingEstimator/dom-views.ts +94 -0
  62. package/src/tool/embroideryStitchPricingEstimator/embroidery-stitch-count-pricing-estimator.css +438 -0
  63. package/src/tool/embroideryStitchPricingEstimator/entry.ts +29 -0
  64. package/src/tool/embroideryStitchPricingEstimator/evaluator.ts +22 -0
  65. package/src/tool/embroideryStitchPricingEstimator/i18n/de.ts +38 -0
  66. package/src/tool/embroideryStitchPricingEstimator/i18n/en.ts +194 -0
  67. package/src/tool/embroideryStitchPricingEstimator/i18n/es.ts +38 -0
  68. package/src/tool/embroideryStitchPricingEstimator/i18n/fr.ts +38 -0
  69. package/src/tool/embroideryStitchPricingEstimator/i18n/id.ts +38 -0
  70. package/src/tool/embroideryStitchPricingEstimator/i18n/it.ts +38 -0
  71. package/src/tool/embroideryStitchPricingEstimator/i18n/ja.ts +38 -0
  72. package/src/tool/embroideryStitchPricingEstimator/i18n/ko.ts +38 -0
  73. package/src/tool/embroideryStitchPricingEstimator/i18n/nl.ts +38 -0
  74. package/src/tool/embroideryStitchPricingEstimator/i18n/pl.ts +38 -0
  75. package/src/tool/embroideryStitchPricingEstimator/i18n/pt.ts +38 -0
  76. package/src/tool/embroideryStitchPricingEstimator/i18n/ru.ts +38 -0
  77. package/src/tool/embroideryStitchPricingEstimator/i18n/sv.ts +38 -0
  78. package/src/tool/embroideryStitchPricingEstimator/i18n/tr.ts +38 -0
  79. package/src/tool/embroideryStitchPricingEstimator/i18n/zh.ts +38 -0
  80. package/src/tool/embroideryStitchPricingEstimator/index.ts +11 -0
  81. package/src/tool/embroideryStitchPricingEstimator/logic.test.ts +40 -0
  82. package/src/tool/embroideryStitchPricingEstimator/logic.ts +86 -0
  83. package/src/tool/embroideryStitchPricingEstimator/seo.astro +15 -0
  84. package/src/tool/embroideryStitchPricingEstimator/storage.ts +20 -0
  85. package/src/tool/embroideryStitchPricingEstimator/ui.ts +53 -0
  86. package/src/tool/fabricProjectCalculator/i18n/de.ts +236 -236
  87. package/src/tool/fabricProjectCalculator/i18n/ja.ts +236 -236
  88. package/src/tool/fabricProjectCalculator/i18n/ko.ts +236 -236
  89. package/src/tool/fabricProjectCalculator/i18n/nl.ts +236 -236
  90. package/src/tool/fabricProjectCalculator/i18n/pl.ts +236 -236
  91. package/src/tool/fabricProjectCalculator/i18n/ru.ts +236 -236
  92. package/src/tool/fabricProjectCalculator/i18n/sv.ts +236 -236
  93. package/src/tool/fabricProjectCalculator/i18n/tr.ts +236 -236
  94. package/src/tool/fabricProjectCalculator/i18n/zh.ts +236 -236
  95. package/src/tool/fabricProjectCalculator/seo.astro +15 -15
  96. package/src/tool/fabricTruth/i18n/de.ts +268 -268
  97. package/src/tool/fabricTruth/i18n/en.ts +268 -268
  98. package/src/tool/fabricTruth/i18n/es.ts +302 -302
  99. package/src/tool/fabricTruth/i18n/fr.ts +268 -268
  100. package/src/tool/fabricTruth/i18n/id.ts +268 -268
  101. package/src/tool/fabricTruth/i18n/it.ts +268 -268
  102. package/src/tool/fabricTruth/i18n/ja.ts +268 -268
  103. package/src/tool/fabricTruth/i18n/ko.ts +268 -268
  104. package/src/tool/fabricTruth/i18n/nl.ts +268 -268
  105. package/src/tool/fabricTruth/i18n/pl.ts +268 -268
  106. package/src/tool/fabricTruth/i18n/pt.ts +268 -268
  107. package/src/tool/fabricTruth/i18n/ru.ts +268 -268
  108. package/src/tool/fabricTruth/i18n/sv.ts +268 -268
  109. package/src/tool/fabricTruth/i18n/tr.ts +268 -268
  110. package/src/tool/fabricTruth/i18n/zh.ts +272 -272
  111. package/src/tool/fabricTruth/seo.astro +15 -15
  112. package/src/tool/fiberPrep/i18n/de.ts +215 -215
  113. package/src/tool/fiberPrep/i18n/fr.ts +215 -215
  114. package/src/tool/fiberPrep/i18n/ja.ts +215 -215
  115. package/src/tool/fiberPrep/i18n/ko.ts +215 -215
  116. package/src/tool/fiberPrep/i18n/nl.ts +215 -215
  117. package/src/tool/fiberPrep/i18n/pl.ts +215 -215
  118. package/src/tool/fiberPrep/i18n/ru.ts +215 -215
  119. package/src/tool/fiberPrep/i18n/sv.ts +215 -215
  120. package/src/tool/fiberPrep/i18n/tr.ts +215 -215
  121. package/src/tool/fiberPrep/i18n/zh.ts +215 -215
  122. package/src/tool/fiberPrep/seo.astro +15 -15
  123. package/src/tool/knittingGauge/i18n/de.ts +224 -224
  124. package/src/tool/knittingGauge/i18n/ja.ts +224 -224
  125. package/src/tool/knittingGauge/i18n/ko.ts +224 -224
  126. package/src/tool/knittingGauge/i18n/pl.ts +224 -224
  127. package/src/tool/knittingGauge/i18n/ru.ts +224 -224
  128. package/src/tool/knittingGauge/i18n/tr.ts +224 -224
  129. package/src/tool/knittingGauge/i18n/zh.ts +224 -224
  130. package/src/tool/knittingGauge/seo.astro +15 -15
  131. package/src/tool/laundryGuide/i18n/de.ts +271 -271
  132. package/src/tool/laundryGuide/i18n/en.ts +271 -271
  133. package/src/tool/laundryGuide/i18n/es.ts +271 -271
  134. package/src/tool/laundryGuide/i18n/fr.ts +255 -255
  135. package/src/tool/laundryGuide/i18n/id.ts +271 -271
  136. package/src/tool/laundryGuide/i18n/it.ts +271 -271
  137. package/src/tool/laundryGuide/i18n/ja.ts +271 -271
  138. package/src/tool/laundryGuide/i18n/ko.ts +271 -271
  139. package/src/tool/laundryGuide/i18n/nl.ts +271 -271
  140. package/src/tool/laundryGuide/i18n/pl.ts +271 -271
  141. package/src/tool/laundryGuide/i18n/pt.ts +271 -271
  142. package/src/tool/laundryGuide/i18n/ru.ts +271 -271
  143. package/src/tool/laundryGuide/i18n/sv.ts +271 -271
  144. package/src/tool/laundryGuide/i18n/tr.ts +271 -271
  145. package/src/tool/laundryGuide/i18n/zh.ts +271 -271
  146. package/src/tool/laundryGuide/seo.astro +15 -15
  147. package/src/tool/needleConverter/i18n/de.ts +202 -202
  148. package/src/tool/needleConverter/i18n/es.ts +207 -207
  149. package/src/tool/needleConverter/i18n/fr.ts +207 -207
  150. package/src/tool/needleConverter/i18n/ja.ts +202 -202
  151. package/src/tool/needleConverter/i18n/ko.ts +202 -202
  152. package/src/tool/needleConverter/i18n/nl.ts +202 -202
  153. package/src/tool/needleConverter/i18n/pl.ts +202 -202
  154. package/src/tool/needleConverter/i18n/ru.ts +202 -202
  155. package/src/tool/needleConverter/i18n/sv.ts +202 -202
  156. package/src/tool/needleConverter/i18n/tr.ts +202 -202
  157. package/src/tool/needleConverter/i18n/zh.ts +202 -202
  158. package/src/tool/needleConverter/seo.astro +15 -15
  159. package/src/tool/sewingPatternScaler/component.astro +236 -236
  160. package/src/tool/sewingPatternScaler/i18n/fr.ts +170 -170
  161. package/src/tool/sewingPatternScaler/i18n/ja.ts +114 -114
  162. package/src/tool/sewingPatternScaler/i18n/ko.ts +114 -114
  163. package/src/tool/sewingPatternScaler/i18n/nl.ts +114 -114
  164. package/src/tool/sewingPatternScaler/i18n/pl.ts +114 -114
  165. package/src/tool/sewingPatternScaler/i18n/ru.ts +114 -114
  166. package/src/tool/sewingPatternScaler/i18n/sv.ts +114 -114
  167. package/src/tool/sewingPatternScaler/i18n/tr.ts +114 -114
  168. package/src/tool/sewingPatternScaler/i18n/zh.ts +114 -114
  169. package/src/tool/sewingPatternScaler/seo.astro +15 -15
  170. package/src/tool/shoeSizeConverter/i18n/fr.ts +183 -183
  171. package/src/tool/shoeSizeConverter/i18n/ja.ts +179 -179
  172. package/src/tool/shoeSizeConverter/i18n/ko.ts +179 -179
  173. package/src/tool/shoeSizeConverter/i18n/nl.ts +179 -179
  174. package/src/tool/shoeSizeConverter/i18n/pl.ts +179 -179
  175. package/src/tool/shoeSizeConverter/i18n/ru.ts +179 -179
  176. package/src/tool/shoeSizeConverter/i18n/sv.ts +179 -179
  177. package/src/tool/shoeSizeConverter/i18n/tr.ts +179 -179
  178. package/src/tool/shoeSizeConverter/i18n/zh.ts +179 -179
  179. package/src/tool/shoeSizeConverter/seo.astro +15 -15
  180. package/src/tool/stainChemistry/bibliography.ts +16 -16
  181. package/src/tool/stainChemistry/i18n/de.ts +286 -286
  182. package/src/tool/stainChemistry/i18n/en.ts +289 -289
  183. package/src/tool/stainChemistry/i18n/es.ts +286 -286
  184. package/src/tool/stainChemistry/i18n/fr.ts +296 -296
  185. package/src/tool/stainChemistry/i18n/id.ts +286 -286
  186. package/src/tool/stainChemistry/i18n/it.ts +286 -286
  187. package/src/tool/stainChemistry/i18n/ja.ts +286 -286
  188. package/src/tool/stainChemistry/i18n/ko.ts +283 -283
  189. package/src/tool/stainChemistry/i18n/nl.ts +286 -286
  190. package/src/tool/stainChemistry/i18n/pl.ts +286 -286
  191. package/src/tool/stainChemistry/i18n/pt.ts +286 -286
  192. package/src/tool/stainChemistry/i18n/ru.ts +286 -286
  193. package/src/tool/stainChemistry/i18n/sv.ts +286 -286
  194. package/src/tool/stainChemistry/i18n/tr.ts +286 -286
  195. package/src/tool/stainChemistry/i18n/zh.ts +281 -281
  196. package/src/tool/stainChemistry/seo.astro +15 -15
  197. package/src/tool/yarnCalculator/i18n/de.ts +296 -296
  198. package/src/tool/yarnCalculator/i18n/es.ts +296 -296
  199. package/src/tool/yarnCalculator/i18n/fr.ts +296 -296
  200. package/src/tool/yarnCalculator/i18n/ja.ts +296 -296
  201. package/src/tool/yarnCalculator/i18n/ko.ts +296 -296
  202. package/src/tool/yarnCalculator/i18n/nl.ts +296 -296
  203. package/src/tool/yarnCalculator/i18n/pl.ts +296 -296
  204. package/src/tool/yarnCalculator/i18n/ru.ts +296 -296
  205. package/src/tool/yarnCalculator/i18n/sv.ts +296 -296
  206. package/src/tool/yarnCalculator/i18n/tr.ts +296 -296
  207. package/src/tool/yarnCalculator/i18n/zh.ts +295 -295
  208. package/src/tool/yarnCalculator/seo.astro +15 -15
  209. package/src/tools.ts +2 -2
@@ -1,224 +1,224 @@
1
- import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
- import type { ToolLocaleContent } from '../../../types';
3
- import { bibliography } from '../bibliography';
4
- import type { KnittingGaugeUI } from '../ui';
5
-
6
- const slug = 'knitting-gauge-calculator';
7
- const title = '编织密度与张力计算器';
8
- const description =
9
- '轻松重新计算任何棒针或钩针图解的针数和行数。支持根据花样倍数和缩放比例调整密度,获得专业成品。';
10
-
11
- const faqData = [
12
- {
13
- question: '什么是编织中的张力或密度(Gauge)?',
14
- answer:
15
- '它是衡量在特定区域(通常为 10x10 厘米)内包含多少针和多少行的指标。这是基础,因为它决定了根据所用针号和毛线制成的成衣最终尺寸。',
16
- },
17
- {
18
- question: '密度变化如何影响尺寸?',
19
- answer:
20
- '如果您的张力比图解每厘米的针数多,衣服就会变小。如果针数少,衣服就会变大。因此,重新计算针数或更换针号至关重要。',
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: '在图解说明中查找 10x10 厘米或 4x4 英寸样片所标示的针数和行数。',
38
- },
39
- {
40
- name: '编织并测量您自己的样片',
41
- text: '用您的线和针织一个样片,进行定型,然后测量您在相同区域内的针数和行数。',
42
- },
43
- {
44
- name: '配置计算器',
45
- text: '输入图解样片数据和您的实际样片数据。添加您尺码的总针数,以及花样的倍数(如有)。',
46
- },
47
- {
48
- name: '获取结果',
49
- text: '查看建议起针的新针数和缩放比例,以了解是否也需要调整衣长。',
50
- },
51
- ];
52
-
53
- const faqSchema: WithContext<FAQPage> = {
54
- '@context': 'https://schema.org',
55
- '@type': 'FAQPage',
56
- mainEntity: faqData.map((item) => ({
57
- '@type': 'Question',
58
- name: item.question,
59
- acceptedAnswer: { '@type': 'Answer', text: item.answer },
60
- })),
61
- };
62
-
63
- const howToSchema: WithContext<HowTo> = {
64
- '@context': 'https://schema.org',
65
- '@type': 'HowTo',
66
- name: title,
67
- description,
68
- step: howToData.map((step) => ({
69
- '@type': 'HowToStep',
70
- name: step.name,
71
- text: step.text,
72
- })),
73
- };
74
-
75
- const appSchema: WithContext<SoftwareApplication> = {
76
- '@context': 'https://schema.org',
77
- '@type': 'SoftwareApplication',
78
- name: title,
79
- description,
80
- applicationCategory: 'UtilityApplication',
81
- operatingSystem: 'All',
82
- offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
83
- inLanguage: 'zh',
84
- };
85
-
86
- export const content: ToolLocaleContent<KnittingGaugeUI> = {
87
- slug,
88
- title,
89
- description,
90
- faq: faqData,
91
- bibliography: bibliography,
92
- howTo: howToData,
93
- schemas: [faqSchema, howToSchema, appSchema],
94
- seo: [
95
- {
96
- type: 'title',
97
- text: '在线编织密度与张力计算器:技术指南',
98
- level: 2,
99
- },
100
- {
101
- type: 'paragraph',
102
- html: '如果您曾经完成过一件看起来像是为巨型人设计的毛衣,或者一个几乎遮不住头顶的小帽,那么您就已经体会到了<strong>密度(Gauge)或张力</strong>的重要性。在棒针和钩针的世界里,张力是线材粗细、针号大小以及每位编织者拉线力度之间的相互关系。没有两位编织者是完全相同的,因此,也没有两个完全相同的张力。',
103
- },
104
- {
105
- type: 'title',
106
- text: '为什么密度或张力对编织至关重要?',
107
- level: 3,
108
- },
109
- {
110
- type: 'paragraph',
111
- html: '这款编织密度计算器是一款技术工具,旨在消除数学推测,让您专注于创意。通过输入图解样片数据和您自己的样片数据,您将获得精确的针数和行数调整,确保您的成品尺寸正是您所期望的。',
112
- },
113
- {
114
- type: 'title',
115
- text: '如何使用编织张力计算器',
116
- level: 3,
117
- },
118
- {
119
- type: 'list',
120
- items: [
121
- '<strong>织一个样片:</strong> 不要局限于 10x10 厘米。至少织一个 15x15 厘米的样片,以免边缘干扰中心测量。',
122
- '<strong>定型样片:</strong> 像处理成衣一样洗涤并晾干样片。许多羊毛纤维在弄湿后会膨胀或变长。',
123
- '<strong>精确测量:</strong> 使用硬尺或 10 厘米密度测量器。数一数水平方向有多少针,垂直方向有多少行。',
124
- '<strong>输入数据:</strong> 在左列放入图解数值,在右列放入您的实际数值。该工具将自动重新计算达到所需宽度所需的针数。',
125
- ],
126
- },
127
- {
128
- type: 'title',
129
- text: '结果解读:缩放比例 (Scale Factor)',
130
- level: 3,
131
- },
132
- {
133
- type: 'paragraph',
134
- html: '缩放比例是我们应用于图解中每条指令的乘数。如果您的张力是 22 针,而图解要求 20 针,您的缩放比例就是 1.1。这意味着为了获得相同的物理宽度,您需要多出 10% 的针数。 0-2% 的偏差是理想的, 2-10% 是中等的, 10-25% 必须重新计算,超过 25% 则存在结构性风险。',
135
- },
136
- {
137
- type: 'title',
138
- text: '花样倍数处理',
139
- level: 3,
140
- },
141
- {
142
- type: 'paragraph',
143
- html: '重新计算图解时最大的挑战之一是保持镂空、麻花或图案的完整性。如果设计是每 8 针重复一次,您不能简单地添加 3 针;您必须调整总针数,使其仍然是 8 的倍数。此计算器的<strong>倍数调整</strong>功能会建议最接近且符合花样结构的针数。',
144
- },
145
- {
146
- type: 'tip',
147
- title: '专家建议',
148
- html: '<p>通常最好使用此计算器并按照您毛线的自然张力工作,通过调整针数来适配,而不是通过剧烈改变针号来强行适配张力,因为后者可能会改变织物的垂坠感和柔软度。</p>',
149
- },
150
- {
151
- type: 'title',
152
- text: '使用我们调整工具的优势',
153
- level: 3,
154
- },
155
- {
156
- type: 'list',
157
- items: [
158
- '通过精确的缩放比例自动调整针数和行数。',
159
- '支持复杂的倍数 (X + Y),以保持图案完整性。',
160
- '预估整个项目所需的毛线克数。',
161
- '动态可视化样片,实时显示织物密度。',
162
- ],
163
- },
164
- {
165
- type: 'card',
166
- title: '密度 / 张力 (Gauge)',
167
- icon: 'mdi:ruler',
168
- html: '<strong>10x10 厘米</strong>或<strong>4x4 英寸</strong>正方形内包含的针数和行数。它是所有编织图解的通用参考。',
169
- },
170
- {
171
- type: 'card',
172
- title: '定型 (Blocking)',
173
- icon: 'mdi:water',
174
- html: '浸湿并为成衣定型的过程,使针脚平整。展示成衣在第一次穿戴和洗涤后所具有的<strong>真实张力</strong>。',
175
- },
176
- {
177
- type: 'card',
178
- title: '缩放比例 (Scale Factor)',
179
- icon: 'mdi:scale',
180
- html: '图解样片与编织者实际样片之间的数学比例。决定需要调整多少针数和行数以保持<strong>正确的尺寸</strong>。',
181
- },
182
- ],
183
- ui: {
184
- sectionOriginalGauge: '原始张力',
185
- sectionMyGauge: '您当前的样片',
186
- sectionProject: '项目结构',
187
- labelStitches: '针数',
188
- labelRows: '行数',
189
- labelWidth: '宽度',
190
- labelLength: '长度',
191
- labelUnit: '计量单位',
192
- labelNeedle: '针号',
193
- labelNeedleMm: '针号 (mm)',
194
- labelWeight: '重量 (g)',
195
- labelWeightOptional: '选填',
196
- labelPatternSts: '图解起针数',
197
- labelPatternRows: '图解总行数',
198
- labelMultiples: '倍数',
199
- labelMultiplesExample: '如: 10 + 2',
200
- labelMultiplesPlaceholder: '倍数 + 边缘针',
201
- unitEU: '10 x 10 cm (欧盟标准)',
202
- unitUS: '4 x 4 英寸 (美国标准)',
203
- btnClear: '清空',
204
- btnShare: '分享',
205
- btnCopied: '已复制!',
206
- resSuggestedSts: '建议的起针针数',
207
- resNewRows: '调整后的行数',
208
- resNewRowsTooltip: '按照您当前的密度,达到原始图解长度所需的行数。',
209
- resScaleFactor: '缩放比例',
210
- resScaleFactorTooltip: '您的织物与图解之间的尺寸关系。负值表示您的织物更致密。',
211
- resSuggestion: '建议',
212
- resSuggestionTooltip: '无需重新计算图解每一针即可调整张力的技术建议。',
213
- suggestionIdeal: '理想',
214
- suggestionDown: '减小针号',
215
- suggestionUp: '加大针号',
216
- suggestionDownDetail: '请使用 {n}mm 或更细的针号。',
217
- suggestionUpDetail: '请使用 {n}mm 或更粗的针号。',
218
- multiplesNoteFormat: '已调整为 {n} 针 (倍数 {m})',
219
- yarnTitle: '项目用线预估',
220
- yarnResultFormat: '预估用线量: <strong>{g}g</strong>',
221
- yarnSafetyFormat: '(含 +{s}g 损耗)',
222
- alertDanger: '差异极大 (>25%)。成衣的垂坠感和结构将受明显影响。',
223
- },
224
- };
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import { bibliography } from '../bibliography';
4
+ import type { KnittingGaugeUI } from '../ui';
5
+
6
+ const slug = 'knitting-gauge-calculator';
7
+ const title = '编织密度与张力计算器';
8
+ const description =
9
+ '轻松重新计算任何棒针或钩针图解的针数和行数。支持根据花样倍数和缩放比例调整密度,获得专业成品。';
10
+
11
+ const faqData = [
12
+ {
13
+ question: '什么是编织中的张力或密度(Gauge)?',
14
+ answer:
15
+ '它是衡量在特定区域(通常为 10x10 厘米)内包含多少针和多少行的指标。这是基础,因为它决定了根据所用针号和毛线制成的成衣最终尺寸。',
16
+ },
17
+ {
18
+ question: '密度变化如何影响尺寸?',
19
+ answer:
20
+ '如果您的张力比图解每厘米的针数多,衣服就会变小。如果针数少,衣服就会变大。因此,重新计算针数或更换针号至关重要。',
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: '在图解说明中查找 10x10 厘米或 4x4 英寸样片所标示的针数和行数。',
38
+ },
39
+ {
40
+ name: '编织并测量您自己的样片',
41
+ text: '用您的线和针织一个样片,进行定型,然后测量您在相同区域内的针数和行数。',
42
+ },
43
+ {
44
+ name: '配置计算器',
45
+ text: '输入图解样片数据和您的实际样片数据。添加您尺码的总针数,以及花样的倍数(如有)。',
46
+ },
47
+ {
48
+ name: '获取结果',
49
+ text: '查看建议起针的新针数和缩放比例,以了解是否也需要调整衣长。',
50
+ },
51
+ ];
52
+
53
+ const faqSchema: WithContext<FAQPage> = {
54
+ '@context': 'https://schema.org',
55
+ '@type': 'FAQPage',
56
+ mainEntity: faqData.map((item) => ({
57
+ '@type': 'Question',
58
+ name: item.question,
59
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
60
+ })),
61
+ };
62
+
63
+ const howToSchema: WithContext<HowTo> = {
64
+ '@context': 'https://schema.org',
65
+ '@type': 'HowTo',
66
+ name: title,
67
+ description,
68
+ step: howToData.map((step) => ({
69
+ '@type': 'HowToStep',
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'UtilityApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
83
+ inLanguage: 'zh',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<KnittingGaugeUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faq: faqData,
91
+ bibliography: bibliography,
92
+ howTo: howToData,
93
+ schemas: [faqSchema, howToSchema, appSchema],
94
+ seo: [
95
+ {
96
+ type: 'title',
97
+ text: '在线编织密度与张力计算器:技术指南',
98
+ level: 2,
99
+ },
100
+ {
101
+ type: 'paragraph',
102
+ html: '如果您曾经完成过一件看起来像是为巨型人设计的毛衣,或者一个几乎遮不住头顶的小帽,那么您就已经体会到了<strong>密度(Gauge)或张力</strong>的重要性。在棒针和钩针的世界里,张力是线材粗细、针号大小以及每位编织者拉线力度之间的相互关系。没有两位编织者是完全相同的,因此,也没有两个完全相同的张力。',
103
+ },
104
+ {
105
+ type: 'title',
106
+ text: '为什么密度或张力对编织至关重要?',
107
+ level: 3,
108
+ },
109
+ {
110
+ type: 'paragraph',
111
+ html: '这款编织密度计算器是一款技术工具,旨在消除数学推测,让您专注于创意。通过输入图解样片数据和您自己的样片数据,您将获得精确的针数和行数调整,确保您的成品尺寸正是您所期望的。',
112
+ },
113
+ {
114
+ type: 'title',
115
+ text: '如何使用编织张力计算器',
116
+ level: 3,
117
+ },
118
+ {
119
+ type: 'list',
120
+ items: [
121
+ '<strong>织一个样片:</strong> 不要局限于 10x10 厘米。至少织一个 15x15 厘米的样片,以免边缘干扰中心测量。',
122
+ '<strong>定型样片:</strong> 像处理成衣一样洗涤并晾干样片。许多羊毛纤维在弄湿后会膨胀或变长。',
123
+ '<strong>精确测量:</strong> 使用硬尺或 10 厘米密度测量器。数一数水平方向有多少针,垂直方向有多少行。',
124
+ '<strong>输入数据:</strong> 在左列放入图解数值,在右列放入您的实际数值。该工具将自动重新计算达到所需宽度所需的针数。',
125
+ ],
126
+ },
127
+ {
128
+ type: 'title',
129
+ text: '结果解读:缩放比例 (Scale Factor)',
130
+ level: 3,
131
+ },
132
+ {
133
+ type: 'paragraph',
134
+ html: '缩放比例是我们应用于图解中每条指令的乘数。如果您的张力是 22 针,而图解要求 20 针,您的缩放比例就是 1.1。这意味着为了获得相同的物理宽度,您需要多出 10% 的针数。 0-2% 的偏差是理想的, 2-10% 是中等的, 10-25% 必须重新计算,超过 25% 则存在结构性风险。',
135
+ },
136
+ {
137
+ type: 'title',
138
+ text: '花样倍数处理',
139
+ level: 3,
140
+ },
141
+ {
142
+ type: 'paragraph',
143
+ html: '重新计算图解时最大的挑战之一是保持镂空、麻花或图案的完整性。如果设计是每 8 针重复一次,您不能简单地添加 3 针;您必须调整总针数,使其仍然是 8 的倍数。此计算器的<strong>倍数调整</strong>功能会建议最接近且符合花样结构的针数。',
144
+ },
145
+ {
146
+ type: 'tip',
147
+ title: '专家建议',
148
+ html: '<p>通常最好使用此计算器并按照您毛线的自然张力工作,通过调整针数来适配,而不是通过剧烈改变针号来强行适配张力,因为后者可能会改变织物的垂坠感和柔软度。</p>',
149
+ },
150
+ {
151
+ type: 'title',
152
+ text: '使用我们调整工具的优势',
153
+ level: 3,
154
+ },
155
+ {
156
+ type: 'list',
157
+ items: [
158
+ '通过精确的缩放比例自动调整针数和行数。',
159
+ '支持复杂的倍数 (X + Y),以保持图案完整性。',
160
+ '预估整个项目所需的毛线克数。',
161
+ '动态可视化样片,实时显示织物密度。',
162
+ ],
163
+ },
164
+ {
165
+ type: 'card',
166
+ title: '密度 / 张力 (Gauge)',
167
+ icon: 'mdi:ruler',
168
+ html: '<strong>10x10 厘米</strong>或<strong>4x4 英寸</strong>正方形内包含的针数和行数。它是所有编织图解的通用参考。',
169
+ },
170
+ {
171
+ type: 'card',
172
+ title: '定型 (Blocking)',
173
+ icon: 'mdi:water',
174
+ html: '浸湿并为成衣定型的过程,使针脚平整。展示成衣在第一次穿戴和洗涤后所具有的<strong>真实张力</strong>。',
175
+ },
176
+ {
177
+ type: 'card',
178
+ title: '缩放比例 (Scale Factor)',
179
+ icon: 'mdi:scale',
180
+ html: '图解样片与编织者实际样片之间的数学比例。决定需要调整多少针数和行数以保持<strong>正确的尺寸</strong>。',
181
+ },
182
+ ],
183
+ ui: {
184
+ sectionOriginalGauge: '原始张力',
185
+ sectionMyGauge: '您当前的样片',
186
+ sectionProject: '项目结构',
187
+ labelStitches: '针数',
188
+ labelRows: '行数',
189
+ labelWidth: '宽度',
190
+ labelLength: '长度',
191
+ labelUnit: '计量单位',
192
+ labelNeedle: '针号',
193
+ labelNeedleMm: '针号 (mm)',
194
+ labelWeight: '重量 (g)',
195
+ labelWeightOptional: '选填',
196
+ labelPatternSts: '图解起针数',
197
+ labelPatternRows: '图解总行数',
198
+ labelMultiples: '倍数',
199
+ labelMultiplesExample: '如: 10 + 2',
200
+ labelMultiplesPlaceholder: '倍数 + 边缘针',
201
+ unitEU: '10 x 10 cm (欧盟标准)',
202
+ unitUS: '4 x 4 英寸 (美国标准)',
203
+ btnClear: '清空',
204
+ btnShare: '分享',
205
+ btnCopied: '已复制!',
206
+ resSuggestedSts: '建议的起针针数',
207
+ resNewRows: '调整后的行数',
208
+ resNewRowsTooltip: '按照您当前的密度,达到原始图解长度所需的行数。',
209
+ resScaleFactor: '缩放比例',
210
+ resScaleFactorTooltip: '您的织物与图解之间的尺寸关系。负值表示您的织物更致密。',
211
+ resSuggestion: '建议',
212
+ resSuggestionTooltip: '无需重新计算图解每一针即可调整张力的技术建议。',
213
+ suggestionIdeal: '理想',
214
+ suggestionDown: '减小针号',
215
+ suggestionUp: '加大针号',
216
+ suggestionDownDetail: '请使用 {n}mm 或更细的针号。',
217
+ suggestionUpDetail: '请使用 {n}mm 或更粗的针号。',
218
+ multiplesNoteFormat: '已调整为 {n} 针 (倍数 {m})',
219
+ yarnTitle: '项目用线预估',
220
+ yarnResultFormat: '预估用线量: <strong>{g}g</strong>',
221
+ yarnSafetyFormat: '(含 +{s}g 损耗)',
222
+ alertDanger: '差异极大 (>25%)。成衣的垂坠感和结构将受明显影响。',
223
+ },
224
+ };
@@ -1,15 +1,15 @@
1
- ---
2
- import { SEORenderer } from '@jjlmoya/utils-shared';
3
- import { knittingGauge } 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 knittingGauge.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 { knittingGauge } 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 knittingGauge.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}