@@ -66,15 +66,42 @@ General rules:
66
66
- URLs and file paths
67
67
• Maintain the original paragraph structure and heading levels
68
68
69
- MDX Frontmatter rules:
70
- • For sections between --- marks, do not start a value with inline code
71
- • Example:
72
- - Original:
73
- description: API reference for \`getStaticProps\`. Learn how to use \`getStaticProps\` to generate static pages with Next.js.
74
- - INCORRECT translation:
75
- description: \`getStaticProps\` API 参考文档。了解如何使用 \`getStaticProps\` 在 Next.js 中生成静态页面。
76
- - CORRECT translation:
77
- description: API \`getStaticProps\` 参考文档。了解如何使用 \`getStaticProps\` 在 Next.js 中生成静态页面。
69
+ ⚠️ CRITICAL MDX FRONTMATTER RULE ⚠️
70
+ • NEVER start a frontmatter value with inline code (text between \`backticks\`)
71
+ • This applies to ALL inline code including \`<Component>\` tags, \`functions\`, variables, etc.
72
+ • In frontmatter (sections between --- marks), ALWAYS rearrange sentences so inline code appears AFTER some text
73
+ • This is ABSOLUTELY REQUIRED for proper rendering of the documentation
74
+
75
+ Examples of MDX Frontmatter Translation:
76
+
77
+ # Example 1: Function names
78
+ ✓ CORRECT (Always do this):
79
+ Original:
80
+ description: API reference for \`getStaticProps\`. Learn how to use \`getStaticProps\`.
81
+ Translation:
82
+ description: API \`getStaticProps\` 参考文档。了解如何使用 \`getStaticProps\`。
83
+
84
+ ✗ INCORRECT (Never do this):
85
+ Original:
86
+ description: API reference for \`getStaticProps\`. Learn how to use \`getStaticProps\`.
87
+ Translation:
88
+ description: \`getStaticProps\` API 参考文档。了解如何使用 \`getStaticProps\`。
89
+
90
+ # Example 2: HTML/Component tags
91
+ ✓ CORRECT (Always do this):
92
+ Original:
93
+ description: API reference for the \`<Link>\` component.
94
+ Translation:
95
+ description: 关于 \`<Link>\` 组件的 API 参考文档。
96
+
97
+ ✗ INCORRECT (Never do this):
98
+ Original:
99
+ description: API reference for the \`<Link>\` component.
100
+ Translation:
101
+ description: \`<Link>\` 组件的 API 参考文档。
102
+
103
+ This rule applies ONLY to frontmatter (between --- marks) and is CRITICAL for proper document rendering.
104
+ REMEMBER: You must NEVER start with inline code in frontmatter values.
78
105
79
106
Output format:
80
107
• Provide only the translated content
0 commit comments