|
61 | 61 | 1. Let _variants_ be GetLocaleVariants(_baseName_).
|
62 | 62 | 1. If _variants_ is not *undefined*, then
|
63 | 63 | 1. If _variants_ contains any duplicate subtags, return *false*.
|
64 |
| - 1. Let _allExtensions_ be the suffix of _lowerLocale_ following _baseName_. |
65 |
| - 1. If _allExtensions_ contains a <emu-not-ref>substring</emu-not-ref> matched by the <code>pu_extensions</code> Unicode locale nonterminal, let _extensions_ be the prefix of _allExtensions_ preceding the longest such <emu-not-ref>substring</emu-not-ref>. Otherwise, let _extensions_ be _allExtensions_. |
| 64 | + 1. Let _extensions_ be the suffix of _lowerLocale_ following _baseName_. |
| 65 | + 1. NOTE: A *"-x-…"* private use subtag sequence matched by the <code>pu_extensions</code> Unicode locale nonterminal must be ignored, but an isolated final *"x"* subtag with no following content does not affect any following checks. |
| 66 | + 1. Let _puIndex_ be StringIndexOf(_extensions_, *"-x-"*, 0). |
| 67 | + 1. If _puIndex_ is not ~not-found~, set _extensions_ to the substring of _extensions_ from 0 to _puIndex_. |
66 | 68 | 1. If _extensions_ is not the empty String, then
|
67 | 69 | 1. If _extensions_ contains any duplicate singleton subtags, return *false*.
|
68 | 70 | 1. Let _transformExtension_ be the longest <emu-not-ref>substring</emu-not-ref> of _extensions_ matched by the <code>transformed_extensions</code> Unicode locale nonterminal. If there is no such <emu-not-ref>substring</emu-not-ref>, return *true*.
|
69 | 71 | 1. Assert: The substring of _transformExtension_ from 0 to 3 is *"-t-"*.
|
70 | 72 | 1. Let _tPrefix_ be the substring of _transformExtension_ from 3.
|
71 | 73 | 1. Let _tlang_ be the longest prefix of _tPrefix_ matched by the <code>tlang</code> Unicode locale nonterminal. If there is no such prefix, return *true*.
|
72 |
| - 1. Let _tlangRefinements_ be the longest suffix of _tlang_ following a non-empty prefix matched by the <code>unicode_language_subtag</code> Unicode locale nonterminal. |
73 |
| - 1. If _tlangRefinements_ contains any duplicate <emu-not-ref>substrings</emu-not-ref> matched greedily by the <code>unicode_variant_subtag</code> Unicode locale nonterminal, return *false*. |
| 74 | + 1. Let _tlangVariants_ be GetLocaleVariants(_tlang_). |
| 75 | + 1. If _tlangVariants_ contains any duplicate subtags, return *false*. |
74 | 76 | 1. Return *true*.
|
75 | 77 | </emu-alg>
|
76 | 78 | </emu-clause>
|
|
0 commit comments