ci: tighten crowdin and i18n PR checks

This commit is contained in:
春河晴
2026-03-13 00:35:11 +09:00
parent 6bac2b9331
commit 4b7ee3923c
6 changed files with 132 additions and 15 deletions

View File

@@ -85,6 +85,11 @@ Prompt 加载规则:
3. 在代码中用 `t()``tn()` 替换硬编码字符串。
4. 运行 `python scripts/i18n_validate.py` 校验结构。
对于非 `zh-CN` 的目标 locale
- 不要手工把中文 source 文案直接复制进目标语言文件后提交。
- 英文 locale 文件中不应保留中文字符;这类残留会被校验脚本拦截。
## 校验脚本
运行:
@@ -101,6 +106,7 @@ python scripts/i18n_validate.py
- 各语言 key 集合是否与 `zh-CN` 对齐
- 占位符集合是否一致
- plural 结构是否一致
-`zh-CN` locale 是否直接保留了包含中文字符的 source 文案
- prompt 模板已存在时,其占位符集合必须与 `prompts/zh-CN/` 对齐
对于 prompt 模板: