Closed Weasy666 closed 1 year ago
@Weasy666 I haven't used the built-in functions before, perhaps this is related to https://github.com/projectfluent/fluent-rs/issues/313 ?
Perhaps built-in functions aren't available in fluent-rs
yet, I wonder?
It looks like it should be possible to specify our own using https://docs.rs/fluent/latest/fluent/bundle/struct.FluentBundle.html#method.add_function
Perhaps they were never implemented as per https://github.com/projectfluent/fluent-rs/issues/19#issuecomment-466160940
Oh...looks like you are right. That's a shame, but then that's not exactly a problem or bug of this crate. Should we just close the issue then?
@Weasy666 no worries! Yeah I guess we'll close this for now, it really would be nice to have. I think it should be possible to implement something similar yourself using with_bundles_mut()
Hello! I really like how easy to use the fluent system is with your
i18n-embed-fl
crate. But i ran into an issue and am not sure if i am doing something wrong. I want to use a localization string likeflight-time = Flight time: {NUMBER($time, maximumFractionDigits: 1)} h
with the below minimal example:I'd expect to get a printed message that looks like
Flight time: 0.4 h
, but instead it printsFlight time: {NUMBER()} h
and also logs this error:Am i doing something wrong, or are builtins not supported right now?