flexmeasures icon indicating copy to clipboard operation
flexmeasures copied to clipboard

i18n

Open joyshmitz opened this issue 2 years ago • 13 comments

internationalization is provided, if so, how to carry it out correctly?

joyshmitz avatar Jul 13 '22 10:07 joyshmitz

Not provided yet, but a great idea to do, of course!

I'm assuming you are referring to the UI right?

It is pretty straightforward, using Flask-Babel, explained here or here.

After getting Flask-Babel to work, the bigger part of the work is to go through templates and views, and replacing text with a translation function. Also, we'd like to have a language switcher in the menu.

Then, creating translations. Which language would you like to add? We would like to add Dutch and German.

nhoening avatar Jul 13 '22 15:07 nhoening

That's right, UI Thanks for the tip, I'll try Flask With Dutch and German using a translator, and I think that the technical editor is extremely important, to convey the nuances of the application, і will translate into Ukrainian and Russian

joyshmitz avatar Jul 14 '22 07:07 joyshmitz

Awesome, if you open a PR I will help you along the way.

I speak German and Dutch very well, so I will provide those translations.

nhoening avatar Jul 14 '22 07:07 nhoening

ok It will take some time, and I plan on i18n and l10n, right?

joyshmitz avatar Jul 14 '22 08:07 joyshmitz

Sounds good. l10n really is the smaller part here, making a good guess at the user's preferred language from their browser settings, right?

We can add a language selector in a different PR.

nhoening avatar Jul 14 '22 08:07 nhoening

As I said, don't hesitate asking me to help/review on the way!

nhoening avatar Jul 14 '22 08:07 nhoening

Sounds good. l10n really is the smaller part here, making a good guess at the user's preferred language from their browser settings, right?

what about cli?

joyshmitz avatar Jul 14 '22 09:07 joyshmitz

My first thought is that the audience for UI and CLI is maybe not the same, but maybe I'm not correct. I can imagine there might be engineers working with FlexMeasures who are not good at English and are using the CLI.

There is a lot of command documentation in there, so longer strings.

Maybe do one thing after another, and plan CLI for another PR?

There is also the FlexMeasures documentation, but there I'd definitely stop :)

nhoening avatar Jul 14 '22 09:07 nhoening

You are right, there is no limit to perfection,

so, one piece at a time

joyshmitz avatar Jul 14 '22 16:07 joyshmitz

@joyshmitz Is this still relevant for your side?

nhoening avatar Mar 31 '23 10:03 nhoening

@nhoening yes, it's time to find reasons why not to do it, the opportunity will appear on April 10. Nothing has changed since then?

joyshmitz avatar Apr 07 '23 02:04 joyshmitz

Great to hear. Nothing has changed. In #579 I upgraded dependencies, also babel is at the latest version.

nhoening avatar Apr 07 '23 08:04 nhoening

We listed a few things here which could use translation, and decided to do others in other PRs. To that I'd add emails. There are not many, mostly around account setup (e.g. password change) and monitoring. Once work starts here, I'll make a Github project so we can start tracking all of these and discuss which are actually needed.

nhoening avatar Apr 07 '23 12:04 nhoening