Repository navigation
Conversation
The in-game text map turned the client's Simplified Chinese strings into English only. With --lang zh-TW it pairs them with the client's own Localization_zh_TW instead (the publisher's Taiwan wording), and fills what that table lacks from src/Ro3Emu.Loc/translations-zhtw. English stays the default. The choice is remembered in the settings, and the map records its language in its first line so it is rebuilt once when the language changes.
- Keep the translations in src/Ro3Emu.Setup: src/Ro3Emu.Loc is part of the stamp of the prebuilt client DLLs, which these texts are not in. - Drop the 1,758 rows for text marked as not needing translation (designer and test strings); fix 十字斬首者, 回饋 and 鏡頭 to the client's own wording. - Our rows fill what the client's zh_TW table lacks and no longer replace it. - The Localization_zh_TW chunk counts as an export table only for zh-TW, so English users see no change in what makes an export incomplete. - After an export, rebuild the map only when its language changed. - Do not crash when --lang cannot be saved; read the setting case-insensitively.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RO3Emu turns the Simplified Chinese strings the client draws into English. With a Traditional Chinese client that leaves a mix of Traditional Chinese (the client's own) and English, and there is no way to ask for Chinese instead. This adds a second language for the in-game text map.
RO3Emu.exe --lang zh-TW:Localization_zh_CNwith the client's ownLocalization_zh_TWfrom the player's game folder (the publisher's Taiwan wording), the same way the English map pairs it withLocalization_en. Nothing from the client is committed;src/Ro3Emu.Setup/translations-zhtw/*.tsv(2,010 rows, samezh<TAB>textformat as the English files). Those rows never replace a pair from the client's table. They were drafted from an automatic Simplified-to-Taiwan conversion and corrected against the wording of the client's own zh_TW pairs; text marked(无需翻译)(designer and test strings) is left out;--langis remembered inRO3Emu.settings.json. The generated map records its language in its first line (the# zh en - generated byprefix is unchanged, soClientPatcherstill recognises it), andstart/host/joinrebuild it once when the language changed. After an export the map is only rebuilt for a language change.A user who never passes
--langgets the same map, the same export and the same failure rules as before: the zh_TW chunk is an export table only in zh-TW mode.Why the translations are in
src/Ro3Emu.Setupand not next to the English ones insrc/Ro3Emu.Loc: that folder is part of the stamp ofprebuilt/client(tools/release/client-stamp.ps1), and these texts are not in those DLLs, so adding them there would force a DLL refresh for nothing.Checked:
dotnet test tests/Ro3Emu.Setup.Tests: 157 passed, 9 skipped. New tests cover the zh_TW pairing, the stored language, the--langvalues and the shape of the embedded translations.dotnet format whitespace,tools/AnalyzerBaseline(CA1861 baseline 100 -> 99, the count went down), the server build, and theprebuilt/clientstamp (this PR touches nothing the stamp covers).RO3Emu.exe export <game> <data> --lang zh-TWon a real release 140083 client: 27,276 texts in 36 s.Known limits:
Ro3Locin the client DLL, which only accepts a result without Chinese in it. In zh-TW mode those stay as the client draws them. Fixing that is a small change insrc/Ro3Emu.Loc/Ro3Loc.cs, but it needs the prebuilt DLLs rebuilt, and my build of the current sources does not reproduce the committed DLL bytes, so I left it out. I can send it as a follow-up, withprebuilt/clientrebuilt on your side.