Fix #191: switching back to English restores every page #192
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/isaac-btw--AmericasLauncher!192
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-192"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@laalaalaee on GitHub · 2026-12-04 12:12 UTC · original
laalaalaee:fix/language-switch-back→main· +6 −2 · 1 files · 1 commits · merged 2026-12-04 18:08 UTCFixes #191.
Problem
After switching the language to e.g. Polish and back to English, only the sidebar returns to English; every page after it (Darner, FoxHound, Save, Mods, Settings, ...) keeps the previous language, and the sidebar's "Questions & Requests?" link can keep a language from an earlier switch.
Cause
Localizer.WalkenumeratedLogicalTreeHelper.GetChildren()while translating the children. Setting aRun's text (the sidebar's "Questions & Requests? / Click here" link) changes the inline collection being enumerated, so the walk threwInvalidOperationException: Collection was modified(fromRangeContentEnumerator.MoveNext) and thecatchinApplyended it there. While a translation is on, the 300 ms timer repeats the walk and each pass gets a little further, which hid it; switching back to English runs one pass and stops the timer.Change
Only
Services/Localizer.cs(+6/−2):Handleis wrapped per control, so one control that fails to translate no longer ends the walk for the rest of the window (Applykeeps its outer catch).Testing
dotnet build -c Releasepasses (0 errors, no new warnings).Collection was modifiedon every pass; after Polish -> English about 250 texts stayed in Polish.@copilot-pull-request-reviewer[bot] on GitHub · 2026-12-04 12:12 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@C1berCanarri on GitHub · 2026-12-04 16:19 UTC · original · approved these changes