Skip to content

Commit

Permalink
Editorial: Improve consistency of referencing Unicode documents (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 authored Dec 21, 2022
1 parent e82085d commit 59053e6
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 29 deletions.
8 changes: 4 additions & 4 deletions spec/collator.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h1>Internal slots</h1>
</p>

<emu-note>
Unicode Technical Standard 35 describes ten locale extension keys that are relevant to collation: *"co"* for collator usage and specializations, *"ka"* for alternate handling, *"kb"* for backward second level weight, *"kc"* for case level, *"kf"* for case first, *"kh"* for hiragana quaternary, *"kk"* for normalization, *"kn"* for numeric, *"kr"* for reordering, *"ks"* for collation strength, and *"vt"* for variable top. Collator, however, requires that the usage is specified through the *"usage"* property of the options object, alternate handling through the *"ignorePunctuation"* property of the options object, and case level and the strength through the *"sensitivity"* property of the options object. The *"co"* key in the language tag is supported only for collator specializations, and the keys *"kb"*, *"kh"*, *"kk"*, *"kr"*, and *"vt"* are not allowed in this version of the Internationalization API. Support for the remaining keys is implementation dependent.
<a href="https://unicode.org/reports/tr35/#Key_And_Type_Definitions_">Unicode Technical Standard #35 Part 1 Core, Section 3.6.1 Key and Type Definitions</a> describes ten locale extension keys that are relevant to collation: *"co"* for collator usage and specializations, *"ka"* for alternate handling, *"kb"* for backward second level weight, *"kc"* for case level, *"kf"* for case first, *"kh"* for hiragana quaternary, *"kk"* for normalization, *"kn"* for numeric, *"kr"* for reordering, *"ks"* for collation strength, and *"vt"* for variable top. Collator, however, requires that the usage is specified through the *"usage"* property of the options object, alternate handling through the *"ignorePunctuation"* property of the options object, and case level and the strength through the *"sensitivity"* property of the options object. The *"co"* key in the language tag is supported only for collator specializations, and the keys *"kb"*, *"kh"*, *"kk"*, *"kr"*, and *"vt"* are not allowed in this version of the Internationalization API. Support for the remaining keys is implementation dependent.
</emu-note>

<p>
Expand Down Expand Up @@ -266,15 +266,15 @@ <h1>CompareStrings ( _collator_, _x_, _y_ )</h1>
</p>

<p>
For the interpretation of options settable through locale extension keys, see <a href="https://unicode.org/reports/tr35/#Key_And_Type_Definitions_">Unicode Technical Standard #35 LDML § 3.6.1 U Extension Key And Type Definitions</a>.
For the interpretation of options settable through locale extension keys, see <a href="https://unicode.org/reports/tr35/#Key_And_Type_Definitions_">Unicode Technical Standard #35 Part 1 Core, Section 3.6.1 Key and Type Definitions</a>.
</p>

<p>
The actual return values are implementation-defined to permit encoding additional information in them, but this operation for any given _collator_, when considered as a function of _x_ and _y_, is required to be a consistent comparator defining a total ordering on the set of all Strings. This operation is also required to recognize and honour canonical equivalence according to the Unicode Standard, including returning *+0*<sub>𝔽</sub> when comparing distinguishable Strings that are canonically equivalent.
</p>

<emu-note>
It is recommended that the CompareStrings abstract operation be implemented following Unicode Technical Standard 10, Unicode Collation Algorithm (available at <a href="https://unicode.org/reports/tr10/">https://unicode.org/reports/tr10/</a>), using tailorings for the effective locale and collation options of _collator_. It is recommended that implementations use the tailorings provided by the Common Locale Data Repository (available at <a href="https://cldr.unicode.org/">https://cldr.unicode.org/</a>).
It is recommended that the CompareStrings abstract operation be implemented following <a href="https://unicode.org/reports/tr10/">Unicode Technical Standard #10: Unicode Collation Algorithm</a>, using tailorings for the effective locale and collation options of _collator_. It is recommended that implementations use the tailorings provided by the Common Locale Data Repository (available at <a href="https://cldr.unicode.org/">https://cldr.unicode.org/</a>).
</emu-note>

<emu-note>
Expand Down Expand Up @@ -376,7 +376,7 @@ <h1>Properties of Intl.Collator Instances</h1>
<li>[[Usage]] is one of the String values *"sort"* or *"search"*, identifying the collator usage.</li>
<li>[[Sensitivity]] is one of the String values *"base"*, *"accent"*, *"case"*, or *"variant"*, identifying the collator's sensitivity.</li>
<li>[[IgnorePunctuation]] is a Boolean value, specifying whether punctuation should be ignored in comparisons.</li>
<li>[[Collation]] is a String value with the *"type"* given in Unicode Technical Standard 35 for the collation, except that the values *"standard"* and *"search"* are not allowed, while the value *"default"* is allowed.</li>
<li>[[Collation]] is a String value with the *"type"* given in Unicode Technical Standard #35 for the collation, except that the values *"standard"* and *"search"* are not allowed, while the value *"default"* is allowed.</li>
</ul>

<p>
Expand Down
6 changes: 3 additions & 3 deletions spec/datetimeformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h1>Internal slots</h1>
</p>

<emu-note>
Unicode Technical Standard 35 describes four locale extension keys that are relevant to date and time formatting: *"ca"* for calendar, *"hc"* for hour cycle, *"nu"* for numbering system (of formatted numbers), and *"tz"* for time zone. DateTimeFormat, however, requires that the time zone is specified through the *"timeZone"* property in the options objects.
Unicode Technical Standard #35 describes four locale extension keys that are relevant to date and time formatting: *"ca"* for calendar, *"hc"* for hour cycle, *"nu"* for numbering system (of formatted numbers), and *"tz"* for time zone. DateTimeFormat, however, requires that the time zone is specified through the *"timeZone"* property in the options objects.
</emu-note>

<p>
Expand Down Expand Up @@ -655,8 +655,8 @@ <h1>Properties of Intl.DateTimeFormat Instances</h1>

<ul>
<li>[[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.</li>
<li>[[Calendar]] is a String value with the *"type"* given in Unicode Technical Standard 35 for the calendar used for formatting.</li>
<li>[[NumberingSystem]] is a String value with the *"type"* given in Unicode Technical Standard 35 for the numbering system used for formatting.</li>
<li>[[Calendar]] is a String value with the *"type"* given in Unicode Technical Standard #35 for the calendar used for formatting.</li>
<li>[[NumberingSystem]] is a String value with the *"type"* given in Unicode Technical Standard #35 for the numbering system used for formatting.</li>
<li>[[TimeZone]] is a String value with the IANA time zone name of the time zone used for formatting.</li>
<li>[[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[DayPeriod]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]] are each either *undefined*, indicating that the component is not used for formatting, or one of the String values given in <emu-xref href="#table-datetimeformat-components"></emu-xref>, indicating how the component should be presented in the formatted output.</li>
<li>[[FractionalSecondDigits]] is either *undefined* or a positive, non-zero integer Number value indicating the fraction digits to be used for fractional seconds. Numbers will be rounded or padded with trailing zeroes if necessary.</li>
Expand Down
4 changes: 2 additions & 2 deletions spec/locale.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ <h1>Intl.Locale.prototype.maximize ( )</h1>
<emu-alg>
1. Let _loc_ be the *this* value.
1. Perform ? RequireInternalSlot(_loc_, [[InitializedLocale]]).
1. Let _maximal_ be the result of the <a href="https://www.unicode.org/reports/tr35/#Likely_Subtags">Add Likely Subtags</a> algorithm applied to _loc_.[[Locale]]. If an error is signaled, set _maximal_ to _loc_.[[Locale]].
1. Let _maximal_ be the result of the <a href="https://unicode.org/reports/tr35/#Likely_Subtags">Add Likely Subtags</a> algorithm applied to _loc_.[[Locale]]. If an error is signaled, set _maximal_ to _loc_.[[Locale]].
1. Return ! Construct(%Locale%, _maximal_).
</emu-alg>
</emu-clause>
Expand All @@ -224,7 +224,7 @@ <h1>Intl.Locale.prototype.minimize ( )</h1>
<emu-alg>
1. Let _loc_ be the *this* value.
1. Perform ? RequireInternalSlot(_loc_, [[InitializedLocale]]).
1. Let _minimal_ be the result of the <a href="https://www.unicode.org/reports/tr35/#Likely_Subtags">Remove Likely Subtags</a> algorithm applied to _loc_.[[Locale]]. If an error is signaled, set _minimal_ to _loc_.[[Locale]].
1. Let _minimal_ be the result of the <a href="https://unicode.org/reports/tr35/#Likely_Subtags">Remove Likely Subtags</a> algorithm applied to _loc_.[[Locale]]. If an error is signaled, set _minimal_ to _loc_.[[Locale]].
1. Return ! Construct(%Locale%, _minimal_).
</emu-alg>
</emu-clause>
Expand Down
8 changes: 4 additions & 4 deletions spec/locales-currencies-tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,19 @@ <h1>DefaultTimeZone ( ): a String</h1>
<h1>Measurement Unit Identifiers</h1>

<p>
The ECMAScript 2023 Internationalization API Specification identifies measurement units using a <em>core unit identifier</em> (or equivalently <em>core unit ID</em>) as defined by <a href="https://www.unicode.org/reports/tr35/tr35-general.html#Unit_Identifiers">Unicode Technical Standard #35, Part 2, Section 6.2</a>. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
The ECMAScript 2023 Internationalization API Specification identifies measurement units using a <dfn variants="core unit identifiers,core unit ID,core unit IDs">core unit identifier</dfn> (or equivalently <em>core unit ID</em>) as defined by <a href="https://unicode.org/reports/tr35/tr35-general.html#Unit_Identifiers">Unicode Technical Standard #35 Part 2 General, Section 6.2 Unit Identifiers</a>. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
</p>

<p>
Only a limited set of core unit identifiers are sanctioned.
Attempting to use an unsanctioned core unit identifier results in a RangeError.
Attempting to use an unsanctioned core unit identifier results in a *RangeError*.
</p>

<emu-clause id="sec-iswellformedunitidentifier" aoid="IsWellFormedUnitIdentifier">
<h1>IsWellFormedUnitIdentifier ( _unitIdentifier_ )</h1>

<p>
The IsWellFormedUnitIdentifier abstract operation verifies that the _unitIdentifier_ argument (which must be a String value) represents a well-formed UTS #35 core unit identifier that is either a sanctioned single unit or a complex unit formed by division of two sanctioned single units. The following steps are taken:
The IsWellFormedUnitIdentifier abstract operation verifies that the _unitIdentifier_ argument (which must be a String value) represents a well-formed core unit identifier that is either a sanctioned single unit or a complex unit formed by division of two sanctioned single units. The following steps are taken:
</p>

<emu-alg>
Expand All @@ -258,7 +258,7 @@ <h1>IsWellFormedUnitIdentifier ( _unitIdentifier_ )</h1>
<h1>IsSanctionedSingleUnitIdentifier ( _unitIdentifier_ )</h1>

<p>
The IsSanctionedSingleUnitIdentifier abstract operation verifies that the _unitIdentifier_ argument (which must be a String value) is among the single unit identifiers sanctioned in the current version of the ECMAScript Internationalization API Specification, which are a subset of the Common Locale Data Repository <a href="https://github.com/unicode-org/cldr/blob/maint/maint-38/common/validity/unit.xml">release 38 unit validity data</a>; the list may grow over time. As discussed in UTS #35, a single unit identifier is a core unit identifier that is not composed of multiplication or division of other unit identifiers. The following steps are taken:
The IsSanctionedSingleUnitIdentifier abstract operation verifies that the _unitIdentifier_ argument (which must be a String value) is among the single unit identifiers sanctioned in the current version of the ECMAScript Internationalization API Specification, which are a subset of the Common Locale Data Repository <a href="https://github.com/unicode-org/cldr/blob/maint/maint-38/common/validity/unit.xml">release 38 unit validity data</a>; the list may grow over time. As discussed in <a href="https://unicode.org/reports/tr35/tr35-general.html#Unit_Identifiers">Unicode Technical Standard #35 Part 2 General, Section 6.2 Unit Identifiers</a>, a single unit identifier is a core unit identifier that is not composed of multiplication or division of other unit identifiers. The following steps are taken:
</p>

<emu-alg>
Expand Down
6 changes: 3 additions & 3 deletions spec/negotiation.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ <h1>Internal slots of Service Constructors</h1>
</p>

<ul>
<li>[[AvailableLocales]] is a List that contains structurally valid (<emu-xref href="#sec-isstructurallyvalidlanguagetag"></emu-xref>) and canonicalized (<emu-xref href="#sec-canonicalizeunicodelocaleid"></emu-xref>) Unicode BCP 47 locale identifiers identifying the locales for which the implementation provides the functionality of the constructed objects. Language tags on the list must not have a Unicode locale extension sequence. The list must include the value returned by the DefaultLocale abstract operation (<emu-xref href="#sec-defaultlocale"></emu-xref>), and must not include duplicates. Implementations must include in [[AvailableLocales]] locales that can serve as fallbacks in the algorithm used to resolve locales (see <emu-xref href="#sec-resolvelocale"></emu-xref>). For example, implementations that provide a *"de-DE"* locale must include a *"de"* locale that can serve as a fallback for requests such as *"de-AT"* and *"de-CH"*. For locales that include a script subtag in addition to language and region, the corresponding locale without a script subtag must also be supported; that is, if an implementation recognizes *"zh-Hant-TW"*, it is also expected to recognize *"zh-TW"*. The ordering of the locales within [[AvailableLocales]] is irrelevant.</li>
<li>[[RelevantExtensionKeys]] is a List of keys of the language tag extensions defined in Unicode Technical Standard 35 that are relevant for the functionality of the constructed objects.</li>
<li>[[SortLocaleData]] and [[SearchLocaleData]] (for Intl.Collator) and [[LocaleData]] (for every other service constructor) are records that have fields for each locale contained in [[AvailableLocales]]. The value of each of these fields must be a record that has fields for each key contained in [[RelevantExtensionKeys]]. The value of each of these fields must be a non-empty list of those values defined in Unicode Technical Standard 35 for the given key that are supported by the implementation for the given locale, with the first element providing the default value.</li>
<li>[[AvailableLocales]] is a List that contains structurally valid (<emu-xref href="#sec-isstructurallyvalidlanguagetag"></emu-xref>) and canonicalized (<emu-xref href="#sec-canonicalizeunicodelocaleid"></emu-xref>) language tags identifying the locales for which the implementation provides the functionality of the constructed objects. Language tags on the list must not have a Unicode locale extension sequence. The list must include the value returned by the DefaultLocale abstract operation (<emu-xref href="#sec-defaultlocale"></emu-xref>), and must not include duplicates. Implementations must include in [[AvailableLocales]] locales that can serve as fallbacks in the algorithm used to resolve locales (see <emu-xref href="#sec-resolvelocale"></emu-xref>). For example, implementations that provide a *"de-DE"* locale must include a *"de"* locale that can serve as a fallback for requests such as *"de-AT"* and *"de-CH"*. For locales that include a script subtag in addition to language and region, the corresponding locale without a script subtag must also be supported; that is, if an implementation recognizes *"zh-Hant-TW"*, it is also expected to recognize *"zh-TW"*. The ordering of the locales within [[AvailableLocales]] is irrelevant.</li>
<li>[[RelevantExtensionKeys]] is a List of keys of the language tag extensions defined in Unicode Technical Standard #35 that are relevant for the functionality of the constructed objects.</li>
<li>[[SortLocaleData]] and [[SearchLocaleData]] (for Intl.Collator) and [[LocaleData]] (for every other service constructor) are records that have fields for each locale contained in [[AvailableLocales]]. The value of each of these fields must be a record that has fields for each key contained in [[RelevantExtensionKeys]]. The value of each of these fields must be a non-empty list of those values defined in Unicode Technical Standard #35 for the given key that are supported by the implementation for the given locale, with the first element providing the default value.</li>
</ul>

<emu-note>
Expand Down
16 changes: 11 additions & 5 deletions spec/normative-references.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,25 @@ <h1>Normative References</h1>
<a href="https://www.iana.org/time-zones/">IANA Time Zone Database</a>
</li>
<li>
<a href="https://www.unicode.org/versions/latest">The Unicode Standard</a>
<a href="https://unicode.org/versions/latest">The Unicode Standard</a>
</li>
<li>
<a href="https://www.unicode.org/reports/tr29/">Unicode Standard Annex #29: Unicode Text Segmentation</a>
<a href="https://unicode.org/reports/tr29/">Unicode Standard Annex #29: Unicode Text Segmentation</a>
</li>
<li>
Unicode Technical Standard 35
<a href="https://unicode.org/reports/tr10/">Unicode Technical Standard #10: Unicode Collation Algorithm</a>
</li>
<li>
<a href="https://unicode.org/reports/tr35/">Unicode Technical Standard #35: Unicode Locale Data Markup Language (LDML)</a>
<ul>
<li>
<a href="https://unicode.org/reports/tr35/">Unicode Locale Data Markup Language</a>
<a href="https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers">Part 1 Core, Section 3 Unicode Language and Locale Identifiers</a>
</li>
<li>
<a href="https://unicode.org/reports/tr35/tr35-general.html#Unit_Identifiers">Part 2 General, Section 6.2 Unit Identifiers</a>
</li>
<li>
<a href="https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers">Unicode BCP 47 Locale Identifiers</a>
<a href="https://unicode.org/reports/tr35/tr35-numbers.html#Operands">Part 3 Numbers, Section 5.1.1 Operands</a>
</li>
</ul>
</li>
Expand Down
Loading

0 comments on commit 59053e6

Please sign in to comment.