#fluent #fields #language #compare #find

fluent-missing

Compare and find missing fields in a language

1 unstable release

0.1.0 Mar 28, 2021

#61 in #fluent

MPL-2.0 license

2KB

use fluent_fmt::FluentFormatter;
use fluent_syntax::parser::parse;

#[test]
fn parsing() {
    let mut ctx = FluentFormatter::default();
    let ftl = r#"
### Resource Level Comment
###   * Resource Level Comment2
###   * Resource Level Comment3

# This is a message comment
time-elapsed = Time elapsed: { 
    NUMBER($duration, maximumFractionDigits: 0) 
        }s.
    .placeholder = email@example.com
    .aria-label = Login input value
    .title = Type your login email
"#;
    let out = parse(ftl).unwrap();
    // println!("{:#?}", out);
    println!("{}", ctx.pretty_print(out).unwrap())
}

No runtime deps