cloud icon indicating copy to clipboard operation
cloud copied to clipboard

Internationalization

Open airon90 opened this issue 10 years ago • 16 comments

Is it possible to translate Sage?

airon90 avatar Nov 15 '14 12:11 airon90

There are some efforts to at least translate the tutorial into other languages. You should ask about this at the Sage mailing lists, not here.

haraldschilly avatar Nov 15 '14 12:11 haraldschilly

Thank you very much for your answer! I'll write on ML ASAP :)

airon90 avatar Dec 06 '14 18:12 airon90

Nonetheless this is a valid ticket, if someone can change the title a bit. For instance, the Sage notebook https://github.com/sagemath/sagenb/blob/master/sagenb/babel.cfg has support for internationalization, and several localizations. The Sage Math Cloud should have the same. @williamstein :smiley: What mechanism would be best?

kcrisman avatar Dec 15 '14 16:12 kcrisman

On Mon, Dec 15, 2014 at 8:52 AM, kcrisman [email protected] wrote:

Nonetheless this is a valid ticket, if someone can change the title a bit. For instance, the Sage notebook https://github.com/sagemath/sagenb/blob/master/sagenb/babel.cfg has support for internationalization, and several localizations. The Sage Math Cloud should have the same. @williamstein https://github.com/williamstein [image: :smiley:] What mechanism would be best?

I don't know yet.

Reply to this email directly or view it on GitHub https://github.com/sagemath/cloud/issues/180#issuecomment-67025179.

William Stein Professor of Mathematics University of Washington http://wstein.org

williamstein avatar Dec 15 '14 16:12 williamstein

In particular, is SMC Python-based enough that one could just use Babel, or not? Really it's just a matter of putting all the strings in views (and controllers?) in the gettext or the usual lazy _() wrapper, in that case. I am guessing there are quite similar mechanisms for other situations.

kcrisman avatar Dec 15 '14 17:12 kcrisman

E.g. https://github.com/sagemath/sagenb/commit/a11b6f6b9b2049dd22a25b7c4f8e246606075331

kcrisman avatar Dec 15 '14 17:12 kcrisman

BTW, maybe you can change this ticket name to "internationalization".

kcrisman avatar Dec 15 '14 17:12 kcrisman

  • William Stein (cell phone) On Dec 15, 2014 9:07 AM, "kcrisman" [email protected] wrote:

    In particular, is SMC Python-based enough that one could just use Babel, or not?

SMC is very much not python based.

Really it's just a matter of putting all the strings in views (and controllers?) in the gettext or the usual lazy _() wrapper, in that case. I am guessing there are quite similar mechanisms for other situations.

Reply to this email directly or view it on GitHub.

williamstein avatar Dec 15 '14 17:12 williamstein

Hmm, okay, so then not that per se. Looking at https://github.com/sagemath/cloud/blob/master/page/course.html and friends it looks like it's the Coffeescript that is doing the control, then? Maybe https://github.com/andyearnshaw/Intl.js would be useful... Anyway, definitely important to bake in if possible.

kcrisman avatar Dec 15 '14 17:12 kcrisman

@kcrisman actually this does need all of this. all static front-end html pages need to be produced based on translation files and the back-end needs a key-value lookup table, which knows the user's language from the settings. What's actually necessary are good translation files, which are used by the existing tool-chains for this, and can be parsed from python and node.js (server side).

haraldschilly avatar Dec 15 '14 18:12 haraldschilly

Hello, what format these translation files should have? I'm ready to create text translation files.

AndreWin avatar Jan 08 '15 12:01 AndreWin

@AndreWin we haven't surveyed and decided which system we'll use. So, this will take some time. (besides that, the first huge step is to extract all the tokens)

haraldschilly avatar Jan 08 '15 13:01 haraldschilly

@haraldschilly - just for reference on this ticket, what are some of the possible players?

Also, maybe a separate ticket could be to find all translatable strings, and then have a way to (easily) update them, given the (very!) rapid pace of SMC adding features. But it would be unfortunate to wait until SMC 'settles down' to do this, when it might be harder to do this.

kcrisman avatar Jan 08 '15 13:01 kcrisman

@kcrisman honestly, I personally have no idea. I assume the next best one which satisfies these three requirements is fine:

  • supported by those online-translation tools, that helps to gather translations from users. e.g. how does ubuntu do it for it's applications? i think they do it online.
  • text based, such that we can edit it inside SMC
  • libraries for node.js and python (but doesn't need to be, parsing textfiles shouldn't be a problem)

haraldschilly avatar Jan 08 '15 19:01 haraldschilly

Hi! Is this way (internationalization using CSS) good?

AndreWin avatar Jan 19 '15 20:01 AndreWin

There is society of people who translate open source projects: https://translatewiki.net/

AndreWin avatar Feb 23 '15 18:02 AndreWin