Alvaro Herrera <[EMAIL PROTECTED]> writes:
>> What does "really be two messages" mean?

> I mean you should do this:

> if (enabled)
> {
>       if (changed == 1)
>               ereport("One trigger on %s enabled")
>       else
>               ereport("%d triggers on %d enabled")
> }

This isn't really a gain in localizability because it assumes that there
are only singular and plural forms.  I do agree that plugging words like
"enabled" or "disabled" into a string is not good style.  Please read
the message style guidelines at
http://developer.postgresql.org/docs/postgres/error-style-guide.html
particularly the section about writing localization-friendly messages
http://developer.postgresql.org/docs/postgres/nls-programmer.html#NLS-GUIDELINES

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to