zbraniecki / pluralrules

Pluralization handling in Rust
36 stars 4 forks source link

Enable configuring data bundled into the crate #26

Open zbraniecki opened 6 years ago

zbraniecki commented 6 years ago

At the moment our build time configuration is to take a CLDR JSON file(s) and build rules.rs with all of the rules in them.

In would be useful to be able to select which type of rules we want and what locales we want them in. It could be a config toml/json/whatever file for make_pluralrules which could look like this:

{
  "types": ["ordinal", "cardinal"],
  "locales": ["en", "pl", "fr"]
}

where every omitted field means "all available in the JSON source".