fluent-bundle 0.16.0

A low-level implementation of a collection of localization messages for a single locale for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{FluentArgs, FluentValue};

#[allow(non_snake_case)]
pub fn NUMBER<'a>(positional: &[FluentValue<'a>], named: &FluentArgs) -> FluentValue<'a> {
    let Some(FluentValue::Number(n)) = positional.first() else {
        return FluentValue::Error;
    };

    let mut n = n.clone();
    n.options.merge(named);

    FluentValue::Number(n)
}