From: | Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Marc Mamin <M(dot)Mamin(at)intershop(dot)de> |
Subject: | Re: review: psql and pset without any arguments |
Date: | 2013-09-30 09:59:04 |
Message-ID: | 52494B68.8030708@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Le 30/09/2013 05:43, Alvaro Herrera a écrit :
> Gilles Darold escribió:
>
>> + else if (strcmp(param, "numericlocale") == 0)
>> + {
>> + if (popt->topt.numericLocale)
>> + puts(_("Locale-adjusted numeric output (numericlocale) is on."));
>> + else
>> + puts(_("Locale-adjusted numeric output (numericlocale) is off."));
>> + }
> Please don't make the variable name part of the translatable message. I
> suggest using the following pattern:
>
>> + else if (strcmp(param, "numericlocale") == 0)
>> + {
>> + if (popt->topt.numericLocale)
>> + printf(_("Locale-adjusted numeric output (%s) is on."), "numericlocale");
>> + else
>> + printf(_("Locale-adjusted numeric output (%s) is off."), "numericlocale");
>> + }
> Otherwise it will be too easy for the translator to make the mistake
> that the variable name needs translation too.
>
That's right, here is the patch modified with just a little change with
your suggestion:
if (popt->topt.numericLocale)
printf(_("Locale-adjusted numeric output (%s) is
on.\n"), param);
else
printf(_("Locale-adjusted numeric output (%s) is
off.\n"), param);
Thanks
--
Gilles Darold
Administrateur de bases de données
http://dalibo.com - http://dalibo.org
Attachment | Content-Type | Size |
---|---|---|
patch_pset_v3.diff | text/x-patch | 12.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-09-30 10:06:15 | Re: proposal: lob conversion functionality |
Previous Message | David Rowley | 2013-09-30 09:10:56 | Re: appendStringInfo vs appendStringInfoString |