From: Bruno Haible Date: Thu, 25 Jan 2001 14:23:24 +0000 (+0000) Subject: Fix computation of list of catalogs to install. X-Git-Tag: v0.10.36~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc2eb530f1c96dc63c32b45b008cc871cf13e244;p=thirdparty%2Fgettext.git Fix computation of list of catalogs to install. --- diff --git a/m4/ChangeLog b/m4/ChangeLog index 378f903b4..88406db3b 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2001-01-20 Bruno Haible + + * 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 * gettext.m4 (AM_WITH_NLS): Add a third argument to AC_DEFINE. diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 6edd7fa2e..51a2481fd 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -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)