tc39 / proposal-intl-displaynames

Get localized display names for languages, scripts, regions and others. https://tc39.github.io/proposal-intl-displaynames/
MIT License
44 stars 10 forks source link

Consider adding abbreviated length #74

Closed zbraniecki closed 3 years ago

zbraniecki commented 4 years ago

It seems to me that at the moment DisplayNames doesn't handle abbreviated length of the field. Is there a reason we decided to skip it or just an omission?

zbraniecki commented 4 years ago

@FrankYFTang ?

FrankYFTang commented 4 years ago

sorry, I don't quite understand what does this mean. Could you point out more details, please.

zbraniecki commented 4 years ago

Ah, sure.

So, I understand that for now we removed weekday and month for now (#75), and I assume we intend to bring them back.

If that's the case, then the follow up question is about styles. The proposal currently lists three styles - ["narrow", "short", "long"]. But CLDR handles four styles - ["abbreviated", "narrow", "short", "wide"]. See: https://github.com/unicode-cldr/cldr-dates-modern/blob/master/main/en/ca-gregorian.json#L105-L141

I assume that the long in the ECMA402 will map to wide in CLDR, but it doesn't seem like we have an equivalent for abbreviated.

I'd like to know if this is intended to be added later, or for some reason we will not want to support it.

The context is that we have an internal DisplayNames in Firefox for our UI, that we keep a bit more "on the edge" than open API for JS has, because we can deprecate and replace code if needed, but I'd like to keep it in sync with our proposals. See https://bugzilla.mozilla.org/show_bug.cgi?id=1639515#c10 for context.

FrankYFTang commented 4 years ago

ok, let's put that into the next proposal on display names

FrankYFTang commented 3 years ago

Moved to https://github.com/tc39/intl-displaynames-v2/issues/6