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

how to achieve multi-language with exploreV2 #1926

Closed
ujhujuh opened this issue Jan 9, 2017 · 7 comments
Closed

how to achieve multi-language with exploreV2 #1926

ujhujuh opened this issue Jan 9, 2017 · 7 comments

Comments

@ujhujuh
Copy link

ujhujuh commented Jan 9, 2017

Make sure these boxes are checked before submitting your issue - thank you!

  • [ true] I have checked the superset logs for python stacktraces and included it here as text if any
  • [ true] I have reproduced the issue with at least the latest released version of superset
  • [true ] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

15

Expected results

explore V2 Can achieve multi-language

Actual results

can not

Steps to reproduce

@xrmx xrmx added the question label Jan 10, 2017
@ascott
Copy link

ascott commented Jan 11, 2017

We've started moving UI to react/JS and using single page apps for both explore V2 and SQL Lab. Currently we don't have support for translations on the front end, and have yet to come up with a pattern of getting translated strings from the server to the front end.

@mistercrunch
Copy link
Member

One first step is to wrap all the strings on the frontend with something like gettext on the python side, as in _('Translate this string'). I heard webpack can help with extracting the strings, then it'd be a matter of feeding that to [python's] babel somehow. An obvious optimization is to only send the translations needed by the user, I'd guess that webpack can create an entry file for each language.

Unfortunately it's not super high priority for us though, so we probably won't drive this and act more as enablers.

@xrmx
Copy link
Contributor

xrmx commented Jan 19, 2017

@YinghaoPu wrote in #2002:

As I know, superset can translate the words in .html and .py file easily, but the words in .js or .jsx can't be translated. I found a solution in http://www.obviel.org/en/1.0b/i18n.html, and I try it locally, it works. but everytime I merge the newest code from your repository, it takes lots of time. Could you please add this found to your code?

@xrmx
Copy link
Contributor

xrmx commented Jul 5, 2017

Let me link this on how sentry (python + react frontend) does this:
https://blog.sentry.io/2016/01/07/react-i18n

@lxzhangchao
Copy link

lxzhangchao commented Jul 5, 2017

We have done this, and in superset/superset/assets/javascripts/explore/stores added some resource files, the realization of the page of Chinese.Such as the following page.
default

@xrmx
Copy link
Contributor

xrmx commented Jul 5, 2017

@lxzhangchao then open a PR to contribute the work back or i don't see what we are discussing here :)

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 291 days. Feel free to comment and request for this issue to be reopened.

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

No branches or pull requests

5 participants