[IPython-dev] Internationalisation and creating domain specific Help items

Doug Blank doug.blank at gmail.com
Wed May 28 11:30:22 EDT 2014

On Wed, May 28, 2014 at 11:04 AM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

> Hi Ozan,
> Internationalization is a complex process and  by lack of manpower we
> default
> to not doing any work on this side (not that any of us are not native
> english speaker).
> This mean that we haven't really looked into the way of doing that both on
> python side
> and javacript side.
> You seem to be already more aware of the tool existing so any input in
> what is
> possible/necessary is appreciated and can be made part of a pull request.
> If you prefer you can even send a PR for the pure python side, and one for
> the js side,
> that is up to you.
> As Fernando said, we have nothing against including the necessary
> infrastructure
> to help translation as long as it stays a relatively-low overhead for our
> development.
> I suppose we can even find ways to have separate python packages for
> translation
> that can be maintained orthogonally as the Main IPython project.
> Le 28 mai 2014 à 16:44, Ozan Çağlayan a écrit :
> Hi,
> Well I prepared a branch out of the current master to test what I've
> done yesterday and I noticed a (big?) problem: There are UI strings in
> .js files too. Well this is annoying as client-side JS can't access
> the binary gettext catalogs.
> There are libraries like Jed for JS
> translation with which you convert the translated gettext catalogs to
> json and embed the translations inside a js file which is loaded
> during runtime.
> We do ship require.js, there is a plugin i suppose we can ship the
> extension to require json file.
> Though it will require some refactoring of or library to use require.js,
> but they will be done eventually.
> if it is easier to just have a templated include in the html template,
> then just go with it,
> I think as a first step, having to restart the server to change lang is
> not such a big deal.
> What do you think? Is there a way to provide those strings in html
> templates or was it mandatory to have them in .js code? An example is
> the tour.js for example. Or modal dialogs from savewidget.js
> What I would suggest is to do a pull request with what you have now,
> then post a link here. People that are interested can join the PR
> and it is alway easier to discuss on concrete example, comment on code,
> and iterate over it  than to argue on abstract ideas. Especially if you
> already
> have something in your sleeves.

I am also interested in making the IPython infrastructure work with
multiple human languages and cultures (internationalization I18n, and
localization l10n). Glad to see the work on this front!

Having worked on other open source projects that allow other languages,
some things we all might consider:

1) gettext is the most widely used system in the open source world, and has
countless tools and support for extracting text, and allowing different
languages to be packaged up by external translators. It is also very fast,
as it caches translations.

2) It can be a little tricky with gettext, but it is possible to change
languages on the fly, or to have different notebooks in different
languages, for example. Getting it to work with a single, static language
can be a good first step, but many users will no doubt want to change more

3) I think that there are four components of an IPython system that may
need three methods: HTML, JavaScript, the server, and the kernel. Remember
that the decimal place separation, and dates can change syntactical format,
in addition to just changing text. Also, there are other kernels beyond
CPython, which might change even more in a different language context.

4) Windows may be the trickiest environment to work with gettext, but it
can be done.

5) This is a fairly well-known problem, although IPython has some unique
issues. It might be good to discuss the overall design and proposed


> --
> M
> http://requirejs.org/docs/api.html#i18n
> Thanks!
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140528/58a50f5d/attachment.html>

More information about the IPython-dev mailing list