<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 28, 2014 at 11:04 AM, Matthias BUSSONNIER <span dir="ltr"><<a href="mailto:bussonniermatthias@gmail.com" target="_blank">bussonniermatthias@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Ozan, </div><div><br></div><div>Internationalization is a complex process and  by lack of manpower we default </div>
<div>to not doing any work on this side (not that any of us are not native english speaker).</div><div>This mean that we haven't really looked into the way of doing that both on python side</div><div>and javacript side. </div>
<div><br></div><div>You seem to be already more aware of the tool existing so any input in what is</div><div>possible/necessary is appreciated and can be made part of a pull request. </div><div>If you prefer you can even send a PR for the pure python side, and one for the js side, </div>
<div>that is up to you. </div><div><br></div><div>As Fernando said, we have nothing against including the necessary infrastructure</div><div>to help translation as long as it stays a relatively-low overhead for our development. </div>
<div>I suppose we can even find ways to have separate python packages for translation </div><div>that can be maintained orthogonally as the Main IPython project. </div><div><br></div><div>Le 28 mai 2014 à 16:44, Ozan Çağlayan a écrit :</div>
<div><div class=""><br><blockquote type="cite"><div>Hi,<br><br>Well I prepared a branch out of the current master to test what I've<br>done yesterday and I noticed a (big?) problem: There are UI strings in<br>.js files too. Well this is annoying as client-side JS can't access<br>
the binary gettext catalogs.</div></blockquote><br><blockquote type="cite"><div> There are libraries like Jed for JS<br>translation with which you convert the translated gettext catalogs to<br>json and embed the translations inside a js file which is loaded<br>
during runtime.<br></div></blockquote><div><br></div></div><div>We do ship require.js, there is a plugin i suppose we can ship the extension to require json file. </div><div>Though it will require some refactoring of or library to use require.js, but they will be done eventually.</div>
<div>if it is easier to just have a templated include in the html template, then just go with it, </div><div>I think as a first step, having to restart the server to change lang is not such a big deal.  </div><div class="">
<div><br></div><br><blockquote type="cite"><div>What do you think? Is there a way to provide those strings in html<br>templates or was it mandatory to have them in .js code? An example is<br>the tour.js for example. Or modal dialogs from savewidget.js<br>
</div></blockquote><div><br></div></div><div>What I would suggest is to do a pull request with what you have now,</div><div>then post a link here. People that are interested can join the PR</div><div>and it is alway easier to discuss on concrete example, comment on code, </div>
<div>and iterate over it  than to argue on abstract ideas. Especially if you already </div><div>have something in your sleeves.</div></div></div></blockquote><div><br></div><div>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! </div>
<div><br></div><div>Having worked on other open source projects that allow other languages, some things we all might consider:</div><div><br></div><div>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.</div>
<div><br></div><div>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 dynamically.</div>
<div><br></div><div>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.</div>
<div><br></div><div>4) Windows may be the trickiest environment to work with gettext, but it can be done.</div><div><br></div><div>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 dependencies.</div>
<div><br></div><div>-Doug<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>--</div><div>
M </div><div><a href="http://requirejs.org/docs/api.html#i18n" target="_blank">http://requirejs.org/docs/api.html#i18n</a></div><div class=""><div><br></div><div><br></div><br><blockquote type="cite"><div><br>Thanks!<br>_______________________________________________<br>
IPython-dev mailing list<br><a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br><a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></blockquote></div></div><br></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div></div>