Skip to content

feat: 詞彙表 CJK/越南文譯後套用 + 覆蓋衝突提示 - #50

Merged
JaplinChen merged 1 commit into
masterfrom
feat/glossary-cjk-post-apply
Jul 14, 2026
Merged

JaplinChen merged 1 commit into
masterfrom
feat/glossary-cjk-post-apply

Conversation

@JaplinChen

Copy link
Copy Markdown
Owner

變更

  1. CJK/越南文譯後替換:applyPost() 原本只對 ASCII 詞彙生效,中文/越南文詞彙僅靠 LLM prompt 自律可能被改寫。改為長詞優先的 alternation regex,非 ASCII 詞以字面比對替換。
  2. 詞彙挑選上限 50 → 100。
  3. 覆蓋衝突提示:新增/編輯/匯入既有原文但譯文不同時提示(新增/編輯彈確認框,匯入於 SnackBar 顯示覆蓋筆數)。

驗證

  • flutter analyze 無問題
  • flutter test 102/102 通過(含新增 GlossaryService.applyPost 測試 5 例)

🤖 Generated with Claude Code

…e conflict detection

- applyPost now replaces non-ASCII terms (CJK/Vietnamese), not just ASCII;
  longest-key-first alternation prevents short terms firing inside longer ones
- raise pickRelevant cap 50->100
- warn on overwriting an existing term (add/edit/import)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JaplinChen
JaplinChen merged commit 6ee36f2 into master Jul 14, 2026
2 checks passed
@JaplinChen
JaplinChen deleted the feat/glossary-cjk-post-apply branch July 14, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant