Tyou 多语言工作流

SkillFiles & storage

Skill for Tyou multilingual copy/localization/i18n workflows. Required when adding or modifying multilingual text, `TableLocalizationText`, `#TableLocalizationText.xlsx`, `tyou.i18n.get`, `LocalizeLabel`, language switching display, copy keys, or Chinese/English fields, and when using multilingual d

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Tyou 多语言工作流 skill

What this skill tells your AI

The instructions your AI receives, as published by xiayu519/tyou in .agents/skills/localization-dev/SKILL.md and read by ahel’s review.

本 skill 只负责 Tyou 多语言文案流程。配表读写、字段变更和导表细节必须使用 luban-dev

核心路径

  1. 读取 .agents/skills/luban-dev/SKILL.md.agents/skills/tyou-dev/references/luban-config.md
  2. 只改源表:Design/config/#TableLocalizationText.xlsx
  3. 当前字段:idkeyzh_cnen_us
  4. 写表前先查重:key 必须稳定且唯一,id 不重复。
  5. 写表前先做文案复用判断,避免重复行。
  6. 写表必须通过 luban-dev 的安全流程;能用 luban_helper.py 就优先用它,写操作必须带 --write
  7. 导表只使用 Design/tools/genBin.bat
  8. 运行时只通过 tyou.i18n.get(key, ...args)LocalizeLabel 使用。

复用判断

  1. 新增文案前先查询 TableLocalizationText 现有行,优先用 luban_helper.py table get TableLocalizationText 或更窄的 row query
  2. 用户明确指定新 id/key 和精确文案时照此执行,保留唯一性校验;近似候选不产生额外确认。
  3. 未指定 key 时,只有双语文本、用途和独立修改预期都一致才复用。文字相同但业务语义不同可以保留独立 key。
  4. 近似文本不擅自替换用户指定文本。只有复用会改变目标语义且现有要求无法判断时,才提必要问题;不为每次修改全表做语义扫描。

禁止

  • 不手写多语言字典作为主路径。
  • 不直接修改 Client/assets/scripts/proto/config/bin/schema.ts
  • 不手改 Client/assets/asset-raw/config/game/*.bin
  • 不直接解析 .bin 判断文案内容。
  • 不绕过 Luban 源 Excel 补运行时兜底文本。

常用操作

只读确认:

python .agents/skills/luban-dev/scripts/luban_helper.py table get TableLocalizationText
python .agents/skills/luban-dev/scripts/luban_helper.py field list TableLocalizationText
python .agents/skills/luban-dev/scripts/luban_helper.py row query TableLocalizationText --conditions key=common_ok

导表:

Design/tools/genBin.bat

运行时:

const text = tyou.i18n.get("common_ok");
const textWithArg = tyou.i18n.get("item_count", count);

UI Label:

labelNode.getComponent(LocalizeLabel)?.setKey("common_ok");

验证

  • 源表存在目标 key,且 zh_cn / en_us 有值。
  • 导表成功,生成的 schema.tsgame/*.bin 只作为导表产物变化。
  • tyou.loadTablesAsync() 成功后由 Tyou 刷新 i18n;确认目标 key 可通过 tyou.i18n.get() 读取。
  • 缺 key 时运行时返回 #key#,不要用业务代码吞掉这个信号。

Signals

GitHub stars
69
Forks
6
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
localization-dev
Source
github.com/xiayu519/tyou