Thread: Fully enabling NLS in pg_ctl

Fully enabling NLS in pg_ctl

From
"Serguei A. Mokhov"
Date:
Re-sending since it did not reach the list the first time. My apologies if
the original ever does. (I had a DNS problem with my ISP).

--
Serguei A. Mokhov            |  /~\    The ASCII
Computer Science Department  |  \ / Ribbon Campaign
Concordia University         |   X    Against HTML
Montreal, Quebec, Canada     |  / \      Email!

---------- Forwarded message ----------
Date: Sat, 29 May 2004 22:21:06 -0400
From: Serguei Mokhov <mokhov@cs.concordia.ca>
To: PostgreSQL Patches <pgsql-patches@postgresql.org>
Cc: Peter Eisentraut <peter_e@gmx.net>
Subject: Fully enabling NLS in pg_ctl

Hello,

The attached patch fully enables NLS support
in pg_ctl since we now have pg_ctl in C.

    pg_ctl.diff
        - adds appropriate #ifdef for NLS in pg_ctl.c
        - does a couple of cosmetic fixes in pg_ctl.c and nls-global.mk
          (trailing blanks, formatting)

    pg_ctl.tgz
        - contains new files to be added under /bin/src/pg_ctl
          (nls.mk and initial Russian translation po/ru.po)

Please apply to CVS HEAD if there are no objections.

Thanks,
-s

Attachment

Re: Fully enabling NLS in pg_ctl

From
Bruce Momjian
Date:
I have added the setting of local calls to the top of pg_ctl.c.  I did
not localize ".", nor:

            printf("%s (PostgreSQL) %s\n", progname, PG_VERSION);

This does not change based on locale, and none of our other applications
adjust this for locale.

I do not know how to add the Russian part.  Peter does.

---------------------------------------------------------------------------

Serguei A. Mokhov wrote:
> Re-sending since it did not reach the list the first time. My apologies if
> the original ever does. (I had a DNS problem with my ISP).
>
> --
> Serguei A. Mokhov            |  /~\    The ASCII
> Computer Science Department  |  \ / Ribbon Campaign
> Concordia University         |   X    Against HTML
> Montreal, Quebec, Canada     |  / \      Email!
>
> ---------- Forwarded message ----------
> Date: Sat, 29 May 2004 22:21:06 -0400
> From: Serguei Mokhov <mokhov@cs.concordia.ca>
> To: PostgreSQL Patches <pgsql-patches@postgresql.org>
> Cc: Peter Eisentraut <peter_e@gmx.net>
> Subject: Fully enabling NLS in pg_ctl
>
> Hello,
>
> The attached patch fully enables NLS support
> in pg_ctl since we now have pg_ctl in C.
>
>     pg_ctl.diff
>         - adds appropriate #ifdef for NLS in pg_ctl.c
>         - does a couple of cosmetic fixes in pg_ctl.c and nls-global.mk
>           (trailing blanks, formatting)
>
>     pg_ctl.tgz
>         - contains new files to be added under /bin/src/pg_ctl
>           (nls.mk and initial Russian translation po/ru.po)
>
> Please apply to CVS HEAD if there are no objections.
>
> Thanks,
> -s

Content-Description:

[ Attachment, skipping... ]

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
  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, Pennsylvania 19073

Re: Fully enabling NLS in pg_ctl

From
"Serguei A. Mokhov"
Date:
On Mon, 31 May 2004, Bruce Momjian wrote:

> Date: Mon, 31 May 2004 23:31:42 -0400 (EDT)
>
> I have added the setting of local calls to the top of pg_ctl.c.  I did
> not localize ".", nor:
>
>             printf("%s (PostgreSQL) %s\n", progname, PG_VERSION);
>
> This does not change based on locale, and none of our other applications
> adjust this for locale.

