]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix computation of list of catalogs to install.
authorBruno Haible <bruno@clisp.org>
Thu, 25 Jan 2001 14:23:24 +0000 (14:23 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 25 Jan 2001 14:23:24 +0000 (14:23 +0000)
m4/ChangeLog
m4/gettext.m4

index 378f903b4efcfaaca654e485f65f58dffcbdc7bc..88406db3b56b8dde373879a29e93b735385d8fa3 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Bruno Haible  <haible@clisp.cons.org>
+
+       * gettext.m4 (AM_GNU_GETTEXT): Change computation of NEW_LINGUAS to
+       not include catalogs which are not present. Reported by Fredrik
+       Hallenberg. Also include catalogs of which a variant is requested.
+
 2001-01-20  Bruno Haible  <haible@clisp.cons.org>
 
        * gettext.m4 (AM_WITH_NLS): Add a third argument to AC_DEFINE.
index 6edd7fa2ee630765186f94899efadc4533aff350..51a2481fdb796307600d0338665f888e13adb653 100644 (file)
@@ -212,10 +212,21 @@ __argz_count __argz_stringify __argz_next])
      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
+         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; 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)