Re: review: psql and pset without any arguments - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: review: psql and pset without any arguments
Date
Msg-id 20130930034333.GB5235@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: review: psql and pset without any arguments  (Gilles Darold <gilles.darold@dalibo.com>)
Responses Re: review: psql and pset without any arguments
List pgsql-hackers
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.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pgbench filler columns
Next
From: Fujii Masao
Date:
Subject: Re: Compression of full-page-writes