Skip to content

Let the screenshot walk run the GUI in another language - #148

Merged
xroche merged 3 commits into
masterfrom
walk-language
Aug 24, 2026
Merged

Let the screenshot walk run the GUI in another language#148
xroche merged 3 commits into
masterfrom
walk-language

Conversation

@xroche

@xroche xroche commented Aug 24, 2026

Copy link
Copy Markdown
Owner

English.txt is the one catalog with no high bytes. hts_isStringAscii() short-circuits pure ASCII, so an English walk never reaches LANG_LOAD's conversion, and every shot it took was ASCII by construction. --language takes the lang/ basename as the first-run combo lists it, which for several languages is not the translated name, so Francais rather than French; a missing name lists what was on offer instead of failing inside the select. screenshots.yml gains 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 CAPTION in the .rc, not the catalog. The old caption-keyed lookup would not have broken, and shot filenames stay comparable across languages. The same .rc origin 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.h gives IDC_pausebytes the same 1051 as IDC_connexion and find() matches on the number, so the lookup landed on the right page only because MainTab.cpp adds 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-build is blocked by design (#132), so a run needs run-id naming the build to use. screenshots.md said the walk fell back to master's binaries; it no longer does, and that is corrected here.

xroche and others added 3 commits August 24, 2026 20:42
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>
@xroche
xroche marked this pull request as ready for review August 24, 2026 19:25
@xroche
xroche merged commit 21d48a5 into master Aug 24, 2026
8 checks passed
@xroche
xroche deleted the walk-language branch August 24, 2026 19:25
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.

1 participant