Maybe not the printf() above, but the "." is different in Chinese ;-)
(I'm not arguing for these changes).

> I do not know how to add the Russian part.  Peter does.

Just 'cvs add' nls.mk in the pg_ctl directory. Then create a po/
subdirectory there, 'cvs add' it too, and put the ru.po file in there, and
add that one.

Thank you,

-s


Re: Fully enabling NLS in pg_ctl

From
Bruce Momjian
Date:
OK, I added the nls and po files for pg_ctl.  Thanks.

---------------------------------------------------------------------------

Serguei A. Mokhov wrote:
> Re-sending since it did not reach the list the first time. My apologies if
> the original ever does. (I had a DNS problem with my ISP).
>
> --
> Serguei A. Mokhov            |  /~\    The ASCII
> Computer Science Department  |  \ / Ribbon Campaign
> Concordia University         |   X    Against HTML
> Montreal, Quebec, Canada     |  / \      Email!
>
> ---------- Forwarded message ----------
> Date: Sat, 29 May 2004 22:21:06 -0400
> From: Serguei Mokhov <mokhov@cs.concordia.ca>
> To: PostgreSQL Patches <pgsql-patches@postgresql.org>
> Cc: Peter Eisentraut <peter_e@gmx.net>
> Subject: Fully enabling NLS in pg_ctl
>
> Hello,
>
> The attached patch fully enables NLS support
> in pg_ctl since we now have pg_ctl in C.
>
>     pg_ctl.diff
>         - adds appropriate #ifdef for NLS in pg_ctl.c
>         - does a couple of cosmetic fixes in pg_ctl.c and nls-global.mk
>           (trailing blanks, formatting)
>
>     pg_ctl.tgz
>         - contains new files to be added under /bin/src/pg_ctl
>           (nls.mk and initial Russian translation po/ru.po)
>
> Please apply to CVS HEAD if there are no objections.
>
> Thanks,
> -s

Content-Description:

[ Attachment, skipping... ]

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
  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, Pennsylvania 19073

Re: Fully enabling NLS in pg_ctl

From
"Serguei Mokhov"
Date:
----- Original Message -----
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
Sent: June 09, 2004 10:59 PM


>
> OK, I added the nls and po files for pg_ctl.  Thanks.

Thank you, Bruce. Do you know if Peter is alive?

-s

Re: Fully enabling NLS in pg_ctl

From
"Serguei Mokhov"
Date:
----- Original Message -----
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
Sent: June 09, 2004 10:59 PM

>
> OK, I added the nls and po files for pg_ctl.  Thanks.

Thank you, Bruce. Do you know if Peter is alive? I have
some other NLS patches pending... Those are not
really 'diff -c' patches, but rather complete .po
files, to replace the existing ones. There's one
for initdb [1] and one for the backend [2] (to be
applied to both 7.4 and 7.5 branches). [1] has to be
replace ru.po (just write over) in src/bin/initdb/po/.
[2] should replace ru.po in src/backend/po/ for REL7_4_STABLE
and HEAD. It'd be great if someone could put them in.

[1] http://archives.postgresql.org/pgsql-patches/2004-05/msg00496.php
[2] http://archives.postgresql.org/pgsql-patches/2004-05/msg00497.php

-s

Re: Fully enabling NLS in pg_ctl

From
Bruce Momjian
Date:
Peter says he has your patches and will have them in 7.4.3.

---------------------------------------------------------------------------

Serguei Mokhov wrote:
> ----- Original Message -----
> From: "Bruce Momjian" <pgman@candle.pha.pa.us>
> Sent: June 09, 2004 10:59 PM
>
> >
> > OK, I added the nls and po files for pg_ctl.  Thanks.
>
> Thank you, Bruce. Do you know if Peter is alive? I have
> some other NLS patches pending... Those are not
> really 'diff -c' patches, but rather complete .po
> files, to replace the existing ones. There's one
> for initdb [1] and one for the backend [2] (to be
> applied to both 7.4 and 7.5 branches). [1] has to be
> replace ru.po (just write over) in src/bin/initdb/po/.
> [2] should replace ru.po in src/backend/po/ for REL7_4_STABLE
> and HEAD. It'd be great if someone could put them in.
>
> [1] http://archives.postgresql.org/pgsql-patches/2004-05/msg00496.php
> [2] http://archives.postgresql.org/pgsql-patches/2004-05/msg00497.php
>
> -s
>

--
  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, Pennsylvania 19073

Re: Fully enabling NLS in pg_ctl

From
"Serguei A. Mokhov"
Date:
On Thu, 10 Jun 2004, Bruce Momjian wrote:

> Date: Thu, 10 Jun 2004 09:25:14 -0400 (EDT)
>
> Peter says he has your patches and will have them in 7.4.3.

Cool. Thanks. Will more translation patches be accepted on Friday and
during the weekend before 7.4.3 release?

-s

> ---------------------------------------------------------------------------
>
> Serguei Mokhov wrote:
> > ----- Original Message -----
> > From: "Bruce Momjian" <pgman@candle.pha.pa.us>
> > Sent: June 09, 2004 10:59 PM
> >
> > >
> > > OK, I added the nls and po files for pg_ctl.  Thanks.
> >
> > Thank you, Bruce. Do you know if Peter is alive? I have
> > some other NLS patches pending... Those are not
> > really 'diff -c' patches, but rather complete .po
> > files, to replace the existing ones. There's one
> > for initdb [1] and one for the backend [2] (to be
> > applied to both 7.4 and 7.5 branches). [1] has to be
> > replace ru.po (just write over) in src/bin/initdb/po/.
> > [2] should replace ru.po in src/backend/po/ for REL7_4_STABLE
> > and HEAD. It'd be great if someone could put them in.
> >
> > [1] http://archives.postgresql.org/pgsql-patches/2004-05/msg00496.php
> > [2] http://archives.postgresql.org/pgsql-patches/2004-05/msg00497.php

--
Serguei A. Mokhov            |  /~\    The ASCII
Computer Science Department  |  \ / Ribbon Campaign
Concordia University         |   X    Against HTML
Montreal, Quebec, Canada     |  / \      Email!


Re: Fully enabling NLS in pg_ctl

From
Bruce Momjian
Date:
Serguei A. Mokhov wrote:
> On Thu, 10 Jun 2004, Bruce Momjian wrote:
>
> > Date: Thu, 10 Jun 2004 09:25:14 -0400 (EDT)
> >
> > Peter says he has your patches and will have them in 7.4.3.
>
> Cool. Thanks. Will more translation patches be accepted on Friday and
> during the weekend before 7.4.3 release?

I would think so.

--
  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, Pennsylvania 19073

Re: Fully enabling NLS in pg_ctl

From
Peter Eisentraut
Date:
Serguei A. Mokhov wrote:
> On Thu, 10 Jun 2004, Bruce Momjian wrote:
> > Date: Thu, 10 Jun 2004 09:25:14 -0400 (EDT)
> >
> > Peter says he has your patches and will have them in 7.4.3.
>
> Cool. Thanks. Will more translation patches be accepted on Friday and
> during the weekend before 7.4.3 release?

Bring it on.


Re: Fully enabling NLS in pg_ctl

From
Peter Eisentraut
Date:
Serguei A. Mokhov wrote:
> On Mon, 31 May 2004, Bruce Momjian wrote:
> > Date: Mon, 31 May 2004 23:31:42 -0400 (EDT)
> >
> > I have added the setting of local calls to the top of pg_ctl.c.  I
> > did not localize ".", nor:
> >
> >             printf("%s (PostgreSQL) %s\n", progname, PG_VERSION);
> >
> > This does not change based on locale, and none of our other
> > applications adjust this for locale.
>
> Maybe not the printf() above, but the "." is different in Chinese ;-)
> (I'm not arguing for these changes).

You're right.  Even things like parentheses and colons require
translation in general.  But the version string never changes as a
matter of principle, so that it is machine-readable.


Re: Fully enabling NLS in pg_ctl

From
Peter Eisentraut
Date:
Bruce Momjian wrote:
> OK, I added the nls and po files for pg_ctl.  Thanks.

Looks good at first glance.  I was travelling a lot in recent weeks and
had trouble keeping up.  Thanks for handling it.