#fluent #fields #language #find #compare

fluent-missing

比较并查找语言中的缺失字段

1个不稳定版本

0.1.0 2021年3月28日

#56 in #fluent

MPL-2.0 许可证

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 protected]
    .aria-label = Login input value
    .title = Type your login email
"#;
    let out = parse(ftl).unwrap();
    // println!("{:#?}", out);
    println!("{}", ctx.pretty_print(out).unwrap())
}

无运行时依赖