The problem
_detectDefault() in static/js/i18n.js maps the browser's locale to a shipped table. It has a branch for pl, ja, zh, de, pt-PT, pt and id, and no branch for fr.
So a browser reporting fr-FR falls through to return "en". French has a complete 443-key table, it appears in the language picker, and a French speaker still opens StemDeck in English unless they go into Settings and choose it by hand.
Why it went unnoticed
This fails in the quietest way available. Nothing throws, no console warning appears, the picker looks correct, and every translated string is right once the language is selected. The only symptom is that it is never selected on its own, which nobody sees unless their own browser is set to French.
Nothing tested it either. LANGUAGES, TRANSLATIONS and _detectDefault are three separate lists that have to agree, and only the first two are checked by the key-parity script in .claude/rules/i18n.md.
It was found by reading the function while adding Spanish, which would have shipped with exactly the same gap.
Who it affects
Every French-speaking user since the table landed. They get an English UI on first launch and have to discover the setting to fix it, which is the group least likely to be reading English menus to find it.
Constraints for a fix
- The branch itself is one line. The gap is the absence of anything that would have caught it, so a fix that only adds the line leaves the next language exposed.
- Order matters where prefixes overlap:
pt-PT has to be tested before pt, or European Portuguese is swallowed by the Brazilian table.
- Case is not guaranteed by the browser, so matching has to be case-insensitive.
- An unrecognised locale must keep falling back to English rather than throwing.
The problem
_detectDefault()instatic/js/i18n.jsmaps the browser's locale to a shipped table. It has a branch forpl,ja,zh,de,pt-PT,ptandid, and no branch forfr.So a browser reporting
fr-FRfalls through toreturn "en". French has a complete 443-key table, it appears in the language picker, and a French speaker still opens StemDeck in English unless they go into Settings and choose it by hand.Why it went unnoticed
This fails in the quietest way available. Nothing throws, no console warning appears, the picker looks correct, and every translated string is right once the language is selected. The only symptom is that it is never selected on its own, which nobody sees unless their own browser is set to French.
Nothing tested it either.
LANGUAGES,TRANSLATIONSand_detectDefaultare three separate lists that have to agree, and only the first two are checked by the key-parity script in.claude/rules/i18n.md.It was found by reading the function while adding Spanish, which would have shipped with exactly the same gap.
Who it affects
Every French-speaking user since the table landed. They get an English UI on first launch and have to discover the setting to fix it, which is the group least likely to be reading English menus to find it.
Constraints for a fix
pt-PThas to be tested beforept, or European Portuguese is swallowed by the Brazilian table.