-
Notifications
You must be signed in to change notification settings - Fork 5k
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 Chinese translation #2789
Comments
See the README here: https://github.com/jupyter/notebook/tree/master/notebook/i18n The framework is in place, but it's not really being used at present. |
@takluyver I make it work... and may push the zh-CN pot to the poject... |
@takluyver “setup.py extract_messages” need to get character encoding and ...some script to do other things like mkdir... and i think the most complicated thing is translation... |
I don't think the @JCEmmons someone is trying to use the translation machinery you added :-) |
You are correct that setup.py extract_messages is something that I have
not had time to implement. So for the time being you must follow the
manual instructions in the README. Being consumed with other projects, I
doubt whether I would get to it anytime soon, although I would certainly
like to.
Regards,
John C. Emmons
Globalization Architect & Unicode CLDR TC Vice Chairman
IBM Globalization Team
e-mail: [email protected]
From: Thomas Kluyver <[email protected]>
To: jupyter/notebook <[email protected]>
Cc: John Emmons <[email protected]>, Mention
<[email protected]>
Date: 08/22/2017 10:28 AM
Subject: Re: [jupyter/notebook] About i18n (#2789)
I don't think the setup.py extract_messages thing has been implemented, it
looks like that's something the README is talking about adding in the
future.
@JCEmmons someone is trying to use the translation machinery you added :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@takluyver i'm sorry to let you be confused about the implementation of |
No worries! That matches my understanding - Pybabel is a tool for managing translations, but the actual translation work has to be done by humans. Do you want to make a pull request? The code can't actually use your translations yet, but it will be good to have some to test with. |
i build the project in the development way, and find that before using the internationalization function i we should fix two place:
|
@takluyver could i make a pull request to add the translated files to some dir...? |
Yup. The README says this is where to place them:
|
I just merged #2804. Thanks for contributing these translations @jianzi123 and thank you for getting things cleaned up and in working order @takluyver. What do we need to do next in order to actually translate the UI? |
I cannot test the translations in current master. I tried
and
(with current master) but the interface is still in english. What am i doing wrong ? |
There is a still a piece missing to enable the translation in the UI. @takluyver @JCEmmons Can you explain what that piece is? I will gladly work on it 👍 |
Being able to load the translations into the browser without having to transfer every language. I'm planning to work on it soon. |
#2969 is my effort on that front. |
The thing that typically gets missed is adding a line to https://github.com/jupyter/notebook/blob/master/notebook/static/base/js/i18nload.js to define which languages you might want to support. I'm pretty sure that the framework will only load those languages that you need, but this is required in order for the translated UI to work properly. |
I experimented with that, and it appeared that all the translation strings specified like As such, #2969 gets rid of |
The PR was merged, is there anything else to discuss here? |
Yup, this can be closed now. Thanks Damian! |
do setup.py extract_messages, outputs cmd not found...
I just want to know how to use i18n function...
Thanks.
The text was updated successfully, but these errors were encountered: