Backport better handling of ALL_LINGUAS from gettext.m4. (#103808, Andras
authorOwen Taylor <otaylor@redhat.com>
Fri, 30 May 2003 23:13:55 +0000 (23:13 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 30 May 2003 23:13:55 +0000 (23:13 +0000)
Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>

        * m4macros/glib-gettext.m4: Backport better handling
        of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
m4macros/glib-gettext.m4

index 4450fb2..d4830d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * m4macros/glib-gettext.m4: Backport better handling
+       of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)
+
 Fri May 30 18:46:05 2003  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: expand $exec_prefix as
index 4450fb2..d4830d4 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * m4macros/glib-gettext.m4: Backport better handling
+       of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)
+
 Fri May 30 18:46:05 2003  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: expand $exec_prefix as
index 4450fb2..d4830d4 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * m4macros/glib-gettext.m4: Backport better handling
+       of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)
+
 Fri May 30 18:46:05 2003  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: expand $exec_prefix as
index 4450fb2..d4830d4 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * m4macros/glib-gettext.m4: Backport better handling
+       of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)
+
 Fri May 30 18:46:05 2003  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: expand $exec_prefix as
index 4450fb2..d4830d4 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * m4macros/glib-gettext.m4: Backport better handling
+       of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)
+
 Fri May 30 18:46:05 2003  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: expand $exec_prefix as
index 4450fb2..d4830d4 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 30 19:09:25 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * m4macros/glib-gettext.m4: Backport better handling
+       of ALL_LINGUAS from gettext.m4. (#103808, Andras Salamon)
+
 Fri May 30 18:46:05 2003  Owen Taylor  <otaylor@redhat.com>
 
        * m4macros/glib-gettext.m4: expand $exec_prefix as
index add13da..488de21 100644 (file)
@@ -1,3 +1,16 @@
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
 # Macro to add for using GNU gettext.
 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 #
@@ -7,10 +20,8 @@
 # Major rework to remove unused code
 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
 #
-# This file can be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-#
+# Added better handling of ALL_LINGUAS from GNU gettext version 
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
 #
 # We need this here as well, since someone might use autoconf-2.5x
@@ -260,10 +271,26 @@ glib_DEFUN(GLIB_GNU_GETTEXT,
      else
        AC_MSG_CHECKING(for catalogs to be installed)
        NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+          # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
        done
        LINGUAS=$NEW_LINGUAS
        AC_MSG_RESULT($LINGUAS)