Skip to content

Conversation

@gibson042
Copy link
Member

@gibson042 gibson042 commented May 30, 2025

No description provided.

gibson042 added 2 commits May 30, 2025 13:16
…nical" to "structurally valid"

Canonicalization is already performed by MakeLocaleRecord, and not needed before it.
@gibson042 gibson042 requested review from anba, ryzokuken and sffc May 30, 2025 17:23
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.

gibson042 added 2 commits May 31, 2025 12:16
…nicalization

The relevant algorithms are buried rather deep in that section.
@gibson042 gibson042 requested a review from anba May 31, 2025 16:21
@gibson042 gibson042 changed the title Editorial: Relax UpdateLanguageId language tag constraints from "canonical" to "structurally valid" Editorial: Make "structurally valid language tag" an auto-linked term Aug 1, 2025
@gibson042 gibson042 added editorial Involves an editorial fix c: spec Component: spec editorial issues spec-text needs review labels Aug 1, 2025
@ryzokuken
Copy link
Member

@anba could you take a quick look again? Thanks!

Copy link

@aphillips aphillips left a comment

Choose a reason for hiding this comment

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

See comment. There are many places where we've managed the language tag validation jargon into "well-formed" vs. "valid". I know there is additional complexity in the locale identifier space, but we should be cautious not to make understanding more difficult.

<h1>
UpdateLanguageId (
_tag_: a Unicode canonicalized locale identifier,
_tag_: a structurally valid language tag,

Choose a reason for hiding this comment

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

"structurally valid language tag" already has the name "well-formed" in BCP47 (and elsewhere). The term "valid" also has a meaning in that space: it means that the subtags have been validated. Inventing a term here that uses the word "valid" but which means apparently "well-formed" would be bad news. I would strongly urge using "structurally well-formed language tag" if not just "well-formed language tag".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: spec Component: spec editorial issues editorial Involves an editorial fix needs review spec-text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants