Skip to content

multilingual support & Chinese translation - #50

Closed
robvoid wants to merge 3 commits into
Chrizhermann:mainfrom
robvoid:main
Closed

multilingual support & Chinese translation#50
robvoid wants to merge 3 commits into
Chrizhermann:mainfrom
robvoid:main

Conversation

@robvoid

@robvoid robvoid commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

First of all, huge thanks for this brilliant mod! I'm really excited to include it in a modpack I'm assembling based on Improved Anvil, which is aimed primarily at the Chinese player community. To make that work, I've added multi-language support via WeiDU's .tra system, along with a Simplified Chinese translation.

Admittedly, the implementation isn't the most elegant. Since WeiDU has no native handling for Lua and UI.menu files, I had to work around that by first replacing the UI‑related strings in the Lua code with placeholder tokens, and then using REPLACE_TEXTUALLY to map those tokens to .tra entries. I've tried to keep the changes to the .tp2 as minimal as possible and confined them to an INCLUDE ~buffbot/TraMapping.tpa~ file.

I really hope you'll consider merging this PR so that players of other languages can also enjoy your fantastic mod. If you have any thoughts or suggestions on the approach, I'm very open to discussion!

Thanks again for creating and sharing this.

@Chrizhermann

Copy link
Copy Markdown
Owner

I am so sorry I never reacted to this. I was very busy with other things and honestly just overlooked this PR. I will review it, test it and also merge it. Thank you so much for your contribution! I promise I will be better with including PR submissions!

@Chrizhermann

Copy link
Copy Markdown
Owner

Thank you again, @robvoid. Your Simplified Chinese translation and the localization direction from this PR have now landed in v1.8.0-alpha.

The implementation was rebuilt on current main rather than merging the stale placeholder / REPLACE_TEXTUALLY approach directly. BuffBot now ships complete English and Simplified Chinese UTF-8 catalogs; UI, Options, defaults, and player feedback load from the selected file-backed catalog with English fallback, while only the eight generated F12 innate names remain TLK-backed. That design also avoids the native startup crash found when BuffBot-owned strings were fetched from the game TLK too early.

Your translation is credited in the README and changelog, and in commit history through a co-author trailer.

Validation:

  • 408 automated tests passed
  • WeiDU 249 English/Chinese install, switching, upgrade, uninstall, and packaged-archive coverage passed across EEex v0.11/v1 fixtures
  • Live BG2:EE + EEex acceptance loaded a game and confirmed readable Chinese BuffBot UI at the tested resolution/font
  • Automated English startup and restoration passed

Still not fully exercised: the full interaction/casting matrix, live Project Image behavior, non-ASCII import/export, save/reload and area transitions, BG1EE, EET, alternate resolutions/fonts, the Project Infinity frontend, and WeiDU versions other than 249.

Closing this PR as incorporated through the reworked implementation. Thank you for making BuffBot localization happen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants