Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions spec/locale.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ <h1>Intl.Locale ( _tag_ [ , _options_ ] )</h1>
1. Let _tag_ be ? ToString(_tag_).
1. Set _options_ to ? CoerceOptionsToObject(_options_).
1. If IsStructurallyValidLanguageTag(_tag_) is *false*, throw a *RangeError* exception.
1. Set _tag_ to CanonicalizeUnicodeLocaleId(_tag_).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing canonicalisation is still a normative change: #804 (review)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right, that's twice now... this is clearly too subtle, so I've added an explanatory note.

1. Set _tag_ to ? UpdateLanguageId(_tag_, _options_).
1. Let _opt_ be a new Record.
1. Let _calendar_ be ? GetOption(_options_, *"calendar"*, ~string~, ~empty~, *undefined*).
Expand Down Expand Up @@ -69,13 +68,13 @@ <h1>Intl.Locale ( _tag_ [ , _options_ ] )</h1>
<emu-clause id="sec-updatelanguageid" type="abstract operation" oldids="sec-apply-options-to-tag">
<h1>
UpdateLanguageId (
_tag_: a Unicode canonicalized locale identifier,
_tag_: a structurally valid language tag,
_options_: an Object,
): either a normal completion containing a language tag or a throw completion
): either a normal completion containing a structurally valid language tag or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It updates the <code>unicode_language_id</code> subtags in _tag_ from the corresponding properties of _options_ and returns the <emu-xref href="#sec-isstructurallyvalidlanguagetag">structurally valid</emu-xref> but non-canonicalized result.</dd>
<dd>It updates the <code>unicode_language_id</code> subtags in _tag_ from the corresponding properties of _options_, validates them, and returns the result.</dd>
</dl>
<emu-alg>
1. Let _baseName_ be GetLocaleBaseName(_tag_).
Expand Down
4 changes: 2 additions & 2 deletions spec/locales-currencies-tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1>Language Tags</h1>
<a href="https://unicode.org/reports/tr35/#u_Extension">Unicode Technical Standard #35 Part 1 Core, Section 3.6 Unicode BCP 47 U Extension</a> subtag sequences are used extensively, and the term "<dfn id="unicode-locale-extension-sequence" oldids="sec-unicode-locale-extension-sequences" variants="Unicode locale extension sequences">Unicode locale extension sequence</dfn>" describes the longest <emu-not-ref>substring</emu-not-ref> of a language tag that can be matched by the <code>unicode_locale_extensions</code> Unicode locale nonterminal and is not part of a *"-x-…"* private use <emu-not-ref>subtag sequence</emu-not-ref>. It starts with *"-u-"* and includes all immediately following <emu-not-ref>subtags</emu-not-ref> that are not singleton subtags, along with their preceding *"-"* separators. For example, the <emu-not-ref>Unicode locale extension sequence</emu-not-ref> of *"en-US-u-fw-mon-x-u-ex-foobar"* is *"-u-fw-mon"*.
</p>

<p>All <emu-xref href="#sec-isstructurallyvalidlanguagetag">structurally valid language tags</emu-xref> are appropriate for use with the APIs defined by this specification, but implementations are not required to use Unicode Common Locale Data Repository (<a href="https://cldr.unicode.org">CLDR</a>) data for validating them; the set of locales and thus language tags that an implementation supports with adequate localizations is implementation-defined. <emu-xref href="#sec-constructor-properties-of-the-intl-object">Intl constructors</emu-xref> map requested language tags to locales supported by their respective implementations.</p>
<p>All structurally valid language tags are appropriate for use with the APIs defined by this specification, but implementations are not required to use Unicode Common Locale Data Repository (<a href="https://cldr.unicode.org">CLDR</a>) data for validating them; the set of locales and thus language tags that an implementation supports with adequate localizations is implementation-defined. <emu-xref href="#sec-constructor-properties-of-the-intl-object">Intl constructors</emu-xref> map requested language tags to locales supported by their respective implementations.</p>

<emu-clause id="sec-isstructurallyvalidlanguagetag" type="abstract operation">
<h1>
Expand All @@ -39,7 +39,7 @@ <h1>
</h1>
<dl class="header">
<dt>description</dt>
<dd>It determines whether _locale_ is a syntactically well-formed language tag. It does not consider whether _locale_ conveys any meaningful semantics, nor does it differentiate between aliased subtags and their preferred replacement subtags or require canonical casing or subtag ordering.</dd>
<dd>It determines whether _locale_ is a <dfn variants="structurally valid language tags">structurally valid language tag</dfn> conforming with the well-formedness constraints of a <a href="https://unicode.org/reports/tr35/#unicode_bcp47_locale_id"><code>unicode_bcp47_locale_id</code></a>. It does not consider whether _locale_ conveys any meaningful semantics, nor does it differentiate between aliased subtags and their preferred replacement subtags or require canonical casing or subtag ordering.</dd>
</dl>
<emu-alg>
1. Let _lowerLocale_ be the ASCII-lowercase of _locale_.
Expand Down