Peter Eisentraut <pete...@gmx.net> writes: > Instead of translating the whole string, that is (picking a shorter > example)
> N_("ALTER TEXT SEARCH PARSER name RENAME TO newname") > we really only want to translate the placeholders, so it could look like > this: > appendPQExpBuffer(buf, > "ALTER TEXT SEARCH PARSER %s RENAME TO %s", > _("name"), > _("newname")); > This is what the attached patch produces. Seems like a reasonable idea. > Comments? I'm not sure what the "const" here is good for, and I can think of some compilers that are likely to get confused too: > + void (* const syntaxfunc)(PQExpBuffer); /* function that prints the > syntax associated with it */ Also, are you sure that code to identify the placeholders is robust? Should you be defending against '%' in the syntax string? Will the NLS infrastructure remember to build sql_help.c before looking for strings? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers