Обсуждение: Where to find translation of Postgres error messages?

Поиск
Список
Период
Сортировка

Where to find translation of Postgres error messages?

От
Együd Csaba
Дата:
Hi,
I'd like to use a Postgres 8 server from different locales (english, german,
hungarian, etc.). I can implement gettext into my client application so the
only thing i'd need (at least I think so) is a .po (or an .mo) file for each
locale.

I looked into Postgres installation directories and found several .mo files
under the locale directory. But I wasn't able to find the string "no
password supplied" for example in neither of them. Where can I obtain a
message translation or at least a gettext template? Are there translations
available for the above mentioned languages?

Many thanks,
  -- Csaba Együd


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.5 - Release Date: 2005.06.07.




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.5 - Release Date: 2005.06.07.


Re: Where to find translation of Postgres error messages?

От
John DeSoi
Дата:
On Jun 8, 2005, at 4:47 AM, Együd Csaba wrote:

> I'd like to use a Postgres 8 server from different locales (english,
> german,
> hungarian, etc.). I can implement gettext into my client application
> so the
> only thing i'd need (at least I think so) is a .po (or an .mo) file
> for each
> locale.
>
> I looked into Postgres installation directories and found several .mo
> files
> under the locale directory. But I wasn't able to find the string "no
> password supplied" for example in neither of them. Where can I obtain a
> message translation or at least a gettext template? Are there
> translations
> available for the above mentioned languages?
>


Download the source and look in the "po" directory for the program you
are interested in. Each language has a .po file. For the backend you
want

src/backend/po

There are translations for German and Hungarian.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: Where to find translation of Postgres error messages?

От
Együd Csaba
Дата:
Hi John,
thank you very much for your suggestion. I downloaded the file (hu.po) and
tried to find the given error message in it (using a text editor) with no
success. There was no e.g. "SQL Error: fe_sendauth: no password supplied"
lines in the po file. A also searched over the de.po and no such lines. I
also tried to search for portions of the message. No result. :(

What should I do?

Regards,
  -- Csaba Együd


-----Original Message-----
From: John DeSoi [mailto:desoi@pgedit.com]
Sent: Wednesday, June 08, 2005 1:45 PM
To: Együd Csaba
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Where to find translation of Postgres error messages?


On Jun 8, 2005, at 4:47 AM, Együd Csaba wrote:

> I'd like to use a Postgres 8 server from different locales (english,
> german, hungarian, etc.). I can implement gettext into my client
> application so the only thing i'd need (at least I think so) is a .po
> (or an .mo) file for each locale.
>
> I looked into Postgres installation directories and found several .mo
> files under the locale directory. But I wasn't able to find the string
> "no password supplied" for example in neither of them. Where can I
> obtain a message translation or at least a gettext template? Are there
> translations available for the above mentioned languages?
>


Download the source and look in the "po" directory for the program you are
interested in. Each language has a .po file. For the backend you want

src/backend/po

There are translations for German and Hungarian.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.5 - Release Date: 2005.06.07.




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.5 - Release Date: 2005.06.07.


Re: Where to find translation of Postgres error messages?

От
John DeSoi
Дата:
On Jun 8, 2005, at 9:12 AM, Együd Csaba wrote:

> thank you very much for your suggestion. I downloaded the file (hu.po)
> and
> tried to find the given error message in it (using a text editor) with
> no
> success. There was no e.g. "SQL Error: fe_sendauth: no password
> supplied"
> lines in the po file. A also searched over the de.po and no such
> lines. I
> also tried to search for portions of the message. No result. :(

Apparently that string is not localized. It is defined in libpq-fe.h:

/* Define the string so all uses are consistent. */
#define PQnoPasswordSupplied    "fe_sendauth: no password supplied\n"


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: Where to find translation of Postgres error messages?

От
Tom Lane
Дата:
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud@vnet.hu> writes:
> I looked into Postgres installation directories and found several .mo files
> under the locale directory. But I wasn't able to find the string "no
> password supplied" for example in neither of them.

I think we deliberately don't localize that one because it'd break
various application-level code that relies on being able to recognize
that string.  (Which is pretty yucky, of course, but until someone
gets around to implementing SQLSTATE error codes for libpq's internal
error reports, there's not a lot of choice.)

            regards, tom lane