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

ICU upluralrules #130

Merged
merged 6 commits into from
Jun 18, 2020
Merged

ICU upluralrules #130

merged 6 commits into from
Jun 18, 2020

Conversation

filmil
Copy link
Member

@filmil filmil commented Jun 17, 2020

Adds the support for locale-sensitive plural rules

Plural rules determines what gets printed when one needs to format "1 file"
or "10 files" for human consumption. Each language may have very own rules
about what number is considered singular, what is considered plural.

Languages have different rules about the numbers subject to the rule, and
even about the number of plurals that are used.

Closes #127

This makes the plural rule types and functions, like  `uplrules_open`
or `UPluralType` available for use.

Since these changes are as a rule large but mechanical, let's offload
them to this separate commit.

Issue google#127
This should have been done when 0.3.0 was released.  It would be
nice to automate the process completely.

Issue google#127
Plural rules determines what gets printed when one needs to format "1 file"
or "10 files" for human consumption.  Each language may have very own rules
about what number is considered singular, what is considered plural.

Languages have different rules about the numbers subject to the rule, and
even about the number of plurals that are used.

Closes google#127
v0.3.1 will not be released for some time.

See issue google#127
@filmil filmil requested a review from kpozin June 17, 2020 16:56
@filmil
Copy link
Member Author

filmil commented Jun 17, 2020

@kpozin I stacked multiple commits here, let me know if this makes the review unwieldy and I'll do differently in the future.

@filmil filmil changed the title Icu upluralrules ICU upluralrules Jun 17, 2020
rust_icu_uenum/src/lib.rs Show resolved Hide resolved
Hides the docs by default, since we don't want the
unsafe function to be widely used.

Fixes a typo in the doc formulation.
@filmil filmil merged commit 31fd09c into google:master Jun 18, 2020
@filmil filmil deleted the icu-upluralrules branch September 17, 2021 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Intl.PluralRules
2 participants