[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] Re: getopt depending on gettext

From: Bruno Haible
Subject: [bug-gnulib] Re: getopt depending on gettext
Date: Tue, 31 May 2005 12:53:38 +0200
User-agent: KMail/1.5

Werner LEMBERG wrote:
> I think it is a *bad* idea to make getopt depend on gettext
> unconditionally.  I suggest a patch similar to the one below.
> --- getopt.c.orig     2005-05-14 09:15:14.000000000 +0200
> +++ getopt.c  2005-05-30 15:27:01.578335784 +0200
> @@ -50,8 +50,12 @@
>  #ifdef _LIBC
>  # include <libintl.h>
>  #else
> -# include "gettext.h"
> -# define _(msgid) gettext (msgid)
> +# ifdef NO_GETTEXT
> +#  define _(msgid) (msgid)
> +# else
> +#  include "gettext.h"
> +#  define _(msgid) gettext (msgid)
> +# endif
>  #endif
>  #if defined _LIBC && defined USE_IN_LIBIO

I object against this kind of patch, because:

  - getopt is about the command-line interface of programs. It is
    immediately visible to the users. Internationalization is necessary
    here. (Remember that half of Japan's computer users don't know
    English, and similarly for China.)

  - For programs that really don't want internationalization, you can
    add a file gettext.h in your source tree containing merely
         #define gettext(s) s
    And then you pass the --avoid=gettext option to gnulib-tool.
    (Option --avoid cuts a dependency during gnulib-tools' dependency
    analysis. It has been requested many times. Any volunteer for implementing


reply via email to

[Prev in Thread] Current Thread [Next in Thread]