mirror of https://github.com/postgres/postgres
by extending the ereport() API to cater for pluralization directly. This is better than the original method of calling ngettext outside the elog.c code because (1) it avoids double translation, which wastes cycles and in the worst case could give a wrong result; and (2) it avoids having to use a different coding method in PL code than in the core backend. The client-side uses of ngettext are not touched since neither of these concerns is very pressing in the client environment. Per my proposal of yesterday.REL8_5_ALPHA1_BRANCH
parent
fd416db406
commit
76d4abf2d9
@ -1,5 +1,5 @@ |
||||
# $PostgreSQL: pgsql/src/pl/plperl/nls.mk,v 1.5 2009/05/14 21:41:53 alvherre Exp $
|
||||
# $PostgreSQL: pgsql/src/pl/plperl/nls.mk,v 1.6 2009/06/04 18:33:07 tgl Exp $
|
||||
CATALOG_NAME := plperl
|
||||
AVAIL_LANGUAGES := de es fr pt_BR tr
|
||||
GETTEXT_FILES := plperl.c SPI.c
|
||||
GETTEXT_TRIGGERS:= errmsg errdetail errdetail_log errhint errcontext
|
||||
GETTEXT_TRIGGERS:= errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext
|
||||
|
||||
@ -1,8 +1,8 @@ |
||||
# $PostgreSQL: pgsql/src/pl/plpgsql/src/nls.mk,v 1.7 2009/05/14 21:41:53 alvherre Exp $
|
||||
# $PostgreSQL: pgsql/src/pl/plpgsql/src/nls.mk,v 1.8 2009/06/04 18:33:07 tgl Exp $
|
||||
CATALOG_NAME := plpgsql
|
||||
AVAIL_LANGUAGES := de es fr ja ro tr
|
||||
GETTEXT_FILES := pl_comp.c pl_exec.c pl_gram.c pl_funcs.c pl_handler.c pl_scan.c
|
||||
GETTEXT_TRIGGERS:= _ errmsg errdetail errdetail_log errhint errcontext validate_tupdesc_compat:3 yyerror plpgsql_yyerror
|
||||
GETTEXT_TRIGGERS:= _ errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext validate_tupdesc_compat:3 yyerror plpgsql_yyerror
|
||||
|
||||
.PHONY: gettext-files |
||||
gettext-files: distprep |
||||
|
||||
@ -1,5 +1,5 @@ |
||||
# $PostgreSQL: pgsql/src/pl/plpython/nls.mk,v 1.4 2009/05/14 21:41:53 alvherre Exp $
|
||||
# $PostgreSQL: pgsql/src/pl/plpython/nls.mk,v 1.5 2009/06/04 18:33:08 tgl Exp $
|
||||
CATALOG_NAME := plpython
|
||||
AVAIL_LANGUAGES := de es fr pt_BR tr
|
||||
GETTEXT_FILES := plpython.c
|
||||
GETTEXT_TRIGGERS:= errmsg errdetail errdetail_log errhint errcontext PLy_elog:2 PLy_exception_set:2
|
||||
GETTEXT_TRIGGERS:= errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext PLy_elog:2 PLy_exception_set:2 PLy_exception_set_plural:2,3
|
||||
|
||||
@ -1,5 +1,5 @@ |
||||
# $PostgreSQL: pgsql/src/pl/tcl/nls.mk,v 1.4 2009/05/14 21:41:53 alvherre Exp $
|
||||
# $PostgreSQL: pgsql/src/pl/tcl/nls.mk,v 1.5 2009/06/04 18:33:08 tgl Exp $
|
||||
CATALOG_NAME := pltcl
|
||||
AVAIL_LANGUAGES := de es fr pt_BR tr
|
||||
GETTEXT_FILES := pltcl.c
|
||||
GETTEXT_TRIGGERS:= errmsg errdetail errdetail_log errhint errcontext
|
||||
GETTEXT_TRIGGERS:= errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext
|
||||
|
||||
Loading…
Reference in new issue