Thread: Fix for NLS in pgport

Fix for NLS in pgport

From
Bruce Momjian
Date:
I saw Peter's commit to allow NLS lookups from libpgport functions. 
Here is the change to pg_ctl/nls.mk:< GETTEXT_FILES := pg_ctl.c> GETTEXT_FILES := pg_ctl.c ../../port/exec.c

Peter, do you have to know the C file used by pg_ctl to make these
adjustments?  This seems pretty hard to do and maintain.  Do your tools
do checks to make sure all the nls.mk files are properly modified?  Is
there a cleaner way to do this like putting all the strings in single C
file and including that somehow?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: Fix for NLS in pgport

From
Peter Eisentraut
Date:
Bruce Momjian wrote:
> I saw Peter's commit to allow NLS lookups from libpgport functions.
> Here is the change to pg_ctl/nls.mk:
>
>  < GETTEXT_FILES := pg_ctl.c
>
>  > GETTEXT_FILES := pg_ctl.c ../../port/exec.c
>
> Peter, do you have to know the C file used by pg_ctl to make these
> adjustments?

Yes.

> This seems pretty hard to do and maintain.

True, but it's only a workaround that gets the job done without moving 
around too much code at this point.  Clearly, this will have to be 
revisited later.

> Do your  
> tools do checks to make sure all the nls.mk files are properly
> modified?  Is there a cleaner way to do this like putting all the
> strings in single C file and including that somehow?

I don't think that will make it substantially better.  In fact, putting 
everything in one file would create more useless work for translators.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/