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

Add support for plural ranges #20

Merged
merged 7 commits into from
Nov 6, 2020
Merged

Add support for plural ranges #20

merged 7 commits into from
Nov 6, 2020

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Oct 19, 2020

This changes the compiler export from:

import Compiler from 'make-plural-compiler'

to:

import { Compiler, compileRange } from 'make-plural-compiler'

where compileRange takes in CLDR-formatted plural range data and returns a function that, when given then start and end plural categories of a range, returns the plural category of the entire range.

In expectation of unicode-org/cldr#797 eventually being merged, the JSON-formatted plural rule data is vendored into the CLI package. The transformed data is published as 'make-plural/ranges'.

@eemeli
Copy link
Owner Author

eemeli commented Nov 6, 2020

It looks like the CLDR data for ranges is/will be included in its v38 release, but the cldr-core npm package hasn't been updated with that yet.

@eemeli eemeli merged commit 9097df8 into master Nov 6, 2020
@eemeli eemeli deleted the ranges branch November 6, 2020 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant