Files
tubestation/third_party/rust/intl_pluralrules/README.md
Makoto Kato 2e6ff10aeb Bug 1800407 - Update intl_pluralrules, unic-langid-impl and unic-langid-macros to use newer ICU4X's tinystr. r=supply-chain-reviewers,platform-i18n-reviewers,nordzilla
We have a plan to integrate ICU4X into Gecko. When importing ICU4X, tinystr
crate has 2 versions. So I should update these crates to newer version to
fix it.

Differential Revision: https://phabricator.services.mozilla.com/D162081
2022-12-14 04:33:47 +00:00

1.5 KiB

INTL Plural Rules

intl_pluralrules categorizes numbers by plural operands. See Unicode Plural Rules

crates.io Build Status Coverage Status

This library is intended to be used to find the plural category of numeric input.

Status

Currently produces operands compliant with CLDR 36 into Rust 1.31 and above.

Updating CLDR Data

If you would like to update rules.rs with plural rules that are not the specified version above (e.g. future versions of CLDR or external CLDR-compliant rules), you can regenerate the logic in rules.rs with the command:

cargo regenerate-data

You will need to replace the JSON files under /cldr_data/ with your new CLDR JSON files.

Local Development

cargo build
cargo test

When submitting a PR please use cargo fmt.

Contributors

Thank you to all contributors!