#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
--langsuch asde-DE(alsofr-FR,it-IT,es-ES,ja-JP,ko-KR, …) was handed toResourceBundleverbatim, which looked forde_DE.lproj, found nothing (the pak ships asde.lproj), and silently loaded no locale pak: every localized string in the browser process came back empty (locale resources are not loaded) andapp.getLocale()reporteden-US.l10n_util::GetApplicationLocale()skips resolution on macOS because Chrome relies on Cocoa having matched the locale already; Electron's--langbypasses 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 (asdfklnow behaves like "no--lang" instead of "no strings at all"). - Adds a
--lang=de-DE→decase to the existing--lang switchspecs. - Most visible symptom was a hard crash on WebAuthn with Touch ID: the empty
IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASONreached-[LAContext evaluateAccessControl:…], which raisesNSInvalidArgumentException. #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
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