Make Plural Rules
make_pluralrules
is a coe generator applications that turns a Unicode CLDR plural rules AST into Rust code.
The application is intended to generate code necessary for calculating correct plural rules categories.
Status
The generator currently generates code for cardinal plural rules from CLDR 33 into Rust 1.27 and above.
Launch make_pluralrules with:
cargo run -- -i <./path/to/cldr.json>... -o <./path/to/output.rs>
Local Development
cargo build
cargo test
If you want to update the test fixtures to match your latest changes, please use:
cargo regenerate-fixtures_within | cargo regenerate-fixtures
When submitting a PR please use cargo fmt
.
Contributors
Thank you to all contributors!