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

Matthias BUSSONNIER bussonniermatthias at gmail.com
Wed May 28 11:04:53 EDT 2014


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.
--
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140528/2297220c/attachment.html>


More information about the IPython-dev mailing list