Bug 2085210 - Simplify `String.toLocale()` and handle complex BCP-47 language tags #411 (firefox-autoland@autoland)

Warnings
  • Checking...
Blockers
  • Checking...
Branches 2085210 -> autoland
Repo firefox-autoland@autoland (git) (git://github.com/mcarare/firefox.git)
Author mcarare
State closed
Commit Title

Bug 2085210 - Simplify `String.toLocale()` and handle complex BCP-47 language tags

Commit Body

Replaces custom string-splitting in `String.toLocale()` by normalizing underscores to hyphens and delegating to `Locale.forLanguageTag()`. This ensures language tags containing scripts, variants, or Unicode extensions are properly parsed, and returns `Locale.ROOT` for blank input strings.

Landings

Successfully landed

Landing requested on , by mcarare@mozilla.com.

Landing Job: 109793

Last update:

Result: f1d204e48904092d4a9fd76092e7cd609ba92479 on firefox-autoland@autoland (git)

Links: Treeherder