bug-gnu-utils
[Top][All Lists]
Advanced

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

sharutils: internationalization of shar/unshar doesn't work


From: Bruno Haible
Subject: sharutils: internationalization of shar/unshar doesn't work
Date: Tue, 8 May 2001 15:44:10 +0200 (CEST)

The "internationalized" shar scripts produced by GNU sharutils 4.2.1
actually never cause internationalized messages to be printed when
the script is executed by "sh" or "unshar". There are two bugs:

1. The scripts expects a particular format for "gettext --version",
which is not the format being used.

2. The script uses "shar --print-text-domain-dir", but when a --prefix
has been given, the result is always wrong: it prints /usr/share/locale
but should print $prefix/share/locale.

Here is a fix.

2001-05-06  Bruno Haible  <address@hidden>

        * shar.c (generate_configure): Less strict test for GNU gettext.
        (main): For --print-text-domain-dir, output the configured LOCALEDIR,
        not the fallback _nl_default_dirname.

*** sharutils-4.2.1/src/shar.c.bak      Fri Sep 10 21:20:41 1999
--- sharutils-4.2.1/src/shar.c  Sun May  6 16:29:46 2001
***************
*** 477,487 ****
    if test \"$gettext_dir\" = FAILED && test -f $dir/gettext \\\n\
       && ($dir/gettext --version >/dev/null 2>&1)\n\
    then\n\
!     set `$dir/gettext --version 2>&1`\n\
!     if test \"$3\" = GNU\n\
!     then\n\
!       gettext_dir=$dir\n\
!     fi\n\
    fi\n\
    if test \"$locale_dir\" = FAILED && test -f $dir/%s \\\n\
       && ($dir/%s --print-text-domain-dir >/dev/null 2>&1)\n\
--- 477,485 ----
    if test \"$gettext_dir\" = FAILED && test -f $dir/gettext \\\n\
       && ($dir/gettext --version >/dev/null 2>&1)\n\
    then\n\
!     case `$dir/gettext --version 2>&1 | head -1` in\n\
!       *GNU*) gettext_dir=$dir ;;\n\
!     esac\n\
    fi\n\
    if test \"$locale_dir\" = FAILED && test -f $dir/%s \\\n\
       && ($dir/%s --print-text-domain-dir >/dev/null 2>&1)\n\
***************
*** 1965,1972 ****
      || (defined HAVE_GETTEXT && !defined __USE_GNU_GETTEXT)
        exit (EXIT_FAILURE);
  #else
!       extern const char _nl_default_dirname[]; /* Defined in dcgettext.c  */
!       puts (_nl_default_dirname);
        exit (EXIT_SUCCESS);
  #endif
      }
--- 1963,1969 ----
      || (defined HAVE_GETTEXT && !defined __USE_GNU_GETTEXT)
        exit (EXIT_FAILURE);
  #else
!       puts (LOCALEDIR);
        exit (EXIT_SUCCESS);
  #endif
      }



reply via email to

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