commit 7acad4742ce595aa370b90448b031f0bd6b25c0c
parent f79ee91c075c5ac4c7f629705d28b46cd51c8a58
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Sun, 15 Jun 2025 15:43:21 +0200
po/Makevars: fixed. Added new macro for messages translations.
Diffstat:
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/po/Makevars b/po/Makevars
@@ -12,7 +12,7 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = -k --keyword=mhd_LOG_MSG:3 --keyword=mhd_LOG_FMT
+XGETTEXT_OPTIONS = -k --keyword=mhd_LOG_MSG:3 --keyword=mhd_LOG_FMT --keyword=mhd_STREAM_ABORT:3 --keyword=mhd_MSG4LOG
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
@@ -22,7 +22,7 @@ XGETTEXT_OPTIONS = -k --keyword=mhd_LOG_MSG:3 --keyword=mhd_LOG_FMT
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+COPYRIGHT_HOLDER = Evgeny Grin (Karlson2k), Christian Grothoff (and other contributing authors)
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
diff --git a/src/mhd2/daemon_logger.h b/src/mhd2/daemon_logger.h
@@ -62,6 +62,14 @@ mhd_logger (struct MHD_Daemon *daemon,
#define mhd_LOG_MSG(daemon,sc,msg) mhd_logger (daemon,sc,msg)
/**
+ * Define a message that will be used for logging.
+ * This macro must be used for all log messages defined outside #mhd_LOG_MSG()
+ * macro. For example, when defining a message that passed as a pointer
+ * to the logging function.
+ */
+#define mhd_MSG4LOG(msg) msg
+
+/**
* Format message and log it.
*
* Always use with #mhd_LOG_FMT() for the format string.
@@ -133,6 +141,14 @@ mhd_LOG_PRINT (struct MHD_Daemon *daemon,
#endif /* ! HAVE_MACRO_VARIADIC */
/**
+ * Define a message that will be used for logging.
+ * This macro must be used for all log messages defined outside #mhd_LOG_MSG()
+ * macro. For example, when defining a message that passed as a pointer
+ * to the logging function.
+ */
+#define mhd_MSG4LOG(msg) NULL
+
+/**
* The wrapper macro for the format string to be used for format parameter for
* the #mhd_LOG_FMT() macro
*/