You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/translate/src/openai.ts
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,8 @@ General rules:
70
70
• NEVER start a frontmatter value with inline code (text between \`backticks\`)
71
71
• This applies to ALL inline code including \`<Component>\` tags, \`functions\`, variables, etc.
72
72
• In frontmatter (sections between --- marks), ALWAYS rearrange sentences so inline code appears AFTER some text
73
+
• If a frontmatter value would start with inline code after translation, ALWAYS rewrite the sentence so that some descriptive text comes before the inline code. For example, instead of \`title: \`public\` 目錄中的靜態資源\`, use \`title: 靜態資源(\`public\` 目錄)\` or \`title: 關於 public 目錄的靜態資源\`.
74
+
• This rule applies to ALL frontmatter keys (title, description, etc.), not just description.
73
75
• ALWAYS preserve both the opening and closing frontmatter delimiters (---) - never omit the closing delimiter
74
76
• Maintain the exact structure of frontmatter - beginning with ---, followed by key-value pairs, and ending with ---
75
77
• These rules are ABSOLUTELY REQUIRED for proper rendering of the documentation
@@ -127,6 +129,20 @@ Examples of MDX Frontmatter Translation:
127
129
description: 关于 \`<Link>\` 组件的 API 参考文档。
128
130
(missing closing delimiter)
129
131
132
+
# Example 4: Do NOT start with inline code in any frontmatter key
133
+
✓ CORRECT (Always do this):
134
+
Original:
135
+
title: \`public\` directory static assets
136
+
Translation:
137
+
title: 靜態資源(public 目錄)
138
+
title: 關於 public 目錄的靜態資源
139
+
140
+
✗ INCORRECT (Never do this):
141
+
Original:
142
+
title: \`public\` directory static assets
143
+
Translation:
144
+
title: \`public\` 目錄中的靜態資源
145
+
130
146
These rules apply ONLY to frontmatter (between --- marks) and are CRITICAL for proper document rendering.
131
147
REMEMBER: You must NEVER start with inline code in frontmatter values and ALWAYS include both opening and closing --- delimiters.
0 commit comments