Skip to content

Commit

Permalink
Editorial: Document that DefaultLocale() returns must not include a "…
Browse files Browse the repository at this point in the history
…-u-" extension

This is already required:
* LookupMatcher can return { [[locale]]: DefaultLocale(), ... }.
* ResolveLocale uses that result's [[locale]] as the name of a field in
  its _localeData_ argument and asserts that the corresponding value is
  a Record.
* The _localeData_ argument to ResolveLocale is generally provided from
  the value of a service constructor's [[LocaleData]] slot.
* "Internal slots of Service Constructors" constrains those slots to be
  Records "that have fields for each locale contained in
  [[AvailableLocales]]", and constrains their [[AvailableLocales]] slots
  to include only language tags that "must not have a Unicode locale
  extension sequence".

Therefore, if DefaultLocale() *were* to return a value with a Unicode
locale extension sequence, use of it in ResolveLocale would fail to find
the required Record at a field with that name in e.g. the service
constructor's [[LocaleData]].
  • Loading branch information
gibson042 authored and ryzokuken committed Feb 29, 2024
1 parent 52cbba8 commit ae21121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/locales-currencies-tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>
</h1>
<dl class="header">
<dt>description</dt>
<dd>The returned String value represents the structurally valid (<emu-xref href="#sec-isstructurallyvalidlanguagetag"></emu-xref>) and canonicalized (<emu-xref href="#sec-canonicalizeunicodelocaleid"></emu-xref>) language tag for the host environment's current locale.</dd>
<dd>The returned String value represents the structurally valid (<emu-xref href="#sec-isstructurallyvalidlanguagetag"></emu-xref>) and canonicalized (<emu-xref href="#sec-canonicalizeunicodelocaleid"></emu-xref>) language tag for the host environment's current locale. It must not contain a Unicode locale extension sequence.</dd>
</dl>
</emu-clause>
</emu-clause>
Expand Down

0 comments on commit ae21121

Please sign in to comment.