Refactor common gettext triggers

Put gettext trigger words that are common to the backend and backend
modules into a makefile variable to include everywhere, to avoid
error-prone repetitions.
This commit is contained in:
Peter Eisentraut 2011-06-26 23:50:21 +03:00
parent e8e2fba1fe
commit 7a5a843a2a
6 changed files with 13 additions and 6 deletions

View File

@ -2,8 +2,7 @@
CATALOG_NAME = postgres
AVAIL_LANGUAGES = de es fr ja pt_BR tr zh_CN zh_TW
GETTEXT_FILES = + gettext-files
GETTEXT_TRIGGERS = errmsg errmsg_plural:1,2 errdetail errdetail_log \
errdetail_plural:1,2 errhint errcontext \
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) \
GUC_check_errmsg GUC_check_errdetail GUC_check_errhint \
write_stderr yyerror parser_yyerror

View File

@ -43,6 +43,14 @@ endif
GETTEXT_TRIGGERS += _
# common settings that apply to backend and all backend modules
BACKEND_COMMON_GETTEXT_TRIGGERS = \
errmsg errmsg_plural:1,2 \
errdetail errdetail_log errdetail_plural:1,2 \
errhint \
errcontext
all-po: $(MO_FILES)
%.mo: %.po

View File

@ -2,4 +2,4 @@
CATALOG_NAME = plperl
AVAIL_LANGUAGES = de es fr it ja pt_BR ro tr zh_CN zh_TW
GETTEXT_FILES = plperl.c SPI.c
GETTEXT_TRIGGERS = errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS)

View File

@ -2,4 +2,4 @@
CATALOG_NAME = plpgsql
AVAIL_LANGUAGES = de es fr it ja ko pt_BR ro zh_CN zh_TW
GETTEXT_FILES = pl_comp.c pl_exec.c pl_gram.c pl_funcs.c pl_handler.c pl_scanner.c
GETTEXT_TRIGGERS = errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext yyerror plpgsql_yyerror
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) yyerror plpgsql_yyerror

View File

@ -2,4 +2,4 @@
CATALOG_NAME = plpython
AVAIL_LANGUAGES = de es fr it ja pt_BR ro tr zh_CN zh_TW
GETTEXT_FILES = plpython.c
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
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) PLy_elog:2 PLy_exception_set:2 PLy_exception_set_plural:2,3

View File

@ -2,4 +2,4 @@
CATALOG_NAME = pltcl
AVAIL_LANGUAGES = de es fr it ja pt_BR ro tr zh_CN zh_TW
GETTEXT_FILES = pltcl.c
GETTEXT_TRIGGERS = errmsg errmsg_plural:1,2 errdetail errdetail_log errdetail_plural:1,2 errhint errcontext
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS)