electricitymaps-contrib icon indicating copy to clipboard operation
electricitymaps-contrib copied to clipboard

Add translations to the historical view slider

Open tonypls opened this issue 3 years ago • 11 comments

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

tonypls avatar Sep 26 '22 10:09 tonypls

Hey @tonypls, Can I take this issue ?

Ankitchaudharyy avatar Sep 26 '22 16:09 Ankitchaudharyy

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.

VIKTORVAV99 avatar Sep 26 '22 16:09 VIKTORVAV99

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

jarek avatar Sep 27 '22 02:09 jarek

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 ?

Ankitchaudharyy avatar Sep 29 '22 08:09 Ankitchaudharyy

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.

VIKTORVAV99 avatar Sep 29 '22 09:09 VIKTORVAV99

Will translations from google translate work fine?

Ankitchaudharyy avatar Sep 29 '22 11:09 Ankitchaudharyy

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.

VIKTORVAV99 avatar Sep 29 '22 12:09 VIKTORVAV99

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

jarek avatar Sep 29 '22 12:09 jarek

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

Nivedhitha-dp avatar Nov 07 '24 01:11 Nivedhitha-dp

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

Since this issue includes more than one language and is more of a general thing I'll not assign the whole issue to you but you are more than welcome to work on it.

VIKTORVAV99 avatar Nov 07 '24 08:11 VIKTORVAV99

Hi! I'd like to contribute a translation for Telugu for the "Display data from the past" string. I am fluent in the language and will manually translate it. Will submit a PR shortly!

KandulaSreelekha avatar May 14 '25 07:05 KandulaSreelekha