Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #48954
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| 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; 'argument': 0.05; 'puts': 0.07; 'source.': 0.07; 'string': 0.09; 'deemed': 0.09; 'msg': 0.09; 'separating': 0.09; 'string;': 0.09; 'strings.': 0.09; 'subject:question': 0.10; 'translate': 0.10; 'developer': 0.10; 'wrote': 0.14; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'language?': 0.16; 'simplest': 0.16; 'files.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'file,': 0.19; 'translated': 0.19; 'written': 0.21; '>>>': 0.22; 'separate': 0.22; 'config': 0.24; 'lets': 0.24; 'source': 0.25; 'possibly': 0.26; 'skip:_ 20': 0.27; 'gets': 0.27; 'header:In- Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '(since': 0.31; 'away.': 0.31; 'bunch': 0.31; 'probably': 0.32; 'text': 0.33; 'actual': 0.34; 'johnson': 0.35; 'received:google.com': 0.35; 'located': 0.36; 'really': 0.36; 'done': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'dave': 0.60; 'expression': 0.60; "you're": 0.61; 'costs': 0.63; 'more': 0.64; 'here': 0.66; 'close': 0.67; 'heh.': 0.84; 'penalty': 0.84; 'angel': 0.91; 'rick': 0.93; '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 :content-type; bh=bX/3cxhA0hHrfDZutLnQZb7WaXJ+0kmUPWH7AwzkrFY=; b=SOMzFWPcouBropk9bwZkGQ3fbOlEaKdyLP/91ygmjQ8wYTH65Gc1ighJbNLTI1/0eU AHbcvg7MYM/jN4svfiLT/N142uSVkAmtpqL04MtjEhsC6TbM/knvk8Gpwl7A8KPhjNXd RH+pUIqlsboMw9ukKxaYgyIziCWokMWUdExjC19nCJbtu5VqhWlTRF8PMyH7dAI3u13+ mNfROllsZle36p6f/8/kiOvtbxFp5ovbNkPefyNTDlSfeL4u5Gut63r2ypmxAKPuCNpi 5LcXRLRoorBCZ+43smJ64hSAUTTXrFl186jHULSETkrdQHIxQsEi1JzGTBP7DzKtJPkV MJGA== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.169.146 with SMTP id z18mr8425395vcy.80.1371944253757; Sat, 22 Jun 2013 16:37:33 -0700 (PDT) |
| In-Reply-To | <51C63334.2080805@davea.name> |
| References | <CAJ=2b07ETuSuo2+3Xu6vMOJA+q1JwUFTezO3LaYLG8wXd+FLBQ@mail.gmail.com> <51C4D2FF.8000709@digipen.edu> <mailman.3692.1371908252.3114.python-list@python.org> <51870913-c348-4807-bc25-aa7c8fbf0001@googlegroups.com> <CAPTjJmotX6GWyA_VV3FKvxTMBp2OZT6nOk=1PSvyR6veg1Ek_w@mail.gmail.com> <51C63334.2080805@davea.name> |
| Date | Sun, 23 Jun 2013 09:37:33 +1000 |
| Subject | Re: n00b question on spacing |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3714.1371944261.3114.python-list@python.org> (permalink) |
| Lines | 37 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1371944261 news.xs4all.nl 15901 [2001:888:2000:d::a6]:36921 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:48954 |
Show key headers only | View raw
On Sun, Jun 23, 2013 at 9:28 AM, Dave Angel <davea@davea.name> wrote:
> On 06/22/2013 07:12 PM, Chris Angelico wrote:
>>
>> On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
>> <rantingrickjohnson@gmail.com> wrote:
>>>
>>> _fmtstr = "Item wrote to MongoDB database {0}, {1}"
>>> msg = _fmtstr.format(_arg1, _arg2)
>>
>>
>> As a general rule, I don't like separating format strings and their
>> arguments. That's one of the more annoying costs of i18n. Keep them in
>> a single expression if you possibly can.
>>
>
> On the contrary, i18n should be done with config files. The format string
> is the key to the actual string which is located in the file/dict.
> Otherwise you're shipping separate source files for each language -- blecch.
The simplest way to translate is to localize the format string; that's
the point of .format()'s named argument system (since it lets you
localize in a way that reorders the placeholders). What that does is
it puts the format string away in a config file, while the replaceable
parts are here in the source. That's why I say that's a cost of i18n -
it's a penalty that has to be paid in order to move text strings away.
> The program that's intended to be internationalized is written using
> "programmereze" strings. That's a strange inhuman language that's only
> approximately comprehensible by the developer and close associates. Then
> that gets translated into a bunch of language-specific config files, with
> English probably being one of them.
Heh. That's one way of looking at it... I don't really know what
language we speak; at what point is it deemed a separate dialect, and
at what point a unique language? Hmmm.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: n00b question on spacing Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-22 14:36 +0100
Re: n00b question on spacing Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-22 08:24 -0700
Re: n00b question on spacing Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-22 16:40 +0100
Re: n00b question on spacing Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-22 08:55 -0700
Re: n00b question on spacing Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-22 17:11 +0100
Re: n00b question on spacing Chris Angelico <rosuav@gmail.com> - 2013-06-23 09:12 +1000
Re: n00b question on spacing Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-22 17:48 -0700
Re: n00b question on spacing Chris Angelico <rosuav@gmail.com> - 2013-06-23 12:26 +1000
Re: n00b question on spacing Dave Angel <davea@davea.name> - 2013-06-22 19:28 -0400
Re: n00b question on spacing Chris Angelico <rosuav@gmail.com> - 2013-06-23 09:37 +1000
Re: n00b question on spacing Dave Angel <davea@davea.name> - 2013-06-22 19:56 -0400
Re: n00b question on spacing Chris Angelico <rosuav@gmail.com> - 2013-06-23 10:27 +1000
Re: n00b question on spacing Dave Angel <davea@davea.name> - 2013-06-22 20:46 -0400
Re: n00b question on spacing MRAB <python@mrabarnett.plus.com> - 2013-06-23 02:20 +0100
Re: n00b question on spacing Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-23 02:58 +0000
Re: n00b question on spacing Roy Smith <roy@panix.com> - 2013-06-22 23:12 -0400
Re: n00b question on spacing Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-23 03:22 +0000
Re: n00b question on spacing Chris Angelico <rosuav@gmail.com> - 2013-06-23 13:36 +1000
Re: n00b question on spacing Roy Smith <roy@panix.com> - 2013-06-23 09:43 -0400
Re: n00b question on spacing Chris Angelico <rosuav@gmail.com> - 2013-06-23 14:09 +1000
Re: n00b question on spacing Dave Angel <davea@davea.name> - 2013-06-22 21:35 -0400
Re: n00b question on spacing Terry Reedy <tjreedy@udel.edu> - 2013-06-23 11:40 -0400
csiph-web