Skip to content
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

Document ECMA-402's prohibition on duplicate variant subtags, both in locales overall and in locales nested in transformed_extensions #1778

Merged
merged 2 commits into from
Feb 4, 2021

Conversation

jswalden
Copy link
Contributor

This fixes tc39/ecma402-mdn#18 which documents the change being made in tc39/ecma402#429.


The existing text was unsuited to easily adding this restriction. I also found myself dissatisfied with the current wording, which piles up a bit too much prose in one paragraph, while not clearly delineating the possible locales values. I rewrote stuff to clearly explain how things all fit together.

I removed use of the term "Unicode BCP 47 locale identifier". If we're imposing a no-duplicate-variants requirement in transformed_extensions, beyond how TR35 presently defines it, the term is imprecise. And most readers of this document won't know the term anyway. It seems simplest to use "locale identifier" to refer to a string that matches the grammar and non-grammar restrictions, then "locale" refers to either a locale identifier string or to a Intl.Locale that wraps one.

The current text uses "tag" and "subtag" and "component" indiscriminately. The tag naming was fine when this page talked about language tags. It stopped making sense when this page changed to use "Unicode BCP 47 locale identifier". I changed the text to consistently use "subtag" and never "tag" for alphanumeric letter sequences, and I used "sequence" for any sequence of subtags.


As to the actual change this PR concerns, it's debatable whether this needs to be documented. The new restriction is obscure; it's doubtful people are using transformed_extensions if no Intl functionality examines it. But the restriction isn't required in UTS35 or BCP 47 yet, so we really ought say it somewhere other than just the spec.

Back when this was all a wiki (so it goes), I would have just made these changes and gotten a post-hoc read-over. But I guess now everything gets a full review before it lands? I'll certainly rope in some ECMA-402 people, but having a non-domain expert look at this seems pretty desirable given this page is targeted at web developers.

@jswalden jswalden requested a review from a team as a code owner January 27, 2021 01:51
@jswalden jswalden requested review from sideshowbarker and removed request for a team January 27, 2021 01:51
Copy link
Collaborator

@sideshowbarker sideshowbarker left a comment

Choose a reason for hiding this comment

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

Minor nits about punctuation (using a colon to introduce a bulleted list), and two spaces after full stops (MDN style is to use only one space after a full stop).

…rall language tag and in a transformed-content extension within a language tag.
@jswalden
Copy link
Contributor Author

jswalden commented Feb 4, 2021

Okay, I folded all the suggestions into whichever of the two revs was appropriate, and I updated the branch accordingly. My git-fu for editing sequences of patches, and squashing/reordering/etc. them, is not great, but I think I got it all right. Could be worth a quick once-over if you're paranoid. Otherwise, this should be good to go.

@sideshowbarker sideshowbarker merged commit 7869c9e into mdn:main Feb 4, 2021
@sideshowbarker
Copy link
Collaborator

Great to see you here and great to see this refinement going in. Congrats on landing your first docs patch under the new system — welcome aboard 🎉

@jswalden jswalden deleted the tlang-duplicate-variants branch February 8, 2021 21:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document PR #429
2 participants