Re: NLS: use gettext() to translate system error messages

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: NLS: use gettext() to translate system error messages
Дата
Msg-id b2437530dd2df9b4f33a3bd000223bc592e11fae.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: NLS: use gettext() to translate system error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 2025-12-23 at 15:07 -0500, Tom Lane wrote:
> This surprises me, because pg_locale.c sets LC_MESSAGES "for real"
> precisely so that strerror() will see it.

Isn't LC_MESSAGES also necessary for gettext()?

If it's only strerror() we care about, then we could use uselocale()
instead, because the platforms that don't support uselocale() also
don't seem to do translation in strerror(). (I think only glibc
translates through strerror(), though I've seen hints that Solaris may
also.)

Regards,
    Jeff Davis




В списке pgsql-hackers по дате отправления: