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

Provide proper i18n support #856

Closed
jnehlmeier opened this issue Aug 16, 2016 · 15 comments
Closed

Provide proper i18n support #856

jnehlmeier opened this issue Aug 16, 2016 · 15 comments
Labels
community community contribution feature something new

Comments

@jnehlmeier
Copy link

jnehlmeier commented Aug 16, 2016

Currently Plotly has poor i18n support.

Currently I have to manually patch plotly for each release, which is pretty annoying.

@etpinard
Copy link
Contributor

Thanks for writing in.

It shouldn't be too hard to pass these locale options in the plot config and have the axes code look up gd._context for their values.

I added a link to a past issue discussing mode bar internationalisation and I marked #380, #288 as duplicate.

@etpinard etpinard added feature something new community community contribution labels Aug 16, 2016
@sclausen
Copy link

👍 The only thing that keeps us from moving from Highcharts to plotly.js

@etpinard
Copy link
Contributor

@sclausen

us

Who would that be?

@sclausen
Copy link

@etpinard my colleagues and me for one or more of our projects in our company

@florianleger
Copy link

Hi there,
I've made a fork of Plotly.js to handle french translations and d3 locales for my company:
https://github.com/florianleger/plotly.js
(diff)
I explain in the README how it works and how to add new languages, I thought that it might be helpful to others until a patch came out.

@alexcjohnson
Copy link
Collaborator

I believe that between #2195 and #2207 this issue on i18n can be closed - but before I do so, I'd love some 👍 /👎 on the framework from folks who've weighed in here.

I'd also ❤️ if folks who need localization for their own purposes would be willing to PR those back into the main repo - filling in the translations, verifying the date formats, and adding decimal/thousands to the files in lib/locales. The full list of strings we need to translate is in dist/translation_keys.txt. The locale files we have currently are auto-generated from world-calendars which is itself a descendant of https://github.com/kbwood/calendars - but we're certainly happy to accept any other locales you might want to contribute!

@florianleger thanks for pointing out your fork - I did some things the same way, other things differently, but it was very helpful to see what you had done. Does the current master branch of plotly.js work for your purposes now?

@florianleger
Copy link

@alexcjohnson My fork does not work with the last release 1.13.2, there is a lot of conflicts and I've not the time to resolve them now...

@alexcjohnson
Copy link
Collaborator

@florianleger sorry, what I meant was, can you use plotly.js as of the current master branch - which has not yet been published to npm - WITHOUT forking it? I just want to know if the changes in #2195 and #2207 satisfy your needs (and replace your fork) or if there is anything else we need to consider before publishing this.

@JonasGutermuth
Copy link
Contributor

JonasGutermuth commented Dec 19, 2017

Thanks for your work! All my needs seems to be solved

I tried to translate it to German, but I'm not sure how to best translate everything. Please feel free do criticize the translation. Do you think we need an issue to discuss the translations for every language?

https://github.com/JonasGutermuth/plotly.js/blob/master/lib/locales/de.js

@alexcjohnson
Copy link
Collaborator

@JonasGutermuth great!

I think we should handle each translation as a separate PR directly to the main repo:

  • Give the PR the label type: translation (that I just created 😉 )
  • Please @ mention a few other speakers of this language who can help review your translations. If Plotly staff can't review this language we will wait for comments and approval from someone who can.
  • If you've omitted any keys from dist/translation_keys.txt - which means they will fall back on the US English text - just make a short comment about why in the PR description: the English text works fine in your language, or you would like someone else to help translating those, or whatever the reason.
  • And just to be clear, you need only update the files in lib/locales/, not the ones in dist - those will be automatically updated when we build and publish.

@jdugge
Copy link
Contributor

jdugge commented Dec 20, 2017

@JonasGutermuth That looks great! I'd be happy to review the translations once they've been turned into a pull request (there's a couple of typos "Standart" instead of "Standard" or "Componente" instead of "Komponente").

@florianleger
Copy link

@alexcjohnson It's fine with the current master, thanks for your work!

@vinipitta
Copy link

I did fill the dictionary for Brazilian Portuguese. I am not used to work with Git. I did clone the repo and tried to push my changes but looks like I have no permission. Should I be a contributor to be able to do that? I can't find any place to ask to be a contributor or any article about how to do that. Can somebody point me a direction? :)

@etpinard
Copy link
Contributor

@vinipitta https://help.github.com/articles/fork-a-repo/ is a good place to start. Thanks for your contribution!

@etpinard
Copy link
Contributor

Closing. The "to add a translation" instructions are now part of our PR template.

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

No branches or pull requests

8 participants