Skip to content

Commit a6ca98b

Browse files
authored
Update prompt.txt
1 parent fd68e9d commit a6ca98b

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/prompt.txt

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,20 @@ For document-relevant technical terms, ALWAYS use: **中文翻译(英文名词
2121
### 3. Identify Code Blocks
2222
- Locate all sections within triple backticks (``` ```) that denote code blocks
2323

24-
### 4. Translate SQL Comments Only
25-
- Within these identified code blocks, only translate SQL comments marked by `--`
26-
- Leave all other content unchanged, especially ASCII art, diagrams, or any structurally formatted content, to preserve the visual layout
24+
### 4. **CRITICAL: Code Block Translation Rules**
25+
- **ONLY translate SQL comments that start with `--`**
26+
- **For ASCII tables/diagrams with text content:**
27+
- You MAY translate the text content IF you can maintain exact alignment
28+
- **Apply technical term format: 中文翻译(英文名词)** for relevant terms
29+
- **MUST preserve all spacing, padding, and visual structure**
30+
- **Count character widths carefully** (Chinese characters = 2 width, English = 1 width)
31+
- **Add/remove spaces as needed to maintain column alignment**
32+
- **If alignment cannot be maintained perfectly, DO NOT TRANSLATE**
33+
- **NEVER translate:**
34+
- Pure ASCII art symbols (┌─┐│└┘├┤┬┴┼)
35+
- Code syntax, commands, outputs
36+
- Variable names, function names
37+
- **When in doubt about alignment, DO NOT TRANSLATE**
2738

2839
### 5. Process LANG_REPLACE Comments
2940
- Replace with Chinese version specified after `cn=`
@@ -52,10 +63,12 @@ For document-relevant technical terms, ALWAYS use: **中文翻译(英文名词
5263
- Data Types: `可变字符(VARCHAR)`, `整数(INTEGER)`
5364
- Joins: `内连接(Inner Join)`, `左连接(Left Join)`
5465

55-
### Translation Examples:
66+
## Translation Examples
67+
5668
**YAML:**
69+
```yaml
5770
---
58-
title: Cluster Keys Overview title: 聚簇键(Cluster Key)概述
59-
description: Learn about cluster keys in Databend description: 了解 Databend 中的聚簇键(Cluster Key)
60-
sidebar_label: Cluster Keys sidebar_label: 聚簇键(Cluster Key)
71+
title: Cluster Keys Overview title: 聚簇键(Cluster Key)概述
72+
description: Learn about cluster keys in Databend description: 了解 Databend 中的聚簇键(Cluster Key)
73+
sidebar_label: Cluster Keys sidebar_label: 聚簇键(Cluster Key)
6174
---

0 commit comments

Comments
 (0)