From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgtranslation-translators <pgtranslation-translators(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pgindent messing up "translator: " comments |
Date: | 2011-09-05 19:28:52 |
Message-ID: | 201109051928.p85JSqL11357@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera wrote:
> I just noticed that this comment got reindented by pgindent
> (xlog.c, line 3226 in REL9_1_STABLE):
> /*
> * translator: First %s represents a recovery.conf parameter name like
> * "recovery_end_command", and the 2nd is the value of that parameter.
> */
> ereport((signaled && failOnSignal) ? FATAL : WARNING,
> (errmsg("%s \"%s\": return code %d", commandName,
> command, rc)));
>
> Sure enough, the resulting POT entry does not have the necessary
> comment:
>
> #: /pgsql/source/REL9_1_STABLE/src/backend/access/transam/xlog.c:3230
> #, c-format
> msgid "%s \"%s\": return code %d"
> msgstr ""
>
> 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))));
>
> It seems to me that we should alert if pgindent does anything to a
> comment line containing "translator:".
Well, the comment adjustments happen in the C code, which is hard to
modify. We would need a wrapper that understood when it was in a C
command and add /*--- markers if the word 'translator:' appeared.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-09-05 19:32:01 | Re: memory-related bugs |
Previous Message | Alvaro Herrera | 2011-09-05 19:21:38 | pgindent messing up "translator: " comments |