-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Setting this doesn't seem to have any effect whatsoever. I see it is set in the example here, but the input value doesn't have enough floating point digits to actually check it or else assertion would fail:
fluent-rs/fluent-bundle/examples/custom_formatter.rs
Lines 123 to 143 in bda4736
let num = FluentNumber::new( | |
25.2, | |
FluentNumberOptions { | |
maximum_fraction_digits: Some(8), | |
minimum_fraction_digits: Some(1), | |
..Default::default() | |
}, | |
); | |
args.set("num", num); | |
let value = bundle.format_pattern(pattern, Some(&args), &mut errors); | |
// Notice, that since we specified minimum and maximum fraction digits options | |
// to be 1 and 8 when construction the argument, and then the minimum fraction | |
// digits option has been overridden in the localization the formatter | |
// will received options: | |
// - minimum_fraction_digits: Some(5) | |
// - maximum_fraction_digits: Some(8) | |
assert_eq!( | |
value, | |
"Here is an explicitly encoded variable: CUSTOM(25.2)." | |
); |
Metadata
Metadata
Assignees
Labels
No labels