Commit graph

10 commits

Author SHA1 Message Date
Timothy Flynn
27fc3cfe75 LibJS: Handle existing Intl.Locale objects in CanonicalizeLocaleList 2021-09-02 17:56:42 +01:00
Timothy Flynn
17639a42ae LibJS: Implement the Intl.Locale constructor 2021-09-02 17:56:42 +01:00
Timothy Flynn
940c023e09 LibJS: Compare Unicode locale variants using case-insensitive matching
In the IsStructurallyValidLanguageTag AO, we of course cannot assume the
variants are canonicalized to lower-case yet, because canonicalization
hasn't happened yet.
2021-09-02 17:56:42 +01:00
Timothy Flynn
fdedb3ab33 LibJS: Remove duplicated error message from ErrorTypes.h
ErrorType::IntlInvalidCode has almost exactly the same message as
ErrorType::OptionIsNotValidValue. Remove it, as all uses of the former
are semantically interchangeable with the latter.
2021-09-02 17:56:42 +01:00
Timothy Flynn
d13142f015 LibJS+LibUnicode: Store parsed Unicode locale data as full strings
Originally, it was convenient to store the parsed Unicode locale data as
views into the original string being parsed. But to implement locale
aliases will require mutating the data that was parsed. To prepare for
that, store the parsed data as proper strings.
2021-09-01 14:14:47 +01:00
Timothy Flynn
6f5fb87d3b LibJS: Handle Unicode locale extensions in LookupMatcher AO 2021-09-01 14:14:47 +01:00
Timothy Flynn
a2f0eeff7a LibJS: Canonicalize Unicode locale extension attributes and keywords 2021-08-30 19:42:40 +01:00
Timothy Flynn
94e66f500c LibJS: Reject structurally invalid Unicode locale extensions 2021-08-30 19:42:40 +01:00
Timothy Flynn
17bb652775 LibJS: Implement Intl.DisplayNames.prototype.of
Note that only option type=region is really implemented. Other types
will resort to the fallback option. This prototype method will be able
to implement other type options once LibUnicode supports more.
2021-08-26 22:04:09 +01:00
Timothy Flynn
e8dd2eea74 LibJS: Implement the Intl.DisplayNames constructor
There is notably FIXME notations in this commit regarding Unicode locale
extensions. We are not parsing extensions (or private use extensions) at
all yet.
2021-08-26 22:04:09 +01:00