fluent-rs icon indicating copy to clipboard operation
fluent-rs copied to clipboard

Messages and terms with the same names

Open kgv opened this issue 1 year ago • 1 comments

For js implementation it is possible: context_test.js#L46 But for rs implementation it throws error:

let mut bundle = FluentBundle::new_concurrent(vec![langid!("en")]);
bundle
    .add_resource(
        FluentResource::try_new(
            "foo = Foo\\
                    -bar = Bar"
                .to_owned(),
        )
        .unwrap(),
    )
    .unwrap();
bundle.add_resource_overriding(
    FluentResource::try_new("-foo = Private Foo".to_owned()).unwrap(),
);
assert!(bundle.has_message("foo")); // assertion failed: bundle.has_message("foo")

Will this be implemented in fluent-rs?

kgv avatar Sep 08 '24 05:09 kgv