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

Add translations to the historical view slider #4604

Open
tonypls opened this issue Sep 26, 2022 · 9 comments
Open

Add translations to the historical view slider #4604

tonypls opened this issue Sep 26, 2022 · 9 comments

Comments

@tonypls
Copy link
Collaborator

tonypls commented Sep 26, 2022

Description

As en Electricity Maps user I want the historical view slider to change language with the language selection menu so that I can understand which time period I am viewing.

Currently the historical view slider mostly shows in English, it would be great to follow the pattern we use for languages accross the map using i18next, more information can be found here

image

@Ankitchaudharyy
Copy link
Contributor

Hey @tonypls, Can I take this issue ?

@VIKTORVAV99
Copy link
Member

Hey @tonypls, Can I take this issue ?

Feel free to translate all languages you feel comfortable with but please avoid using translation services as it can produce weird results without the needed context.

@jarek
Copy link
Collaborator

jarek commented Sep 27, 2022

As I understand it, this only requires adding the translation to time-controller title in web/public/locales/*json to change the "Display data from the past" title. The actual labels for times and dates are localized by the browser. You can see that in your screenshot, or here's another example farther from English - Polish, where the title translation has been added already:

image

image

@Ankitchaudharyy
Copy link
Contributor

VIKTORVAV99, jarek
I could find translation of the phrase "Display data from the past" in these four languages: English, Italiano, Polski, and Svenska.
I need to translate the phrase into the rest of the languages.

How can I translate it? or Which service / module shall I use ?

@VIKTORVAV99
Copy link
Member

VIKTORVAV99, jarek I could find translation of the phrase "Display data from the past" in these four languages: English, Italiano, Polski, and Svenska. I need to translate the phrase into the rest of the languages.

How can I translate it? or Which service / module shall I use ?

Either you manually translate the specific string and edit the file or you can use web/translation-helper.js but it's still a manual translation and I think that will show all un-translated strings for a language.

@Ankitchaudharyy
Copy link
Contributor

Will translations from google translate work fine?

@VIKTORVAV99
Copy link
Member

VIKTORVAV99 commented Sep 29, 2022

Will translations from google translate work fine?

Preferably not since it can produce weird results when it don't have the correct context. Just translate the ones you feel comfortable doing, there is no requirement that you translate them all.

For example:
image

While this translation is not wrong it lacks the necessary context and the manual translation to "Visa historisk data" is more accurate while being short enough to not overflow the text.

@jarek
Copy link
Collaborator

jarek commented Sep 29, 2022

If you don't know the language well please do not translate into it

VIKTORVAV99 pushed a commit that referenced this issue Feb 8, 2023
Part of: Add translations to the historical view slider #4604
ghost pushed a commit that referenced this issue Feb 24, 2023
Part of: Add translations to the historical view slider #4604
@Nivedhitha-dp
Copy link

Hey I think, Tamil one of the most known language in southern part of India should also be considered, as that is one of the important zones of the map (In India).

I can do the translation for Tamil, Kindly assign it to me

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

5 participants