zh locale: translate all 40250 itemdesc descriptions, wrapped for the tooltip

itemdesc_translate_zh.tsv maps the English description/summary text to Chinese (1,788 entries,
every itemdesc row covered). build_zh_locale.py replaces the cells and wraps Chinese into
26-byte lines joined by ' |', which 40250's Western SplitDescription turns into forced line
breaks; the 50307 overlay row is wrapped the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 11:17:21 +09:00
co-authored by Claude Opus 5.5
parent 3fcb27dd4d
commit b7c215ee42
4 changed files with 1941 additions and 4 deletions
+13
View File
@@ -44,3 +44,16 @@
`item_list_zh_overlay.txt`、`itemdesc_zh_overlay.txt` 每行是目标文件的一整行(UTF-8,第一列 VNUM),
`build_zh_locale.py` 用它替换同 VNUM 的行(`ROW_FILES`),其余行字节不变;VNUM 不存在就报错。
用于服务端改了用途的物品,例如 50307 小狩猎套装礼包(`tools/server/hunt-set`)换成礼盒图标和中文说明。
## 物品说明(itemdesc_translate_zh.tsv)
40250 `itemdesc.txt` 的说明列(第 3 列)和摘要列(第 4 列,“Potion production”“Research”)按英文原文整句翻译,
一共 1,788 条,放在 `itemdesc_translate_zh.tsv`(英文、制表符、中文,UTF-8)。英文原文完全相同的物品共用同一条译文。
第 2 列物品名不改:客户端显示的名称来自 `item_proto`(见上文名称快照)。
- 客户端的 tooltip 走的是 40250 的西文路径(`uitooltip.SplitDescription`):只在空格处断行,每行最多 35 字节,
遇到 `|x` 这种词会另起一行。构建时会把中文折成东方路径的宽度,也就是每行 26 字节(一个汉字算 2 字节),再用 ` |` 连接各行。
- 断行优先放在标点后面,标点不放在行首;英文单词和数字不会被拆开。
- 如果最后一行只剩一两个字,会把前面的行收窄一些重新折。
- 表里没有的格子保留英文,`zh-locale-report.json` 里的 `itemdesc.txt translation.english_rows` 会列出这些 VNUM。
- `itemdesc_zh_overlay.txt` 的整行覆盖在翻译之后执行,它的说明列也用同样的方式折行。
File diff suppressed because it is too large Load Diff