Skip to content

Commit b48d17f

Browse files
committed
Round 6: 26 more S-Chinese patterns — cache / mobile / HTTP / stats / ownership
The most important addition this round mirrors Round 5's 軟件 → 軟體 fix: bare 緩存 (T-char + Simplified vocab) was missed by the existing 缓存 (S-char) pattern. Any hand-typed zh-tw regen script could spell 緩存 with Traditional characters and slip past the guard. That gap closes here. Patterns added: Cache / GPU memory / runtime errors: 緩存 -> 快取 (T-char S-vocab; sibling of 軟件 -> 軟體) 顯存 -> 顯示記憶體 / VRAM 段錯誤 -> 區段錯誤 / 分段錯誤 Mobile / social: 應用商店 -> 應用程式商店 彩信 -> 多媒體簡訊 手機卡 -> SIM 卡 鎖屏 -> 鎖定螢幕 屏保 -> 螢幕保護 點贊 -> 按讚 HTTP / connections: 請求頭 -> 請求標頭 響應頭 -> 回應標頭 長連接 -> 長連線 短連接 -> 短連線 連接池 -> 連線池 Statistics / ML: 步長 -> 步幅 置信區間 -> 信賴區間 置信度 -> 信賴度 顯著水平 -> 顯著水準 (`水平` ↔ `水準`) Security: 入侵檢測 -> 入侵偵測 防病毒 -> 防毒 數字證書 -> 數位憑證 Filesystem ownership (POSIX): 屬主 -> 擁有者 / 所有者 屬組 -> 群組 / 所屬群組 Quality / CLI / CI-CD: 服務質量 -> 服務品質 (QoS) 命令行 -> 命令列 (CLI) 流水線 -> 管線 (CI/CD pipeline) The s_only_patterns list now holds 212 regex entries across 25 sub- sections in the agent doc. No existing zh-tw content offends the new rules. 510/510 pytest pass.
1 parent f9136a4 commit b48d17f

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,66 @@ right bucket.
356356
| 報警 | 警報 / 告警 | alarm / alert |
357357
| 殺毒 (軟件) | 防毒 (軟體) | antivirus |
358358

359+
#### Cache / GPU memory / runtime errors (T-char S-vocab, easy to miss)
360+
361+
| S-Chinese | T-Chinese | Meaning |
362+
|---|---|---|
363+
| 緩存 (T-char S-vocab) | 快取 | cache (S `缓存` form is also S-vocab; both flagged) |
364+
| 顯存 | 顯示記憶體 / VRAM | GPU memory |
365+
| 段錯誤 | 區段錯誤 / 分段錯誤 | segmentation fault |
366+
367+
#### Mobile + social interactions
368+
369+
| S-Chinese | T-Chinese | Meaning |
370+
|---|---|---|
371+
| 應用商店 | 應用程式商店 | app store |
372+
| 彩信 | 多媒體簡訊 (MMS) | MMS / picture message |
373+
| 手機卡 | SIM 卡 | SIM card |
374+
| 鎖屏 | 鎖定螢幕 | lock screen |
375+
| 屏保 | 螢幕保護 | screen saver |
376+
| 點贊 | 按讚 | give a "like" |
377+
378+
#### HTTP / connections
379+
380+
| S-Chinese | T-Chinese | Meaning |
381+
|---|---|---|
382+
| 請求頭 | 請求標頭 | HTTP request header |
383+
| 響應頭 | 回應標頭 | HTTP response header |
384+
| 長連接 / 短連接 | 長連線 / 短連線 | long / short connection |
385+
| 連接池 | 連線池 | connection pool |
386+
387+
#### Statistics + ML (continued)
388+
389+
| S-Chinese | T-Chinese | Meaning |
390+
|---|---|---|
391+
| 步長 | 步幅 | step size / stride |
392+
| 置信區間 | 信賴區間 | confidence interval |
393+
| 置信度 | 信賴度 | confidence level |
394+
| 顯著水平 | 顯著水準 | significance level (`水平``水準`) |
395+
396+
#### Security (continued)
397+
398+
| S-Chinese | T-Chinese | Meaning |
399+
|---|---|---|
400+
| 入侵檢測 | 入侵偵測 | intrusion detection |
401+
| 防病毒 | 防毒 | anti-virus |
402+
| 數字證書 | 數位憑證 | digital certificate |
403+
404+
#### Filesystem ownership
405+
406+
| S-Chinese | T-Chinese | Meaning |
407+
|---|---|---|
408+
| 屬主 | 擁有者 / 所有者 | file owner (POSIX) |
409+
| 屬組 | 群組 / 所屬群組 | file group (POSIX) |
410+
411+
#### Quality / CLI / CI-CD
412+
413+
| S-Chinese | T-Chinese | Meaning |
414+
|---|---|---|
415+
| 服務質量 | 服務品質 (QoS) | quality of service |
416+
| 命令行 | 命令列 (CLI) | command line |
417+
| 流水線 | 管線 | CI/CD pipeline |
418+
359419
### Simplified Chinese (zh-cn) — avoid Traditional vocabulary
360420

