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

[bug] Documentation for features including a locale is incorrect #650

Closed
dantman opened this issue May 26, 2020 · 3 comments · Fixed by #1084
Closed

[bug] Documentation for features including a locale is incorrect #650

dantman opened this issue May 26, 2020 · 3 comments · Fixed by #1084
Assignees
Labels
library Relates to an Origami library

Comments

@dantman
Copy link

dantman commented May 26, 2020

The documentation for Intl.PluralRules states:
Locales must be specified separately by prefixing the locale name with `Intl.PluralRules~locale`, eg `Intl.PluralRules~locale.en-GB`.

However Intl.PluralRules~locale.en-GB doesn't resolve to a valid polyfill.

This is the same for Intl.RelativeTimeFormat.~locale.* as well.

In practice none of the en subtags have features, it's only en.

@origamiserviceuser origamiserviceuser added this to incoming in Origami ✨ May 26, 2020
@JakeChampion JakeChampion self-assigned this May 27, 2020
@longlho
Copy link
Contributor

longlho commented Jun 10, 2020

So this depends on the polyfill. E.g Intl.PluralRules locales do not vary per region subtag but Intl.NumberFormat and friends do. Intl.RelativeTimeFormat also rolls up all regions within a lang into a single file.
The only way to know is to check like https://unpkg.com/browse/@formatjs/intl-relativetimeformat@5.2.6/dist/locale-data/

@chee
Copy link
Collaborator

chee commented Aug 13, 2021

@JakeChampion do we want to improve the documentation here, or is this working as expected?

@JakeChampion
Copy link
Owner

This is no longer true for Intl.RelativeTimeFormat -- we have the locale subtags for that feature.

I've made a pull-request to update the notes for Intl.PluralRules -- #1084

Origami ✨ automation moved this from incoming to complete Aug 13, 2021
@github-actions github-actions bot added the library Relates to an Origami library label Aug 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
@robertboulton robertboulton removed this from Done in Origami ✨ Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
library Relates to an Origami library
Projects
None yet
4 participants