feat: 全公司共享三语术语表(中/英/印尼),保存即默认引用

- glossary_store.py: 进程级单例JSON存储,原子写入+asyncio锁,DOCUTRANSLATE_GLOSSARY_PATH可配置
- lang_mapping.py: 三列(zh/en/id)与{src:dst}互转,按目标语言自动取列;兼容旧2列CSV
- app.py: 新增GET/POST /service/glossary路由
- environment.py: 新增DOCUTRANSLATE_GLOSSARY_PATH环境变量
- index.html: 弹窗改为可编辑3列表+增删行+保存/导入/导出CSV;页面打开自动加载共享术语表;
  翻译时前端按to_lang编译为{src:dst},payload.glossary_dict契约不变
- i18nData.json: 三语新增术语表相关UI文案
- 翻译管线零改动:MT走translation_options.terms,非MT走system prompt注入

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 19:18:51 +08:00
parent 2d39c009cf
commit f2e6d847e2
7 changed files with 449 additions and 24 deletions

2
.gitignore vendored
View File

@@ -8,6 +8,8 @@ wheels/
tests/resource/
tests/
docutranslate/output/
# Shared glossary runtime data
data/
# Virtual environments
.venv
#idea