OSDN Git Service

Refactor common gettext triggers
[pg-rex/syncrep.git] / src / nls-global.mk
index 32b3c0f..dda3e29 100644 (file)
@@ -6,11 +6,11 @@
 # needs to contain a file 'nls.mk' with the following make variable
 # assignments:
 #
-# CATALOG_NAME         -- name of the message catalog (xxx.po); probably
-#                         name of the program
-# AVAIL_LANGUAGES      -- list of languages that are provided/supported
-# GETTEXT_FILES                -- list of source files that contain message strings
-# GETTEXT_TRIGGERS     -- (optional) list of functions that contain
+# CATALOG_NAME          -- name of the message catalog (xxx.po); probably
+#                          name of the program
+# AVAIL_LANGUAGES       -- list of languages that are provided/supported
+# GETTEXT_FILES         -- list of source files that contain message strings
+# GETTEXT_TRIGGERS      -- (optional) list of functions that contain
 #                          translatable strings
 #
 # That's all, the rest is done here, if --enable-nls was specified.
@@ -39,6 +39,17 @@ ifdef XGETTEXT
 XGETTEXT += -ctranslator --copyright-holder='PostgreSQL Global Development Group' --msgid-bugs-address=pgsql-bugs@postgresql.org
 endif
 
+# _ is defined in c.h, so it's global
+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)