mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibLocale+LibJS: Port locale parsing and processing to String
In order to prevent this commit from having to refactor almost all of Intl, the goal here is to update the internal parsing/canonicalization of locales within LibLocale only. Call sites which are already equiped to handle String and OOM errors do so, however.
This commit is contained in:
parent
618714e29a
commit
ca62aeb6bd
11 changed files with 371 additions and 299 deletions
|
@ -109,7 +109,7 @@ static auto find_regional_values_for_locale(StringView locale, GetRegionalValues
|
|||
|
||||
auto return_default_values = [&]() { return get_regional_values("001"sv); };
|
||||
|
||||
auto language = parse_unicode_language_id(locale);
|
||||
auto language = parse_unicode_language_id(locale).release_value_but_fixme_should_propagate_errors();
|
||||
if (!language.has_value())
|
||||
return return_default_values();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue