projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.04k stars 95 forks source link

Add options for cardinal/ordinal plural types #259

Closed oliver-ni closed 10 months ago

oliver-ni commented 2 years ago

Adds functionality for switching between plural types (cardinal and ordinal).

Fluent docs include this option in the NUMBER built-in function. Since fluent-rs doesn't have that yet, I included it in the place where all the other number options were. Please let me know if this isn't the appropriate place / way to include this functionality.

Also, I called it kind instead of type since the latter is a Rust keyword... a little weird but not sure if there's a better way to deal with that.

juliancoffee commented 1 year ago

@oliver-ni to answer on using "type" in Rust, you can use raw identifiers. https://doc.rust-lang.org/rust-by-example/compatibility/raw_identifiers.html

gregtatum commented 10 months ago

Closing as stale. Feel free to re-open if you want to address the requested changes.