MarshallOfSound

#53184: fix: resolve region-qualified --lang values against shipped locales on macOS

Merged
Created: Aug 25, 2026, 3:27:50 PM
Merged: Aug 25, 2026, 5:05:45 PM
4 comments
Target: main
  • On macOS a region-qualified --lang such as de-DE (also fr-FR, it-IT, es-ES, ja-JP, ko-KR, …) was handed to ResourceBundle verbatim, which looked for de_DE.lproj, found nothing (the pak ships as de.lproj), and silently loaded no locale pak: every localized string in the browser process came back empty (locale resources are not loaded) and app.getLocale() reported en-US. l10n_util::GetApplicationLocale() skips resolution on macOS because Chrome relies on Cocoa having matched the locale already; Electron's --lang bypasses that.
  • Resolve the value with l10n_util::CheckAndResolveLocale() the way Windows/Linux already do, and fall back to Cocoa's locale when it can't be resolved (asdfkl now behaves like "no --lang" instead of "no strings at all").
  • Adds a --lang=de-DEde case to the existing --lang switch specs.
  • Most visible symptom was a hard crash on WebAuthn with Touch ID: the empty IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON reached -[LAContext evaluateAccessControl:…], which raises NSInvalidArgumentException. #53185 guards that path independently.

Notes: Fixed region-qualified --lang values such as de-DE loading no locale resources on macOS, which left localized strings empty and could crash WebAuthn Touch ID prompts.

Backports

42-x-y
Merged
PR Number
#53187
Merged At
Aug 25, 2026, 6:17:17 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#53186
Merged At
Aug 25, 2026, 6:25:09 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53188
Merged At
Aug 25, 2026, 6:18:30 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron