]> Savannah Git Hosting - gnulib.git/commitdiff
xstrtol-error: Use the translation domain "gnulib".
authorBruno Haible <bruno@clisp.org>
Mon, 9 Dec 2024 12:34:51 +0000 (13:34 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Dec 2024 12:34:51 +0000 (13:34 +0100)
* lib/xstrtol-error.c (_): New macro.
(xstrtol_error): Use dgettext() instead of gettext().
* modules/xstrtol-error (Depends-on): Add gnulib-i18n.

ChangeLog
lib/xstrtol-error.c
modules/xstrtol-error

index 4fb012ec80738b16fb7cd9f8fd810cd8b3a62454..54546f10c9ec4e74c8ba22acf4b59cded4682983 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2024-12-09  Bruno Haible  <bruno@clisp.org>
 
+       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().
index 16d817a467c77338907590122046ee229c9401b0..68c30d469840e1f92075adfdb9f642b08d263a01 100644 (file)
@@ -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.  */
index 9c3da2a5ab27b1def083ba5dd564d84e399447b9..60319acc7f2833fcb15bc0bdee184cef55d567c0 100644 (file)
@@ -11,6 +11,7 @@ error
 exitfail
 getopt-gnu
 gettext-h
+gnulib-i18n
 
 configure.ac: