Tom Lane writes:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Now back to reality. I think passing in the noun phrase as you suggested
> > should be okay:
>
> I'm happy to do it that way if you prefer, but I'm a tad baffled as to
> why it solves anything other than word-order issues. Seems like the
> inflection issues are still there.
If you put the noun phrase in parenthesis it won't affect the grammar of
the sentence outside.
> > It loses some elegance, but it should allow grammatically sound
> > translations. (Okay, we assume that all languages allow for parenthetical
> > notes, but that is not a matter of grammar.)
>
> What I'm intending is to pass in the noun phrase and the PID, allowing
> the translatable messages in the subroutine to look like
>
> %s (pid %d) exited with status %d
This is not effectively different from what we have now, it only inverses
which part of the sentence gets pasted where.
> A variant would be to pass in the adjective for "process":
>
> %s process (pid %d) exited with status %d
>
> Does that seem better, worse, indifferent? If the inflection issues
> reach to the root noun but not the adjectives, methinks that might
> work better.
Assuming that there will be an adjective in the translation is already
assuming too much.
How about this:
elog(xxx, "whatever process (pid %d) terminated abnormally (%s)", formatExitStatus(exit_status));
where formatExitStatus() returns either of
"exit status 77"
"signal 11"
(Except for the first invocation in CleanupProc, including the word
"abnormally" adds more clarity for the user than trying to format the
numeric details inline.)
I see you already made some changes. Sorry that it took me a while to
respond, but I can make these changes if we can agree.
--
Peter Eisentraut peter_e@gmx.net