Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[i18n] Please use Fluent for localization #1058

Open
alerque opened this issue Jun 10, 2020 · 15 comments
Open

[i18n] Please use Fluent for localization #1058

alerque opened this issue Jun 10, 2020 · 15 comments

Comments

@alerque
Copy link

alerque commented Jun 10, 2020

Dissatisfied with other current static site generators (I currently have Hexo, Hugo, Jekyll, & custom sites deployed) I was poking around the field and ran across this project. I'm actually pretty excited about it, but for my use cases internationalization is pretty much the biggest stumbling block. I see this project is only just starting to dabble in it. Please please consider using Fluent for all localization except perhaps Markdown body content. This is something most other site generators get wrong. Most of them try to use YAML or JSON key/value lists to localize the generated site UI. That approach simply isn't good enough.

I might even be able to contribute some to implementing this. The Rust bindings for Fluent are quite good and I've done some work with them before.

@Keats
Copy link
Collaborator

Keats commented Jun 10, 2020

That's the plan: #1040

@alerque
Copy link
Author

alerque commented Jun 10, 2020

Oh awesome, that looks promising! I had searched issues but not PRs.

@Keats Keats closed this as completed Sep 4, 2020
@alerque
Copy link
Author

alerque commented Sep 6, 2020

So what's the status on localization with Fluent? I've been waiting for any progress on this issue to review whether I can reasonably start migrating sites. Given that the related PR was also closed without being merged it seems like maybe there has been no progress, maybe even the priority has slipped. Is there another issue I'm missing where localization (and specifically via Fluent) is being tracked?

@Keats
Copy link
Collaborator

Keats commented Sep 6, 2020

@alerque
Copy link
Author

alerque commented Jun 30, 2021

I'd like to request this issue be re-opened per my comment on the related Tera issue, to track progress until Fluent can be used by default to handle localization in Zola based sites without needing to code, compile, and plumb your own toolchain.

@alerque
Copy link
Author

alerque commented Jul 1, 2023

Kind of a side show, but tera-cli now (HEAD) has support for Fluent localizations as a data provider for filling out templates. I'm currently using tera to pre-process some things before passing them to zola. This works (ish) but is a build-system spaghetti mess. I'm still looking forward to first class support in Zola itself.

@Keats
Copy link
Collaborator

Keats commented Jan 7, 2024

It looks like fluent is not going to be potentially maintained? projectfluent/fluent#358 I don't know what is MF2 except some standard effort

@clarfonthey
Copy link
Contributor

Hmm, that is weird, especially considering how the Rust compiler itself is using Fluent now. Maybe worth seeing what direction they go in following this.

@heyakyra
Copy link

heyakyra commented Jan 7, 2024

Fluent is stable. MF2 seems to basically be a re-implementation of the same concepts but not actually ready to be used, while Fluent is already good-to-go.

@alerque
Copy link
Author

alerque commented May 6, 2024

It looks like fluent is not going to be potentially maintained?

Mozilla has added two external community contributors (myself and another guy) with ownership status for the Rust crates and access to the repos. We've cut releases for all the unreleased development work from the past couple years, merged a bevy of PRs that have been outstanding for a while, and started digging into some long standing niggly issues. A couple original devs are also still actively involved. While it might have been ambiguous for a while while Mozilla decided how they were going to handle things, I don't think its fair any more to characterize Fluent as "potentially unmaintained" any more.

And again in relation to MF2 the latter is conceptually similar but also not currently implemented anywhere. It's a draft spec that just posted a tech preview, not a working library. It will have implementations in the future, but it isn't viable today. Also there will be migration paths for people that do decide to switch and probably also interop libraries for folks that prefer one or the other but want to interact. There is cross over in the dev teams too (you'll find my name in MF2 spec contributors and there are people even more deeply involved in both).

@alerque
Copy link
Author

alerque commented May 6, 2024

Also even if you don't use it directly, referencing i18n-embed would be smart as an implementation that would parallel some of the asset handling code Zola would probably want.

@elinorbgr
Copy link

I'm currently looking for a static site generator for a multi-lang website, and having already used both fluet-rs and zola, I might be able to trick myself into working on this. However before getting started, I have a few questions, to get a better view of the state of things:

  • Is integrating Fluent into Zola for localization something that is still wanted?
  • Is preliminary work on Tera necessary for that? I see there is an open issue there, but the discussion in it seems to suggest it should not actually be needed to touch it?
  • Is there some consensus about what the resulting integration should look like? (in terms of config / apis / etc...)
  • Where should I look to get started? I'm not familiar with the internals of zola, so a few pointers as to where the relevant logic currently is would be helpful.

@alerque
Copy link
Author

alerque commented Aug 30, 2024

I'm currently looking for a static site generator for a multi-lang website, and having already used both fluet-rs and zola, I might be able to trick myself into working on this.

Can you be bribed with cookies?

Is integrating Fluent into Zola for localization something that is still wanted?

Yes!

Is preliminary work on Tera necessary for that? I see there is an open issue there, but the discussion in it seems to suggest it should not actually be needed to touch it?

I don't know.

Is there some consensus about what the resulting integration should look like? (in terms of config / apis / etc...)

I don't think so, but I'd be happy to participate.

As of a couple months ago, I'm now one of the maintainers on the upstream fluent-rs project and related crates for the low level stuff. I still think it might make sense to use one of the higher level APIs for this project, but for what its work if anything is needed from the Fluent end of things I can help make it happen.

@Keats
Copy link
Collaborator

Keats commented Aug 31, 2024

Is preliminary work on Tera necessary for that? I see there is an open issue there, but the discussion in it seems to suggest it should not actually be needed to touch it?

There's some work in the next version of Tera that will make it easier to use. Eg no need to pass lang=lang to every function/filter call, the Rust code will have access to the context.

I don't think there's a clear consensus on how it should look like. Let's first make sure we agree on how usage should look like before touching the code, maybe a thread in https://zola.discourse.group/ ? This way we can see if something needs to be changed in Tera as well.

As for fluent/MF2, is the end goal to have fluent use MF2 in the long run? Or is it going to be a different crate with a new API?

@elinorbgr
Copy link

I'd gladly take part in the discussions needed to form a consensus about this, but to be honest I don't have the availability to spearhead those discussions, especially given my knowledge of the internals of Zola and Tera is very surface-level.

I'd need to seriously dig into the projects before I could make a sensible starting point for that discussion, and I don't have that kind of time currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@alerque @Keats @heyakyra @elinorbgr @clarfonthey and others