Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions .claude/skills/terminology-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,28 @@ These Simplified Chinese terms MUST be converted:
| 轉義 | 跳脫 | escape |
| 基類 | 基底類別 | base class |

## Context Decision Log (Rule)
When a reviewer decides a translation depends on nearby context (above/below),
record the decision here for future reference. Keep entries short and specific.

Format:
- **Term/pattern:** ...
- **Decision:** ...
- **Context cue:** ...
- **Example:** `source` -> `translation`

Example:
- **Term/pattern:** 類型 / 型別
- **Decision:** 用語依上下文;Python 型別物件用「型別」,一般分類用「類型」
- **Context cue:** 出現 `int/str/dict/type` 或 "type object"
- **Example:** "two types of packages" -> "兩種類型的套件"

Decision Log:
- **Term/pattern:** 類型 / 型別
- **Decision:** 用語依上下文;Python 型別物件用「型別」,一般分類用「類型」
- **Context cue:** 出現 `int/str/dict/type` 或 "type object"
- **Example:** "two types of packages" -> "兩種類型的套件"

## High-Frequency Terms (Keep in English)

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

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

## Output Format

Expand All @@ -157,6 +180,9 @@ FORBIDDEN TERMS (must fix):
Line 78: "返回" -> "回傳" (return)
Line 156: "對象" -> "物件" (object)

REVIEW (context-dependent):
Line 88: "類型" (see Context Decision Log)

INCONSISTENT TERMS (review):
"iterator" translated as:
- "疊代器" (45 occurrences) <- standard
Expand Down
8 changes: 7 additions & 1 deletion .claude/skills/validate-translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ metadata:
| Inconsistent term | WARNING | Same term translated differently |
| High-freq term translated | INFO | Terms like `int`, `list` should stay English |

### 7. Context-Dependent Decisions
| Check | Severity | Description |
|-------|----------|-------------|
| 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. |

## Validation Process

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

## Output Format

Expand Down
Loading