Skip to content

Editorial: Remove the mention of the "the first substring" #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 22, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion spec/locale-sensitive-functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h1>String.prototype.toLocaleLowerCase ( [ _locales_ ] )</h1>
1. Let _requestedLocale_ be _requestedLocales_[0].
1. Else,
1. Let _requestedLocale_ be DefaultLocale().
1. Let _noExtensionsLocale_ be the String value that is _requestedLocale_ with all Unicode locale extension sequences (<emu-xref href="#sec-unicode-locale-extension-sequences"></emu-xref>) removed.
1. Let _noExtensionsLocale_ be the String value that is _requestedLocale_ with any Unicode locale extension sequences (<emu-xref href="#sec-unicode-locale-extension-sequences"></emu-xref>) removed.
1. Let _availableLocales_ be a List with language tags that includes the languages for which the Unicode Character Database contains language sensitive case mappings. Implementations may add additional language tags if they support case mapping for additional locales.
1. Let _locale_ be BestAvailableLocale(_availableLocales_, _noExtensionsLocale_).
1. If _locale_ is *undefined*, let _locale_ be *"und"*.
Expand Down
4 changes: 2 additions & 2 deletions spec/locale.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1>ApplyUnicodeExtensionToTag ( _tag_, _options_, _relevantExtensionKeys_ )</h1
1. Assert: Type(_tag_) is String.
1. Assert: _tag_ matches the `unicode_locale_id` production.
1. If _tag_ contains a substring that is a Unicode locale extension sequence, then
1. Let _extension_ be the String value consisting of the first substring of _tag_ that is a Unicode locale extension sequence.
1. Let _extension_ be the String value consisting of the substring of the Unicode locale extension sequence within _tag_.
1. Let _components_ be ! UnicodeExtensionComponents(_extension_).
1. Let _attributes_ be _components_.[[Attributes]].
1. Let _keywords_ be _components_.[[Keywords]].
Expand All @@ -82,7 +82,7 @@ <h1>ApplyUnicodeExtensionToTag ( _tag_, _options_, _relevantExtensionKeys_ )</h1
1. Else,
1. Append the Record { [[Key]]: _key_, [[Value]]: _value_ } to _keywords_.
1. Set _result_.[[<_key_>]] to _value_.
1. Let _locale_ be the String value that is _tag_ with all Unicode locale extension sequences removed.
1. Let _locale_ be the String value that is _tag_ with any Unicode locale extension sequences removed.
1. Let _newExtension_ be a Unicode BCP 47 U Extension based on _attributes_ and _keywords_.
1. If _newExtension_ is not the empty String, then
1. Let _locale_ be ! InsertUnicodeExtensionAndCanonicalize(_locale_, _newExtension_).
Expand Down
10 changes: 5 additions & 5 deletions spec/negotiation.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ <h1>LookupMatcher ( _availableLocales_, _requestedLocales_ )</h1>
<emu-alg>
1. Let _result_ be a new Record.
1. For each element _locale_ of _requestedLocales_, do
1. Let _noExtensionsLocale_ be the String value that is _locale_ with all Unicode locale extension sequences removed.
1. Let _noExtensionsLocale_ be the String value that is _locale_ with any Unicode locale extension sequences removed.
1. Let _availableLocale_ be BestAvailableLocale(_availableLocales_, _noExtensionsLocale_).
1. If _availableLocale_ is not *undefined*, then
1. Set _result_.[[locale]] to _availableLocale_.
1. If _locale_ and _noExtensionsLocale_ are not the same String value, then
1. Let _extension_ be the String value consisting of the first substring of _locale_ that is a Unicode locale extension sequence.
1. Let _extension_ be the String value consisting of the substring of the Unicode locale extension sequence within _locale_.
1. Set _result_.[[extension]] to _extension_.
1. Return _result_.
1. Let _defLocale_ be DefaultLocale().
Expand All @@ -116,15 +116,15 @@ <h1>LookupMatcher ( _availableLocales_, _requestedLocales_ )</h1>
</emu-alg>

<emu-note>
The algorithm is based on the Lookup algorithm described in RFC 4647 section 3.4, but options specified through Unicode locale extension sequences are ignored in the lookup. Information about such subsequences is returned separately. The abstract operation returns a record with a [[locale]] field, whose value is the language tag of the selected locale, which must be an element of _availableLocales_. If the language tag of the request locale that led to the selected locale contained a Unicode locale extension sequence, then the returned record also contains an [[extension]] field whose value is the first Unicode locale extension sequence within the request locale language tag.
The algorithm is based on the Lookup algorithm described in RFC 4647 section 3.4, but options specified through Unicode locale extension sequences are ignored in the lookup. Information about such subsequences is returned separately. The abstract operation returns a record with a [[locale]] field, whose value is the language tag of the selected locale, which must be an element of _availableLocales_. If the language tag of the request locale that led to the selected locale contained a Unicode locale extension sequence, then the returned record also contains an [[extension]] field whose value is the substring of the Unicode locale extension sequence within the request locale language tag.
</emu-note>
</emu-clause>

<emu-clause id="sec-bestfitmatcher" aoid="BestFitMatcher">
<h1>BestFitMatcher ( _availableLocales_, _requestedLocales_ )</h1>

<p>
The BestFitMatcher abstract operation compares _requestedLocales_, which must be a List as returned by CanonicalizeLocaleList, against the locales in _availableLocales_ and determines the best available language to meet the request. The algorithm is implementation dependent, but should produce results that a typical user of the requested locales would perceive as at least as good as those produced by the LookupMatcher abstract operation. Options specified through Unicode locale extension sequences must be ignored by the algorithm. Information about such subsequences is returned separately. The abstract operation returns a record with a [[locale]] field, whose value is the language tag of the selected locale, which must be an element of _availableLocales_. If the language tag of the request locale that led to the selected locale contained a Unicode locale extension sequence, then the returned record also contains an [[extension]] field whose value is the first Unicode locale extension sequence within the request locale language tag.
The BestFitMatcher abstract operation compares _requestedLocales_, which must be a List as returned by CanonicalizeLocaleList, against the locales in _availableLocales_ and determines the best available language to meet the request. The algorithm is implementation dependent, but should produce results that a typical user of the requested locales would perceive as at least as good as those produced by the LookupMatcher abstract operation. Options specified through Unicode locale extension sequences must be ignored by the algorithm. Information about such subsequences is returned separately. The abstract operation returns a record with a [[locale]] field, whose value is the language tag of the selected locale, which must be an element of _availableLocales_. If the language tag of the request locale that led to the selected locale contained a Unicode locale extension sequence, then the returned record also contains an [[extension]] field whose value is the substring of the Unicode locale extension sequence within the request locale language tag.
</p>
</emu-clause>

Expand Down Expand Up @@ -266,7 +266,7 @@ <h1>LookupSupportedLocales ( _availableLocales_, _requestedLocales_ )</h1>
<emu-alg>
1. Let _subset_ be a new empty List.
1. For each element _locale_ of _requestedLocales_, do
1. Let _noExtensionsLocale_ be the String value that is _locale_ with all Unicode locale extension sequences removed.
1. Let _noExtensionsLocale_ be the String value that is _locale_ with any Unicode locale extension sequences removed.
1. Let _availableLocale_ be BestAvailableLocale(_availableLocales_, _noExtensionsLocale_).
1. If _availableLocale_ is not *undefined*, append _locale_ to the end of _subset_.
1. Return _subset_.
Expand Down