]> granicus.if.org Git - postgresql/commitdiff
Refactor common gettext triggers
authorPeter Eisentraut <peter_e@gmx.net>
Sun, 26 Jun 2011 20:50:21 +0000 (23:50 +0300)
committerPeter Eisentraut <peter_e@gmx.net>
Sun, 26 Jun 2011 21:04:15 +0000 (00:04 +0300)
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.

src/backend/nls.mk
src/nls-global.mk
src/pl/plperl/nls.mk
src/pl/plpgsql/src/nls.mk
src/pl/plpython/nls.mk
src/pl/tcl/nls.mk

index 8d83c41daf3d9c3f23570490ff31e1f5b294deb2..7672d67090e144a5b5fac495ee568d660a0fc63b 100644 (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
 
index 784e69a8ed079f7a22ee5fb8142550b0144d7170..dda3e29a7a328d55029ff07947d7de912c9f4d12 100644 (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
index 589795cb2b42eb12e068a94c3761e3218eb86343..57846d159fbf09557277a3fdefe12c9795a167ca 100644 (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)
index c21dbe001481bd21855b4c28fb14c6cef6ec26c0..98f25ea7e54ed7250a406752e2a528cc4a49ac9f 100644 (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
index dcdf619ab61b23228fab852041ae7323bbd28f1a..0fdd234ad237f6f7010f9fb9e8ed0dffb9c0fe05 100644 (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
index 941a75857c64795f5b135cee96efba1fd3336bf5..be95c15a04c682c373e05dd49428ac8ceb693d60 100644 (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)