X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=bootstrap;h=a08742e39245a56fd6afe4e60138a6ee83cbee77;hb=c732eb584ec0b3dc2e4ab01e5b7276a701a2d523;hp=b54810c0b308f275720e1a372ba66196f484566a;hpb=0680ad4d42e23f09d19b464143f8f2d0127d88cd;p=chaz%2Ftar diff --git a/bootstrap b/bootstrap index b54810c..a08742e 100755 --- a/bootstrap +++ b/bootstrap @@ -109,7 +109,10 @@ get_translations() { po_file=$3 echo "$0: getting translations into $subdir for $domain..." - (cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`) && + + case $po_file in + '') (cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`);; + esac && $WGET_COMMAND -O "$subdir/$domain.html" "$TP_URL$domain" && @@ -123,11 +126,11 @@ get_translations() { awk -v domain="$domain" -v po_file="$po_file" -v subdir="$subdir" ' { lang = $1 - if (po_file == (lang ".po")) next + if (po_file && po_file != (lang ".po")) next # Work around bugs in translations uncovered by gettext 0.15. # This workaround can be removed once the translations are fixed. - if (lang == "hu" || lang == "ja" || lang == "ky" || lang == "zh_TW") next + if (lang == "hu" || lang == "ky" || lang == "zh_TW") next ver = $2 urlfmt = "" @@ -146,10 +149,7 @@ update_po() { *.po) POFILE=$1;; *) POFILE=${1}.po;; esac - get_translations po $package "$POFILE" && - LANG=`expr $POFILE : '\(.*\)\.po'` && - { grep -q $LANG po/LINGUAS || - (echo $LANG; cat po/LINGUAS) | sort -o po/LINGUAS; } + get_translations po $package "$POFILE" else get_translations po $package fi