Eric Blake <[EMAIL PROTECTED]> writes:

> So, what should we do about the untranslated strings in xstrtol.h?
> Is it safe to make xstrtol depend on gettext-h, to pull in gettext.h
> in a header?

I think so.  I installed this:

2006-10-19  Paul Eggert  <[EMAIL PROTECTED]>

        * lib/xstrtol.h: Include gettext.h.
        (_STRTOL_ERROR): Wrap English-language formats inside gettext.
        Problem reported by Eric Blake.
        * modules/xstrtol (Depends-on): Add gettext-h.

--- lib/xstrtol.h       21 Aug 2006 06:11:26 -0000      1.21
+++ lib/xstrtol.h       19 Oct 2006 07:48:23 -0000
@@ -24,6 +24,8 @@
 
 # include <inttypes.h>
 
+# include "gettext.h"
+
 # ifndef _STRTOL_ERROR
 enum strtol_error
   {
@@ -57,18 +59,19 @@ _DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
          abort ();                                                     \
                                                                        \
        case LONGINT_INVALID:                                           \
-         error ((Exit_code), 0, "invalid %s `%s'",                     \
+         error ((Exit_code), 0, gettext ("invalid %s `%s'"),           \
                 (Argument_type_string), (Str));                        \
          break;                                                        \
                                                                        \
        case LONGINT_INVALID_SUFFIX_CHAR:                               \
        case LONGINT_INVALID_SUFFIX_CHAR | LONGINT_OVERFLOW:            \
-         error ((Exit_code), 0, "invalid character following %s in `%s'", \
+         error ((Exit_code), 0,                                        \
+                gettext ("invalid character following %s in `%s'"),    \
                 (Argument_type_string), (Str));                        \
          break;                                                        \
                                                                        \
        case LONGINT_OVERFLOW:                                          \
-         error ((Exit_code), 0, "%s `%s' too large",                   \
+         error ((Exit_code), 0, gettext ("%s `%s' too large"),         \
                 (Argument_type_string), (Str));                        \
          break;                                                        \
        }                                                               \
--- modules/xstrtol     13 Oct 2006 12:40:23 -0000      1.15
+++ modules/xstrtol     19 Oct 2006 07:48:23 -0000
@@ -10,6 +10,7 @@ m4/xstrtol.m4
 Depends-on:
 exitfail
 error
+gettext-h
 intprops
 inttypes
 


Reply via email to