[Python-Dev] Fwd: i18n
Alcino Dall'Igna Jr
adijbr at gmail.com
Wed Aug 25 19:59:44 CEST 2010
To those beginners in programming that are not English speakers there
are 3 problems to be solved:
1) the logic (this is unavoidable)
2) the programming language (hard but quite simple)
3) the messages (hard and not simple)
Those who could not cope with (1) could not be programmers
(2) difficult but not the main (so a 2nd step)
(3) the worst but more treatable and more largely useful
The i18n of (2) is mainly to be used in initial stages and could not
be generally applicable (maybe just some European languages). This
probably could require to rewrote the scanner (or maybe only the
grammar, I haven't gone so deep yet) so it's not that big of a
problem, it hardly affects the parser and interpreter, that are the
more complex tasks.
If (3) could enter the main trunk it would be a great help by itself.
In this case access to international help is useless due the original
difficulties with the language, remember I'm talking about kids
mainly, and 1st stage to programming for youngsters. There are two
main ways to do this, one is using codes as indicated, but I prefer
using the more generally accepted and used, with messages catalogs
using gettext and the like.
Any way thanks for your comments.
Alcino
2010/8/17 Anders Sandvig <anders.sandvig at gmail.com>
>
> On Sat, Aug 14, 2010 at 10:18 AM, Jeroen Ruigrok van der Werven
> <asmodai at in-nomine.org> wrote:
> > I doubt you will be able to localize much with regard to the interpreter.
> > The only thing that really comes to mind are the error and exception
> > messages, but you will never be able to localize the errors themselves. The
> > problem there is that if they seek help on international fora for Python,
> > other people might have no clue what the (error) message even means.
>
> I think one way to solve this might be to include the original
> (English) error message as well as the translation. I've noticed this
> is how error messages are handled in localized versions of Oracle, and
> although I'm personally annoyed by it, I can see how some people might
> find it useful.
>
> For example:
>
> >>> cause.error()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> NameError: name 'cause' is not defined
>
> localized to Norwegian, could become:
>
> >>> cause.error()
> Tilbakesporing (nyeste kall sist):
> Fil "<stdin>", linje 1, i <module>
> NameError: navn 'cause' er ikke definert (name 'cause' is not defined)
>
> I think translating the actual error text would make sense, but I'm
> not so sure about localizing the traceback output itself...
>
>
> Anders
More information about the Python-Dev
mailing list