projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.07k stars 96 forks source link

Update FluentBundle to the latest API #120

Closed zbraniecki closed 5 years ago

zbraniecki commented 5 years ago

Implementes #119 119

zbraniecki commented 5 years ago

I kept the convenience methods temporarily until I update the tests.

zbraniecki commented 5 years ago

@stasm - I don't want to overload you as I know you're super-busy, so I'm not going to block on your review, but I think this patchset is ready and it puts us roughly on par with the JS.

There are still some areas missing (mainly lack of NUMBER/DATETIME and bomb protection), but I'd prefer to land this patch and continue catching up to JS functionality on master.

zbraniecki commented 5 years ago

One change I placed here is to make l10n_args use owned strings as keys. &str as key sucks more often than not, and I filed #123 to come up with a clean solution that has better ergonomics (maybe Cow?). For now, owned keys should work without too much hassle.