Skip to content

Commit 89ac6ec

Browse files
committed
fix: update skill after poc
1 parent fb7c608 commit 89ac6ec

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

.claude/skills/terminology-check.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,28 @@ These Simplified Chinese terms MUST be converted:
8080
| 轉義 | 跳脫 | escape |
8181
| 基類 | 基底類別 | base class |
8282

83+
## Context Decision Log (Rule)
84+
When a reviewer decides a translation depends on nearby context (above/below),
85+
record the decision here for future reference. Keep entries short and specific.
86+
87+
Format:
88+
- **Term/pattern:** ...
89+
- **Decision:** ...
90+
- **Context cue:** ...
91+
- **Example:** `source` -> `translation`
92+
93+
Example:
94+
- **Term/pattern:** 類型 / 型別
95+
- **Decision:** 用語依上下文;Python 型別物件用「型別」,一般分類用「類型」
96+
- **Context cue:** 出現 `int/str/dict/type` 或 "type object"
97+
- **Example:** "two types of packages" -> "兩種類型的套件"
98+
99+
Decision Log:
100+
- **Term/pattern:** 類型 / 型別
101+
- **Decision:** 用語依上下文;Python 型別物件用「型別」,一般分類用「類型」
102+
- **Context cue:** 出現 `int/str/dict/type` 或 "type object"
103+
- **Example:** "two types of packages" -> "兩種類型的套件"
104+
83105
## High-Frequency Terms (Keep in English)
84106

85107
These terms should NOT be translated, even if glossary has translations:
@@ -143,9 +165,10 @@ Core Python terms with required zh_TW translations:
143165

144166
1. **Extract terms** - Parse msgstr for Chinese phrases and English words
145167
2. **Check forbidden** - Flag any zh_CN variants from the forbidden list
146-
3. **Check consistency** - Compare with other translations of same term
147-
4. **Check glossary** - Verify against official glossary.po
148-
5. **Report issues** - List violations with suggestions
168+
3. **Consult context log** - Check the Context Decision Log for any applicable rules
169+
4. **Check consistency** - Compare with other translations of same term
170+
5. **Check glossary** - Verify against official glossary.po
171+
6. **Report issues** - List violations with suggestions
149172

150173
## Output Format
151174

@@ -157,6 +180,9 @@ FORBIDDEN TERMS (must fix):
157180
Line 78: "返回" -> "回傳" (return)
158181
Line 156: "對象" -> "物件" (object)
159182
183+
REVIEW (context-dependent):
184+
Line 88: "類型" (see Context Decision Log)
185+
160186
INCONSISTENT TERMS (review):
161187
"iterator" translated as:
162188
- "疊代器" (45 occurrences) <- standard

.claude/skills/validate-translation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ metadata:
5757
| Inconsistent term | WARNING | Same term translated differently |
5858
| High-freq term translated | INFO | Terms like `int`, `list` should stay English |
5959

60+
### 7. Context-Dependent Decisions
61+
| Check | Severity | Description |
62+
|-------|----------|-------------|
63+
| Reviewer context rule | INFO | If a reviewer decides a term/pattern depends on nearby context, record it in the Context Decision Log in `terminology-check` for future reference. |
64+
6065
## Validation Process
6166

6267
1. **Read the PO entry** - Parse msgid, msgstr, comments, and flags
@@ -65,7 +70,8 @@ metadata:
6570
4. **Check spacing** - Verify CJK-Latin spacing
6671
5. **Check line length** - Ensure <= 79 characters
6772
6. **Check reST** - Validate roles, links, escaping
68-
7. **Check terminology** - Cross-reference with glossary
73+
7. **Check terminology** - Cross-reference with glossary and Context Decision Log
74+
8. **Record context rules** - If a decision depends on nearby context, add it to the Context Decision Log
6975

7076
## Output Format
7177

0 commit comments

Comments
 (0)