From 03326a89415e32ce1a919336abb8730295b8703e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 9 Dec 2024 13:34:51 +0100 Subject: [PATCH] xstrtol-error: Use the translation domain "gnulib". * lib/xstrtol-error.c (_): New macro. (xstrtol_error): Use dgettext() instead of gettext(). * modules/xstrtol-error (Depends-on): Add gnulib-i18n. --- ChangeLog | 5 +++++ lib/xstrtol-error.c | 3 ++- modules/xstrtol-error | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4fb012ec80..54546f10c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2024-12-09 Bruno Haible + xstrtol-error: Use the translation domain "gnulib". + * lib/xstrtol-error.c (_): New macro. + (xstrtol_error): Use dgettext() instead of gettext(). + * modules/xstrtol-error (Depends-on): Add gnulib-i18n. + xprintf: Use the translation domain "gnulib". * lib/xprintf.c (_): New macro. (xvprintf, xvfprintf): Use it instead of gettext(). diff --git a/lib/xstrtol-error.c b/lib/xstrtol-error.c index 16d817a467..68c30d4698 100644 --- a/lib/xstrtol-error.c +++ b/lib/xstrtol-error.c @@ -25,6 +25,7 @@ #include "exitfail.h" #include "gettext.h" +#define _(msgid) dgettext ("gnulib", msgid) #define N_(msgid) msgid /* Report an error for an invalid integer in an option argument. @@ -83,7 +84,7 @@ xstrtol_error (enum strtol_error err, else option = long_options[opt_idx].name; - error (exit_status, 0, gettext (msgid), hyphens, option, arg); + error (exit_status, 0, dgettext ("gnulib", msgid), hyphens, option, arg); } /* Like xstrtol_error, except exit with a failure status. */ diff --git a/modules/xstrtol-error b/modules/xstrtol-error index 9c3da2a5ab..60319acc7f 100644 --- a/modules/xstrtol-error +++ b/modules/xstrtol-error @@ -11,6 +11,7 @@ error exitfail getopt-gnu gettext-h +gnulib-i18n configure.ac: -- 2.39.5