-
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
Pull request i18n #2804
Pull request i18n #2804
Conversation
Awesome, thanks! @JCEmmons can you take a look to see if this is arranged as you'd expect? Should the We're just about to release notebook 5.1, so it will be a few days before we can merge this, but hopefully it can go in soon after the release. |
Except adding the translated files, if something else is needed, please let me know, haha. |
Just got back from vacation today, so I will take a look shortly.
Yes. the .mo should be done at build time if possible, as they are object
files, not source.
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/25/2017 07:23 AM
Subject: Re: [jupyter/notebook] Pull request i18n (#2804)
Awesome, thanks! @JCEmmons can you take a look to see if this is arranged
as you'd expect? Should the .mo files be checked in, or should we be
generating those at build time?
We're just about to release notebook 5.1, so it will be a few days before
we can merge this, but hopefully it can go in soon after the release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for your patience - 5.1 is out now, so we can come back to this. I think this PR should only need to add three files:
The Even if this doesn't actually work at the moment, having a set of translations to work with will be really useful for us to figure out the infrastructure to make it work. |
Yes, you are correct.... However, since the translations are simplified
Chinese, you really need only use the language code "zh" to refer to it
instead of "zh-CN". If you were to have traditional Chinese, you would
use language code "zh-Hant"
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: 09/15/2017 09:09 AM
Subject: Re: [jupyter/notebook] Pull request i18n (#2804)
Thanks for your patience - 5.1 is out now, so we can come back to this.
I think this PR should only need to add three files:
notebook/i18n/zh-CN/LC_MESSAGES/nbjs.po
notebook/i18n/zh-CN/LC_MESSAGES/notebook.po
notebook/i18n/zh-CN/LC_MESSAGES/nbui.po
The .mo and .json files should be generated at build time, so they
shouldn't be stored in git. And we shouldn't need the zh_CN.UTF-8 folder:
everything should be UTF-8 anyway, and the code should take care of
loading it correctly.
Even if this doesn't actually work at the moment, having a set of
translations to work with will be really useful for us to figure out the
infrastructure to make it work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm trying to test this with no luck. I tried the following:
@jianzi123 Have you had any luck in testing this? @JCEmmons? |
I don't think the code to load translations is actually in place. We were having some trouble working out how to load the translations early enough, but without requesting all languages. |
@gnestor
@takluyver Asynchronous loading of language files does have some latency, in my project I replace some words in code...
|
Let me give it a try today.....
Regards,
John C. Emmons
Globalization Architect & Unicode CLDR TC Vice Chairman
IBM Globalization Team
e-mail: [email protected]
From: Grant Nestor <[email protected]>
To: jupyter/notebook <[email protected]>
Cc: John Emmons <[email protected]>, Mention
<[email protected]>
Date: 09/15/2017 07:32 PM
Subject: Re: [jupyter/notebook] Pull request i18n (#2804)
I'm trying to test this with no luck. I tried the following:
Based on @JCEmmons suggestion, I renamed the language from "zh_CN" to "zh"
According to the i18n docs in this repo, I added "zh" to
supported_languages in nbjs.json
I added "Chinese [zh]" to the languages in Firefox and moved it to the top
of the list
I ran the notebook server with LANG=zh jupyter notebook --no-browser
@jianzi123 Have you had any luck in testing this? @JCEmmons?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thank you for testing the files I will try to update some files... |
I've cleaned up the files in this PR a bit. Does the structure now look about right? If so, I suggest that we merge this and use it as a base to work out how to load the necessary translations for the UI. If someone other than me hits the button, I'd suggest using the 'squash and merge' option for this PR so that the binary .mo files are not in our repo history. |
I think that we could merge this and fix the details in some version... |
Thanks @takluyver and @jianzi123!! |
add translated files in Chinese.