Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'programmer': 0.03; 'subject:error': 0.03; 'subject:Python': 0.06; 'string': 0.09; 'exception,': 0.09; 'subject:messages': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'translation': 0.12; 'language.': 0.14; 'displaying': 0.16; 'fwiw': 0.16; 'repr()': 0.16; 'str()': 0.16; 'unchanged': 0.16; 'user..': 0.16; 'exception': 0.16; 'language': 0.16; 'wrote:': 0.18; 'library': 0.18; 'obviously': 0.18; 'stack': 0.19; 'user.': 0.19; '(the': 0.22; 'example': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'exists': 0.24; 'string,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'least': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'feature': 0.29; 'said,': 0.30; 'then.': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'exceptions': 0.31; 'portuguese': 0.31; 'request,': 0.31; "user's": 0.31; 'text': 0.33; 'maybe': 0.34; 'could': 0.34; 'something': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'shorter': 0.36; 'method': 0.36; 'shows': 0.36; 'pm,': 0.38; 'rather': 0.38; "you're": 0.61; 'show': 0.63; 'different': 0.65; 'to:addr:gmail.com': 0.65; 'yes': 0.68; 'bothered': 0.68; 'to,': 0.72; 'obvious': 0.74; 'directed': 0.83; 'ps.': 0.84; 'sometimes.': 0.84; 'subject:location': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XcOT4bnO+NaIcoKmSyVjZELDwq/jXBB5eF/F+B3pZA4=; b=flDEYziO960ud6qfRyT2XDdxjU5LynM96RLmCs4T/UCEFkgqTTpWigIyPhTTgKJe/A uhUS1cSPvZulirQH3jvdsZ+QN0biqxaupbn3zOQO7IGUK+mHV7FpNKWcyCyv2RjXDmUk hc5/P/jhZSYZIetZ7cNmS8uH5h0GbDf72CTcbmKZB05u2oxC0qb96PJIh/lWQfDb5Y+1 8RjEpFF6sVJT0UkWMPD3rCU1OKjCZw0pg32U/YcTaIpvoHmdJoTVJKR/pv6GtHkp1YGy UBWXBQF9RT9pGw8Q6ih2TcIN1yeneUr0jpcu2rgRmKOBXbgfvaGCNRJxg9wkmZcd1gKR EOQg== MIME-Version: 1.0 X-Received: by 10.229.153.201 with SMTP id l9mr4534773qcw.125.1369754762061; Tue, 28 May 2013 08:26:02 -0700 (PDT) In-Reply-To: References: <20130527061154.GA3301@cskk.homeip.net> Date: Tue, 28 May 2013 16:26:01 +0100 Subject: Re: Python error codes and messages location From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: Chris Angelico Content-Type: multipart/alternative; boundary=f46d04479f6705cb7104ddc8e260 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 80 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369754770 news.xs4all.nl 15918 [2001:888:2000:d::a6]:58800 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46295 --f46d04479f6705cb7104ddc8e260 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 28 May 2013 09:22, "Chris Angelico" wrote: > > On Tue, May 28, 2013 at 6:10 PM, F=E1bio Santos 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. --f46d04479f6705cb7104ddc8e260 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


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

Yes :) what we don't have is a translation string for ev= ery 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 Obviou= s 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 bothe= red you in any way.

--f46d04479f6705cb7104ddc8e260--