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

Translate strings which we're sending to the frontend #1213

Open
2 tasks
Cogitri opened this issue Jul 14, 2019 · 2 comments
Open
2 tasks

Translate strings which we're sending to the frontend #1213

Cogitri opened this issue Jul 14, 2019 · 2 comments

Comments

@Cogitri
Copy link
Member

Cogitri commented Jul 14, 2019

It'd be nice if we were to translate strings such as error messages, otherwise frontends have to do that.

From what I can see there are two ways to go about this:

  • Gettext, which would mean that we'd have to depend on a C lib. It's pretty advanced though and has very good support by translation tools, such as Weblate (which I use for Tau).
  • Fluent.rs, which is being used by Firefox already (IIRC?) and is pure Rust. It's in its early days though and isn't well supported in translation tools yet.

We could also just ignore this and leave the translating to the frontends, e.g. in alert frontends can match the error code and send the localized message then.

@cmyr
Copy link
Member

cmyr commented Jul 17, 2019

I would put this in the "one day" category, for now, but yes if core includes any human readable text it would be nice if core also provided localization.

@Cogitri
Copy link
Member Author

Cogitri commented Jul 17, 2019

Well, if we go the gettext route it'd be as easy as adding gettext(<string>) everywhere we have a string we want to translate and initializing gettext when starting xi-core

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

No branches or pull requests

2 participants