-
Notifications
You must be signed in to change notification settings - Fork 17
Spec questions/errors #12
Comments
I don't think we want that. |
#13 should fix all mentioned issues except for:
|
@anba My intention was to simply not support grandfathered language tags. |
Only irregular or also regular grandfathered language tags? |
Oh sorry, I meant irregular grandfathered tags. So, the change you are suggesting seems important. |
Hmm, I'm a bit confused right now. The suggested change is only important if we also disallow regular grandfathered language tags. |
On second the possible restriction should probably use |
I've tried to represent these questions on the agenda of the Intl call next Friday so we can get more input. |
There are at least two more issue with grandfathered tags: 1. If the input is a regular grandfathered tag without a modern replacement, appending Unicode extension sequences will create a non-valid language tag ("valid" in the sense of https://tools.ietf.org/html/rfc5646#section-2.2.9): var loc = new Intl.Locale("cel-gaulish", {nu: "latn"});
print(loc.toString()); "cel-gaulish-u-nu-latn" Since While 2. ICU uses its own replacement for grandfathered tags without modern replacements (and en-GB-oed).
As with the other grandfathered tags issues this shouldn't matter much in practice, because I don't expect that grandfathered tags are actually used in normal code. |
Is there an option for us to not support grandfathered tags at all? |
Good catch. filed IcuBug:13650 |
We discussed grandfathered tags at the last Intl meeting. The resolution, I believe, was to support regular and irregular grandfathered tags by mapping them each to modern tags, at the beginning of the process of parsing them. I believe this change was recommended for all of Intl, and not just Locale. |
- Options which can't be applied to private use or grandfathered tags, whether script, region or Unicode extensions, trigger a RangeError in the constructor. (Closes #25 and #12) - Insert additional calls to CanonicalizeLanguageTag for grandfathered tags, to enable options to be applied. (Closes #17) - For grandfathered or private use tags, the entire tag is treated as the "language", both for the purposes of the Intl.Locale.prototype.language getter and for the language property of the options bag in the constructor. (Follows #25 (comment))
- Options which can't be applied to private use or grandfathered tags, whether script, region or Unicode extensions, trigger a RangeError in the constructor. (Closes #25 and #12) - Insert additional calls to CanonicalizeLanguageTag for grandfathered tags, to enable options to be applied. (Closes #17) - For grandfathered or private use tags, the entire tag is treated as the "language", both for the purposes of the Intl.Locale.prototype.language getter and for the language property of the options bag in the constructor. (Follows #25 (comment))
We've switched to Unicode BCP 47 Locale Identifiers, fixing the remaining issues. |
ApplyOptionsToTag
If tag matches the langtag production and does not match grandfathered,
to cover the case of regular grandfathered language tags.
FindExtension
Intl.Locale
Internal slots
all two- or three-character strings with code points in the range "a" through "z"
doesn't cover all possible strings which can be generated from thelanguage
production.Intl.Collator
?Intl.Locale
if certain Unicode extensions values aren't supported inIntl.{Collator, NumberFormat, DateTimeFormat}
?The text was updated successfully, but these errors were encountered: