Re: pgindent messing up "translator: " comments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgindent messing up "translator: " comments
Date
Msg-id 13372.1315251812@sss.pgh.pa.us
Whole thread Raw
In response to pgindent messing up "translator: " comments  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgindent messing up "translator: " comments
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I think the proper fix would be to use the /*---- trick, such as in
> postmaster.c:

>         /*------
>           translator: %s is a noun phrase describing a child process, such as
>           "server process" */
>                 (errmsg("%s (PID %d) exited with exit code %d",
>                         procname, pid, WEXITSTATUS(exitstatus))));

Ugh.  Are the gettext tools so broken that they force us to use that
(very ugly IMO) layout for translator: comments?  Why can't we get
the tools fixed instead?

By and large, the people who put in those comments don't know about any
specialized restrictions that gettext might have on the layout of the
comment; the only documentation I've ever seen just says that the
comment has to start with "translator:":
http://developer.postgresql.org/pgdocs/postgres/nls-programmer.html

I think that if gettext can't handle the comment as it stands, that's
a gettext bug, not something that both pgindent and the human code
authors ought to be subservient to.  Or at the very least, I want to see
an exact specification for what the allowed format is, and it had better
not be very magical.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgindent messing up "translator: " comments
Next
From: Jeremy Drake
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge