Let the screenshot walk run the GUI in another language - #148
Merged
Conversation
English.txt is the one catalog with no high bytes, and hts_isStringAscii() short-circuits pure ASCII, so an English walk never reaches the conversion LANG_LOAD does. Every shot it takes is ASCII by construction. --language takes the lang/ basename the combo lists, which for several languages is not the translated name, so Francais rather than French. A missing name now lists what was on offer instead of failing on the select. The two pages the walk revisits to set the mirror up were keyed by their tab caption, which every translation changes. They are keyed by a control each one owns instead: IDC_maxrate and IDC_connexion each appear in exactly one dialog, and find() matches only the visible page. Signed-off-by: Xavier Roche <xroche@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
The French walk shows the tab captions in English: they come from CAPTION in the .rc, not the catalog, so they do not translate and the old lookup would have worked. Keying on a control each page owns is still right, because a display string is not a key, but the comment claimed a breakage that does not exist. Signed-off-by: Xavier Roche <xroche@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
resource.h gives IDC_pausebytes the same 1051 as IDC_connexion, and find() matches on the number, so the discovery loop wrote the flow-control entry twice and the later page won. It happened to be the right one only because MainTab.cpp adds Limits before Flow Control; swapping those two lines would have put the connection count into the pause-bytes box with nothing raised. Both wanted controls are combo boxes and pausebytes is an edit box, so the class settles it, as it already does for the low button ids. A second page claiming the same control now raises instead of overwriting. screenshots.md gains --language, and loses the claim that the walk falls back to master's binaries: #132 made it stop instead. Signed-off-by: Xavier Roche <xroche@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
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.
English.txtis the one catalog with no high bytes.hts_isStringAscii()short-circuits pure ASCII, so an English walk never reachesLANG_LOAD's conversion, and every shot it took was ASCII by construction.--languagetakes the lang/ basename as the first-run combo lists it, which for several languages is not the translated name, soFrancaisrather thanFrench; a missing name lists what was on offer instead of failing inside the select.screenshots.ymlgains a matching dispatch input, and the push path is unchanged.Run 32764529991 walked it in French against the binaries of 93343d8. The shots show translated dialog bodies with accents intact: the ISO-8859-1 catalog reaches the cp1252 display correctly. That is the "before" half of what engine #1407 will change.
The tab captions stay English in every language: they come from
CAPTIONin the.rc, not the catalog. The old caption-keyed lookup would not have broken, and shot filenames stay comparable across languages. The same.rcorigin leaves the tab labels and the OK/Cancel/Help buttons untranslated in a French UI, which is a real gap but not this PR's.Keying on a control each page owns needed a second look.
resource.hgivesIDC_pausebytesthe same 1051 asIDC_connexionandfind()matches on the number, so the lookup landed on the right page only becauseMainTab.cppadds Limits before Flow Control. Matching the class settles it, since both wanted controls are combo boxes, and a second page claiming one now raises.Dispatching from a branch without its own
windows-buildis blocked by design (#132), so a run needsrun-idnaming the build to use.screenshots.mdsaid the walk fell back to master's binaries; it no longer does, and that is corrected here.