Re: review: psql and pset without any arguments
От
Gilles Darold
Тема
Re: review: psql and pset without any arguments
Дата
Msg-id
52494B68.8030708@dalibo.com
Ответ на
Re: review: psql and pset without any arguments (Alvaro Herrera)
Список
Дерево обсуждения
review: psql and pset without any arguments Pavel Stehule <pavel.stehule@gmail.com>
Re: review: psql and pset without any arguments Gilles Darold <gilles.darold@dalibo.com>
Re: review: psql and pset without any arguments Pavel Stehule <pavel.stehule@gmail.com>
Re: review: psql and pset without any arguments Gilles Darold <gilles.darold@dalibo.com>
Re: review: psql and pset without any arguments Alvaro Herrera <alvherre@2ndquadrant.com>
Re: review: psql and pset without any arguments Gilles Darold <gilles.darold@dalibo.com>
Re: review: psql and pset without any arguments Peter Eisentraut <peter_e@gmx.net>
Re: review: psql and pset without any arguments Gilles Darold <gilles.darold@dalibo.com>
Re: review: psql and pset without any arguments Pavel Stehule <pavel.stehule@gmail.com>
Re: review: psql and pset without any arguments Pavel Stehule <pavel.stehule@gmail.com>
Re: review: psql and pset without any arguments Robert Haas <robertmhaas@gmail.com>
Re: review: psql and pset without any arguments Ian Lawrence Barwick <barwick@gmail.com>
Re: review: psql and pset without any arguments Pavel Stehule <pavel.stehule@gmail.com>
Re: review: psql and pset without any arguments Marc Mamin <M.Mamin@intershop.de>
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
В списке pgsql-hackers по дате отправления