Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46295

Re: Python error codes and messages location

References (7 earlier) <ko1asv$tgg$1@ger.gmane.org> <CAA=1kxSmg3r=wL3acL0fFD8E+G1OzPWYySdLco25Ex91oLkfPQ@mail.gmail.com> <CAPTjJmpeq1Wq8-+11eiwZjwnYApHubMeNSBRW3yynFyWNQw87w@mail.gmail.com> <CAA=1kxQHTLe7vwXfSQx_oaFkDJy1wqpdQzu2=BZeGpPNimMPmA@mail.gmail.com> <CAPTjJmopdEXydmO6oGpm0RzoPUPKaX8DBzXvcpOs5sc1uwqH3A@mail.gmail.com>
Date 2013-05-28 16:26 +0100
Subject Re: Python error codes and messages location
From Fábio Santos <fabiosantosart@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2300.1369754770.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 28 May 2013 09:22, "Chris Angelico" <rosuav@gmail.com> wrote:
>
> On Tue, May 28, 2013 at 6:10 PM, Fábio Santos <fabiosantosart@gmail.com>
wrote:
> > Just to clarify, I am suggesting to have the unchanged messages in
> > tracebacks, but having some methods in the exception to get the
exception
> > and message localised. Just like repr() and str() are directed at
different
> > audiences (the programmer vs. The user), so is a traceback vs a message
box.
>
> There's no particular reason for that to be a method on the exception,
> then. You're just asking to localize a text string, and I think that
> functionality already exists someplace :)

Yes :) what we don't have is a translation string for every exception that
Python could raise. Or at least some of them.

> > OpenERP for example shows stack traces to the user. It could show a
shorter
> > message in the user's language.
>
> Sounds like an OpenERP feature request, then.

No, it's just something that OpenERP would obviously do if it had a library
to, or language support :) this could be the One Obvious Way To Do It for
displaying error messages in localised applications.

That said, I'm going to think about this and maybe write a library for
localising exceptions and a portuguese translation pack.

PS. FWIW I'm rather stubborn sometimes. Sorry if I bothered you in any way.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python error codes and messages location Fábio Santos <fabiosantosart@gmail.com> - 2013-05-28 16:26 +0100

csiph-web