projectfluent / fluent-rs

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

Reexport common types like IntlLangMemoizer and LanguageIdentifier #256

Open kangalio opened 2 years ago

kangalio commented 2 years ago

It's slightly annoying to have to depend on third-party crates just to be able to interact with fluent-rs itself.

So far in my journey of exploring fluent, I have to depend on intl-memoizer to be able to spell out the fluent::bundle::FluentBundle<fluent::FluentResource, intl_memoizer::concurrent::IntlLangMemoizer> type. Though I was able to work around depending on unic_langid by creating a LanguageIdentifier via .parse() instead

gregtatum commented 1 year ago

Seems reasonable enough to me to export the IntlLangMemoizer since it's part of this repo. I'm less sure of the LanguageIdentifier, especially since you can opt into macro usage.

alerque commented 2 months ago

LangIdentifier in particular is a bit mixed up because it turns up in inic-langid and fluent-langneg as well, and the implementations are not currently in sync. That sync issue is separate for this (c.f. fluent-langneg-rs#26 and I also agree with Greg that it may not make sense to export it.

Contributions still welcome for IntlLangMemoizer.