Skip to content

Commit f9136a4

Browse files
committed
Round 5: 25 more S-Chinese patterns — punctuation / docs / images / addresses
The most important catch this round is bare 軟件 (Traditional chars, Simplified vocabulary). The existing 软件|软体 pattern only caught the S-character form; a regen script written by hand could easily type 軟件 with T characters and escape the guard — that gap is now closed. Patterns added: Punctuation / escapes / numeric formatting: 溢出 → 溢位 內聯 → 內嵌 / 行內 轉義 → 跳脫 反斜杠 → 反斜線 斜杠 → 斜線 (negative-lookbehind to skip 反斜杠 already counted) 方括號 → 中括號 數字化 → 數位化 數字簽名 → 數位簽名 分辨率 → 解析度 矢量 → 向量 響應 → 回應 Software / documents: 軟件 → 軟體 (CRITICAL — bare T-char S-vocab missed for rounds) 文檔 → 文件 / 說明文件 文本框 → 文字方塊 源代碼 → 原始碼 腳注 → 腳註 Image / media: 縮略圖 → 縮圖 二維碼 → 二維條碼 / QR code Network addresses: IP\s*地址 → IP 位址 物理地址 → 實體位址 MAC\s*地址 → MAC 位址 Alerts / security: 報警 → 警報 殺毒 → 防毒 UI shortcuts: 快捷方式 → 捷徑 系統托盤 → 系統匣 The agent doc table now has 4 new subsections (Punctuation, Software / documents, Image / media continued, Addresses) so future maintainers find these entries near their domain peers. 510/510 pytest pass; ruff clean.
1 parent 08d056f commit f9136a4

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

.claude/agents/language-vocabulary-check.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,50 @@ right bucket.
311311
| 任務管理器 | 工作管理員 | task manager |
312312
| 文件管理器 | 檔案管理員 / 檔案總管 | file manager |
313313
| 注冊表 | 登錄檔 | Windows registry |
314+
| 快捷方式 | 捷徑 | shortcut (Windows `.lnk`) |
315+
| 系統托盤 | 系統匣 | system tray |
316+
317+
#### Punctuation / escapes / numeric formatting
318+
319+
| S-Chinese | T-Chinese | Meaning |
320+
|---|---|---|
321+
| 反斜杠 / 斜杠 | 反斜線 / 斜線 | backslash / slash |
322+
| 方括號 | 中括號 | `[ ]` brackets |
323+
| 轉義 | 跳脫 | escape character |
324+
| 數字化 | 數位化 | digitisation |
325+
| 數字簽名 | 數位簽名 | digital signature |
326+
| 分辨率 | 解析度 | resolution (image / display) |
327+
| 矢量 | 向量 | vector (math / graphics) |
328+
| 內聯 | 內嵌 / 行內 | inline (code / function) |
329+
| 溢出 | 溢位 | overflow / underflow |
330+
331+
#### Software / documents
332+
333+
| S-Chinese | T-Chinese | Meaning |
334+
|---|---|---|
335+
| 軟件 (T-char S-word) | 軟體 | software (the bare-char `软件` form is also S, both flagged) |
336+
| 文檔 | 文件 / 說明文件 | document (S `文檔`; TW `文件` in document context) |
337+
| 文本框 | 文字方塊 | text box |
338+
| 源代碼 | 原始碼 | source code |
339+
| 腳注 | 腳註 | footnote |
340+
341+
#### Image / media (continued)
342+
343+
| S-Chinese | T-Chinese | Meaning |
344+
|---|---|---|
345+
| 縮略圖 | 縮圖 | thumbnail |
346+
| 二維碼 | 二維條碼 / QR code | QR code |
347+
| 響應 | 回應 / 回覆 | response (HTTP / event) |
348+
349+
#### Addresses / network identifiers
350+
351+
| S-Chinese | T-Chinese | Meaning |
352+
|---|---|---|
353+
| IP 地址 | IP 位址 | IP address |
354+
| 物理地址 | 實體位址 | physical address |
355+
| MAC 地址 | MAC 位址 | MAC address |
356+
| 報警 | 警報 / 告警 | alarm / alert |
357+
| 殺毒 (軟件) | 防毒 (軟體) | antivirus |
314358

315359
### Simplified Chinese (zh-cn) — avoid Traditional vocabulary
316360

tests/test_i18n.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,40 @@ def test_zh_tw_files_use_traditional_chinese_vocabulary():
383383
(re.compile(r"任務管理器"), "任務管理器 → 工作管理員"),
384384
(re.compile(r"文件管理器"), "文件管理器 → 檔案管理員 / 檔案總管"),
385385
(re.compile(r"注冊表"), "注冊表 → 登錄檔"),
386+
# Round 5 — overflow / escape / punctuation / pixels / images.
387+
(re.compile(r"溢出"), "溢出 → 溢位 (overflow / under-)"),
388+
(re.compile(r"內聯"), "內聯 → 內嵌 / 行內"),
389+
(re.compile(r"轉義"), "轉義 → 跳脫 (escape char)"),
390+
(re.compile(r"反斜杠"), "反斜杠 → 反斜線"),
391+
(re.compile(r"(?<!反)斜杠"), "斜杠 → 斜線"),
392+
(re.compile(r"方括號"), "方括號 → 中括號"),
393+
(re.compile(r"數字化"), "數字化 → 數位化"),
394+
(re.compile(r"數字簽名"), "數字簽名 → 數位簽名"),
395+
(re.compile(r"分辨率"), "分辨率 → 解析度"),
396+
(re.compile(r"矢量"), "矢量 → 向量"),
397+
(re.compile(r"響應"), "響應 → 回應"),
398+
# T-char Simplified-vocab — the standalone form 軟件 that the
399+
# existing char-level 软件 pattern misses. CRITICAL.
400+
(re.compile(r"軟件"), "軟件 → 軟體"),
401+
# Documents.
402+
(re.compile(r"文檔"), "文檔 → 文件 / 說明文件 (S `文檔` = document)"),
403+
(re.compile(r"文本框"), "文本框 → 文字方塊"),
404+
(re.compile(r"縮略圖"), "縮略圖 → 縮圖"),
405+
(re.compile(r"二維碼"), "二維碼 → 二維條碼 / QR code"),
406+
# Addresses / IPs.
407+
(re.compile(r"IP\s*地址"), "IP地址 → IP 位址"),
408+
(re.compile(r"物理地址"), "物理地址 → 實體位址"),
409+
(re.compile(r"MAC\s*地址"), "MAC 地址 → MAC 位址"),
410+
# Alerts / errors.
411+
(re.compile(r"報警"), "報警 → 警報"),
412+
# Source / footnotes.
413+
(re.compile(r"源代碼"), "源代碼 → 原始碼"),
414+
(re.compile(r"腳注"), "腳注 → 腳註"),
415+
# UI shortcuts / tray.
416+
(re.compile(r"快捷方式"), "快捷方式 → 捷徑"),
417+
(re.compile(r"系統托盤"), "系統托盤 → 系統匣"),
418+
# Security.
419+
(re.compile(r"殺毒"), "殺毒 → 防毒"),
386420
]
387421
zh_tw_paths = [
388422
_REPO_ROOT / "scripts" / "regen_llm_security_batch_zh_tw.py",

0 commit comments

Comments
 (0)