zh quests: translate.lua builder + first 100 quest strings
40250 quests say gameforge.<quest>.<key>, loaded by game from share/locale/<locale>/translate.lua at start. build_zh_translate_lua.py lays the reviewed data/zh_40250/quest_translate_zh.tsv over the English file line by line (nested tables kept), re-wraps at the quest window width, and writes GBK with 0x5C trail bytes doubled. Deployed on 203; blacksmith dialog shows Chinese. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3ae77c3530
commit
671155eecc
@@ -16,3 +16,18 @@
|
||||
`scripts/build_zh_locale.py` 构建时以 overlay 覆盖快照同 VNUM / 同键的值。
|
||||
旧的龙驹中文表与线上表有 21 个相同 VNUM 不同名;不把旧表覆盖到服务端。
|
||||
服务端名称若再更新,需重新只读导出并核对差异后更新本快照。
|
||||
|
||||
## 任务文本(translate.lua)
|
||||
|
||||
40250 的任务文本都通过 `gameforge.<任务>.<键>` 引用。game 启动时从 `share/locale/<locale>/translate.lua` 读取这些文本(questlua.cpp),
|
||||
所以换文件后重启即可生效,不用重新编译 quest。
|
||||
|
||||
- 译文放在 `quest_translate_zh.tsv`,每行一条:`<任务>.<键>`、制表符、中文,UTF-8 编码。
|
||||
- 译文里的 `[ENTER]` 是有意的换行;构建时每行按 50 列(汉字算 2 列)重新折行。
|
||||
- 英文原文相同的其他键会共用同一条译文。
|
||||
- 还没有译文的键保留英文。
|
||||
- 构建:`python3 scripts/build_zh_translate_lua.py build <输出>`,输出 GBK 编码。
|
||||
- 构建逐行保留英文文件的结构(包括嵌套表),只替换字符串值。
|
||||
- GBK 双字节字符的第二个字节可能是 0x5C(反斜杠),构建时会把它写成两个。
|
||||
- 查看待译条目:`python3 scripts/build_zh_translate_lua.py todo <目录> --quests <命名空间,...>`。
|
||||
- 部署到 203:覆盖 `/usr/metin2/server/share/locale/newcibn/translate.lua`,然后重启。英文原件备份在同目录的 `translate.lua.en-20260930`。
|
||||
|
||||
Reference in New Issue
Block a user