
17 Apr
2011
17 Apr
'11
2:47 p.m.
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