Boost logo

Boost :

Subject: Re: [boost] [locale] Formal review of Boost.Locale librarystartstomorrow
From: Fabio Fracassi (f.fracassi_at_[hidden])
Date: 2011-04-17 10:47:30


On 17/4/2011 16:32, Peter Dimov wrote:
> Artyom wrote:
>> Actually it may be it is better to make boost::locale::format to add
>> something
>> to formatted message like
>>
>> cout << format(translate("Hello World {1}")) % param;
>>
>> The is translate to "bonjour le monde {1" (missed "}"
>>
>> Would print:
>>
>> "[syntax error] bonjour le monde {1"
>
> This is what I do, yes:
>
> bonjour le monde [error: parse error at '{1']
>
> or, for "bonjour le monde {2}":
>
> bonjour le monde [error: argument '2' missing]
>

I'd consider this quite a sensible option, because it is easy to spot
for translators and testers, and if one slips through it doesn't
inconvenience the user too much and he can easily send a conclusive bug
report.

regards

Fabio


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk