Re: NLS: use gettext() to translate system error messages - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NLS: use gettext() to translate system error messages
Date
Msg-id 794918.1766521270@sss.pgh.pa.us
Whole thread Raw
In response to Re: NLS: use gettext() to translate system error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> [1] Or at least that's the intent ... but I don't see translation
> happening in HEAD on my Linux box:

Huh ... it works fine on another nearby RHEL machine:

regression=# copy zed from '/etc/shadow';
ERROR:  no se pudo abrir archivo «/etc/shadow» para lectura: Permiso denegado
HINT:  COPY FROM indica al proceso servidor de PostgreSQL leer un archivo. Puede desear usar una facilidad del lado del
clientecomo \copy de psql. 

But poking a little harder, the same behavior applies in other
programs:

RHEL8 box:

$ LANG=es_ES.utf8 sed 's/x/y/' /etc/shadow
sed: no se puede leer /etc/shadow: Permission denied

RHEL9 box:

$ LANG=es_ES.utf8 sed 's/x/y/' /etc/shadow
sed: no se puede leer /etc/shadow: Permiso denegado

Surely RHEL8 does not pre-date glibc's ability to translate messages.
I suspect I have some system-wide setting for this, or maybe a
missing package on that machine?  But anyway, I think this reinforces
my point that we should (and do) act similarly to other programs.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Remaining dependency on setlocale()
Next
From: Bruce Momjian
Date:
Subject: Re: Periodic authorization expiration checks using GoAway message