Re: NLS handling fixes.

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, pgsql-hackers@lists.postgresql.org
Date: 2018-08-10T17:30:51Z
Lists: pgsql-hackers
On 2018-Aug-10, Michael Paquier wrote:

> On Fri, Aug 10, 2018 at 03:21:31PM +0900, Kyotaro HORIGUCHI wrote:
> > The cause is GetConfigOptionByNum is forgetting to retrieve
> > translations for texts that have been marked with gettext_noop.
> >
> > Regarding GUCs, group names, short desc and long desc have
> > translations so the attached first patch (fix_GUC_nls.patch) let
> > the translations appear.
> >
> > Besides GUCs, I found another misuse of gettext_noop in
> > pg_GSS_recvauth. (2nd fix_GSSerr_nls.patch)
> >
> > view_query_is_auto_updatable() and most of its caller are making
> > the same mistake in a similar way. All caller sites require only
> > translated message but bringing translated message around doesn't
> > seem good so the attached third patch adds _() to all required
> > places. (3rd fix_view_updt_nls.patch, 5th fix_vacuumdb_nls.patch)
> 
> I have been looking at all the things you are proposing here, and it
> seems to me that you are right for these.  I lack a bit of knowledge
> about the translation of items, but can such things be back-patched?

Well, if I understood correctly, the translations would have the
messages already translated -- the problem is that they are not used at
runtime.  So, yes, this should be backpatched.

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


Commits

  1. Fix set of NLS translation issues