361421
Same idea in reverse. Common offenders that occasionally leak from

tests/test_i18n.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,43 @@ def test_zh_tw_files_use_traditional_chinese_vocabulary():
417417
(re.compile(r"系統托盤"), "系統托盤 → 系統匣"),
418418
# Security.
419419
(re.compile(r"殺毒"), "殺毒 → 防毒"),
420+
# Round 6 — T-char-S-vocab cache, GPU memory, segfault, mobile,
421+
# social, web headers, connections, stats, security, ownership,
422+
# quality, CLI / CI.
423+
# The bare T-char `緩存` was missed by the existing 缓存 (S-char)
424+
# pattern, parallel to round 5's 軟件 → 軟體 catch.
425+
(re.compile(r"緩存"), "緩存 → 快取"),
426+
(re.compile(r"顯存"), "顯存 → 顯示記憶體 / VRAM"),
427+
(re.compile(r"段錯誤"), "段錯誤 → 區段錯誤"),
428+
# Mobile / social.
429+
(re.compile(r"應用商店"), "應用商店 → 應用程式商店"),
430+
(re.compile(r"彩信"), "彩信 → 多媒體簡訊 (MMS)"),
431+
(re.compile(r"手機卡"), "手機卡 → SIM 卡"),
432+
(re.compile(r"鎖屏"), "鎖屏 → 鎖定螢幕"),
433+
(re.compile(r"屏保"), "屏保 → 螢幕保護"),
434+
(re.compile(r"點贊"), "點贊 → 按讚"),
435+
# HTTP / network connections.
436+
(re.compile(r"請求頭"), "請求頭 → 請求標頭"),
437+
(re.compile(r"響應頭"), "響應頭 → 回應標頭"),
438+
(re.compile(r"長連接"), "長連接 → 長連線"),
439+
(re.compile(r"短連接"), "短連接 → 短連線"),
440+
(re.compile(r"連接池"), "連接池 → 連線池"),
441+
# Statistics + ML.
442+
(re.compile(r"步長"), "步長 → 步幅"),
443+
(re.compile(r"置信區間"), "置信區間 → 信賴區間"),
444+
(re.compile(r"置信度"), "置信度 → 信賴度"),
445+
(re.compile(r"顯著水平"), "顯著水平 → 顯著水準"),
446+
# Security continued.
447+
(re.compile(r"入侵檢測"), "入侵檢測 → 入侵偵測"),
448+
(re.compile(r"防病毒"), "防病毒 → 防毒"),
449+
(re.compile(r"數字證書"), "數字證書 → 數位憑證"),
450+
# Filesystem ownership.
451+
(re.compile(r"屬主"), "屬主 → 擁有者 / 所有者"),
452+
(re.compile(r"屬組"), "屬組 → 群組 / 所屬群組"),
453+
# Quality / pipelines / CLI.
454+
(re.compile(r"服務質量"), "服務質量 → 服務品質 (QoS)"),
455+
(re.compile(r"命令行"), "命令行 → 命令列 (CLI)"),
456+
(re.compile(r"流水線"), "流水線 → 管線 (CI/CD pipeline)"),
420457
]
421458
zh_tw_paths = [
422459
_REPO_ROOT / "scripts" / "regen_llm_security_batch_zh_tw.py",

0 commit comments

Comments
 (0)