| name | localize |
| description | Propagate new player-facing text through TAOM's 12-language localization pipeline โ wrap with {=KEY}, register the string, run the Claude translation tool, validate. Use after adding UI text or XSLT strings. |
| argument-hint | ["c#|xml-file|xslt"] |
Localization Propagation
Get new player-facing text into all 12 supported languages (BR, CNs, CNt, DE, FR, IT, JP, KO, PL, RU, SP, TR). Full reference: docs/localization/TRANSLATOR_GUIDE.md + tools/README.md (localization section). Three cases:
Case A โ new C# text shown to the player
- Wrap the string:
new TextObject("{=taom_my_feature_label}My Feature") (always {=KEY}default form).
- Add the key + English default to
Main/_Module/ModuleData/taom_module_strings.xml.
- Propagate:
python tools/translate_with_claude.py (machine-translates to the 11 AI languages; PL is hand-translated, overrides in tools/translation_overrides/<lang>.json always win).
Case B โ new SOURCE XML file containing in-game text
- Register the file in
SubModule.xml as <XmlNode><XmlName id="GameText" path="..."/>.
- Add a
<LanguageFile> reference in all 12 language_data.xml files.
- Create empty per-language stubs (
Languages/<LANG>/std_taom_*.xml).
- Bump the
LanguageDataXmlTests.HaveExactlyXLanguageFiles count in TAOM.Tests/Infrastructure/Localization/LanguageDataXmlTests.cs.
- Run
tools/translate_with_claude.py.
Case C โ XSLT injects new {=KEY}default text
- Harvest the new keys into
Main/_Module/ModuleData/taom_xslt_strings.xml (precedent: commit 20713a1).
- Run
tools/translate_with_claude.py.
Tools
tools/translate_with_claude.py โ 4-tier fallback (override โ cache โ Claude LLM โ English); cache in tools/translation_cache/<lang>.json is git-tracked, so re-runs are free.
tools/rebuild_translation_files.py โ rebuild per-language files from cache.
tools/translation_status.sh โ coverage report.
Validate
dotnet test TAOM.Tests --filter "LanguageDataXmlTests" โ enforces 8 LanguageFile refs/language, well-formed XML, no missing files. For Case B the test count bump is mandatory or this goes red.
Gotchas
- Morphologically-rich languages (RU/JP/KO/TR/CN) hit gender-agreement rejections that fall back to English โ flag for human polish (no auto-fix).
- Three external modules also have loc (
TAOM_Map, LOTRLOME_Armory) deployed straight to the game install โ not in the repo.