Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Change the ref grammar from RFC5646 to UTS35 #67

Merged
merged 4 commits into from
Jan 8, 2019
Merged

Change the ref grammar from RFC5646 to UTS35 #67

merged 4 commits into from
Jan 8, 2019

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Dec 18, 2018

This is following up #63 after the merging of #66

  1. Change all the links from pointing to RFC5646 to pointing to UTS35 instead.
  2. In Intl.Locale.prototype.baseName change langtag production -> unicode_language_id production.
  3. Change all other 'XXX production' based on RFC5646 to 'YYY production' based on UTS35
    a. language production -> unicode_language_subtag production
    b. script production -> unicode_script_subtag production
    c. region production -> unicode_region_subtag production
    d. langtag production -> unicode_locale_id production (note: except 2 above)
    e. Remove the reference of "grandfathered production" (see 4 below)
  4. Merge the step 4.a "If language does not match the language production, throw a RangeError exception." step 4.b "If language matches the grandfathered production, throw a RangeError exception." of ApplyOptionsToTag as only one 4.a "If language does not match the unicode_language_subtag production, throw a RangeError exception." since the definition of unicode_language_subtag in UTS35 already excluded ("4ALPHA" or "2*3ALPHA '-' extlang") and therefore all language which match grandfathered production is already "not match unicode_language_subtag)

@littledan @gsathya @zbraniecki @anba @macchiati @jungshik @aphillips @markusicu @nciric

@FrankYFTang
Copy link
Contributor Author

@Ms2ger

@anba
Copy link
Contributor

anba commented Dec 19, 2018

It doesn't seem like mentioning unicode_language_id is possible in all cases, because unicode_language_id doesn't include extension and privateuse sequences. There is also unicode_locale_id, which does include extension and privateuse sequences, but it also implies validating -t- transform extension sequences and I'm not sure we want to include this implied validation for -t- extensions in all cases.

@macchiati
Copy link

macchiati commented Dec 19, 2018 via email

Correct all except one unicode_language_id to unicode_locale_id.
@FrankYFTang
Copy link
Contributor Author

It doesn't seem like mentioning unicode_language_id is possible in all cases, because unicode_language_id doesn't include extension and privateuse sequences. There is also unicode_locale_id, which does include extension and privateuse sequences,

Opps ... good catch. I totally messed up. I intend to replace 'langtag' in RFC with 'unicode_locale_id' in UTS35 but somehow I messed up in this PR. Good catch. Will update my PR soon.

but it also implies validating -t- transform extension sequences and I'm not sure we want to include this implied validation for -t- extensions in all cases.

@FrankYFTang
Copy link
Contributor Author

OK, I updated the PR to address the "unicode_language_id vs unicode_locale_id error" issues and also change the PR description to match the latest content in the PR.

The "validating -t- transform extension" issue is not yet addressed. Should we merge this PR without address that first? and handle that in a follow up PR?

Copy link
Member

@littledan littledan left a comment

Choose a reason for hiding this comment

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

This PR looks good to me. It seems reasonable to do some parts in a follow-on.

spec.html Outdated
@@ -19,49 +19,48 @@ <h1>The Intl.Locale Constructor</h1>
<emu-clause id="sec-apply-options-to-tag" aoid=ApplyOptionsToTag>
<h1>ApplyOptionsToTag( _tag_, _options_ )</h1>
<p>
The following algorithm refers to <a href="https://tools.ietf.org/html/rfc5646#section-2.1">RFC 5646's Language-Tag grammar</a>.
The following algorithm refers to <a href="http://www.unicode.org/reports/tr35/#Identifiers">UTS 35's Unicode Language and Locale Identifiers grammar</a>.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this seems to work as https, so let's use that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

spec.html Outdated
@@ -142,13 +141,13 @@ <h1>InsertUnicodeExtension( _locale_, _extension_ )</h1>
The InsertUnicodeExtension abstract operation inserts _extension_, which must be a Unicode locale extension sequence, into _locale_, which must be a String value with a structurally valid and canonicalized BCP 47 language tag. The following steps are taken:
</p>
<p>
The following algorithm refers to <a href="https://tools.ietf.org/html/rfc5646#section-2.1">RFC 5646's Language-Tag grammar</a>.
The following algorithm refers to <a href="http://www.unicode.org/reports/tr35/#Identifiers">UTS 35's Unicode Language and Locale Identifiers grammar</a>.
Copy link
Member

Choose a reason for hiding this comment

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

You missed https here and in a few other places below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

opps! sorry

@FrankYFTang
Copy link
Contributor Author

ping. Can we merge this?

@littledan littledan merged commit b29106e into tc39:master Jan 8, 2019
@littledan
Copy link
Member

If anyone sees any issues with what's merged, please keep commenting.

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.

4 participants