Switching the language back to English leaves most pages in the previous language #191

Closed
opened 2026-12-04 12:09:03 +00:00 by github-bot · 0 comments
Owner

@⁠laalaalaee on GitHub · 2026-12-04 12:07 UTC · original

Version: v2.2.2

Steps

  1. Open any page, e.g. Launch > FoxHound.
  2. Pick Polski in the language box at the bottom of the sidebar: the whole window is translated.
  3. Pick English again.

What happens

Only the sidebar goes back to English. The page content (FoxHound, Darner, Save, Mods, Settings, ...) stays in Polish. The sidebar's "Questions & Requests? / Click here" link can also keep a language picked earlier (here it showed the Portuguese "Perguntas e sugestões?" after switching from Polish to English).

Expected

Everything goes back to English.

Cause

Localizer.Walk enumerates LogicalTreeHelper.GetChildren() while it translates the children. Setting a Run's text (the sidebar's "Questions & Requests?" link) changes the inline collection being enumerated, so the walk throws InvalidOperationException: Collection was modified there and the catch in Apply ends it. While a translation is on, the 300 ms timer repeats the walk and hides this; switching back to English runs a single pass and stops the timer, so everything after the sidebar link is never restored.

I have a fix ready and will open a PR for it.

**@⁠laalaalaee** on GitHub · 2026-12-04 12:07 UTC · [original](https://github.com/isaac-btw/AmericasLauncher/issues/191) **Version:** v2.2.2 ### Steps 1. Open any page, e.g. **Launch > FoxHound**. 2. Pick **Polski** in the language box at the bottom of the sidebar: the whole window is translated. 3. Pick **English** again. ### What happens Only the sidebar goes back to English. The page content (FoxHound, Darner, Save, Mods, Settings, ...) stays in Polish. The sidebar's "Questions & Requests? / Click here" link can also keep a language picked earlier (here it showed the Portuguese "Perguntas e sugestões?" after switching from Polish to English). ### Expected Everything goes back to English. ### Cause `Localizer.Walk` enumerates `LogicalTreeHelper.GetChildren()` while it translates the children. Setting a `Run`'s text (the sidebar's "Questions & Requests?" link) changes the inline collection being enumerated, so the walk throws `InvalidOperationException: Collection was modified` there and the `catch` in `Apply` ends it. While a translation is on, the 300 ms timer repeats the walk and hides this; switching back to English runs a single pass and stops the timer, so everything after the sidebar link is never restored. I have a fix ready and will open a PR for it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 12:09:04 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/isaac-btw--AmericasLauncher#191
No description provided.