Closed alerque closed 3 years ago
Ah, yes. We're currently working on a major update to fluent-fallback to pull it into Firefox. It will take a couple more weeks after which we should have a much more complete higher level experience.
Can you wait or would you prefer a quick 0.0.5
release to unblock you now?
I could wait (or pull in Git sources) but if the release process is easy I'd suggest it's a good experience to leave the current stable release in known-broken state if the problem is also known to be fixed just by bumping the dependency to the proper version. I haven't gone down the rabbit hole to see if everything else is in a working state, but if it is I would suggest a release just so others don't wander into this problem and waste as much time as I did trying to figure out what gives.
Do you also use fluent-resmgr
or l10nregistry
or do you provide custom resource management?
I provide custom resource management. I started with code for some of the functions in fluent-resmgr
for parsing locales, but extended it with some more advanced fallback stuff, then bolted it onto a home-grown solution using rust-embeded
to feed it actual data.
At the time I implemented this fluent-templates
didn't exist, but having recently run across @XAMPPRocky's project I'm kind of bummed I didn't start extracting and generalizing my code earlier because it's clearly a very similar concept. On the other hand I'm glad somebody else did the work and took it farther that I would have and am looking forward to maybe refactoring out my home-grown stuff and going with that.
As for l10nregistry
, I literally hadn't heard of it until just now.
@alerque the new fluent-fallback
has been released! Can you try?
Will do...
@zbraniecki I feel kind of silly saying this, but I just sat down to review this and I can't find a new release of fluent-fallback
.
It's not on crates.io because we depend on pin-cell
which didn't get a release in a year - https://github.com/withoutboats/pin-cell/issues/6
I'm considering forking it into fluent-fallback
for now, but to test, you can do:
fluent-fallback = { git = "https://github.com/projectfluent/fluent-rs", tag = "fluent-fallback@0.1.0" }
Thanks. With that of course I found the crate. I bumped my my deps up from Fluent 0.12.0 to 0.14.0 and of course this update. Unfortunately this lands me in pretty deep water and I clearly need to do quite a lot of refactoring. Comparing my current code to the current example code in the fallback module suggests that almost all the cheese has moved. Also unfortunate I had a look a the docs for the fallback functions and structs and found --- they don't seem to be documented at all. Having taking a few stabs at refactoring, I'm going to take a break and look into jumping ship to fluent-templates
instead because it looks like it's engineered to do roughly the same work I was doing manually and if I have to practically rewrite from scratch anyway I suspect it's going to be less painful to use that.
That's a long winded way to say I won't be giving this much of a test drive unless the experiment with fluent-templates suggests it isn't right for the job.
Yes, I agree.
Higher level Fluent APIs are not yet stable (as the version suggests). I'm iterating over them and the FluentBundle
is mostly stable, while fluent-fallback
is getting stable as we speak. I expect the situation to cool down within a month or two and we'll start talking about using fluent-fallback
for actual bindings to libraries such as druid
and other plug&play
use cases.
I'm sorry for the hassle - getting localization set up correctly for both simple and complex (long-lived, live language switching, and dynamic resource loading) scenarios is non-trivial and I much prefer to be in the storming phase now, and end up with a stable model for years to come (as we did with JS implementation!).
So, fluent-templates
may be a good mid-point and I hope that fluent-templates
will rebase on top of fluent-fallback
eventually once we stabilize! :)
I'll close this issue for now, please reopen if needed!
I'm having trouble updating to fluent 0.13.x, and it seems part of the issue is a circle of dependencies that pulls in older versions. In particular fluent-fallback seems to depend on fluent-bundle 0.12, dragging both 0.12 and 0.13 into my app and fouling up the works.
I looked at the current sources in this repo and they look okay, I'm guessing the crate just needs a new release to reflect the current state of the sources.