- if [ $n -gt 0 ]; then
- echo "TODO for translation $X:"
- echo "Untranslated: $nu (was: $nu0)"
- echo "Fuzzy: $nf (was: $nf0)"
- ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
- ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
- echo "Translators: $ltr, $ltm"
- case "$ltr" in
- '')
- to=$ltm
+ msgcat -F --use-first "$Y" "$X" > "$X".new
+ mv "$X".new "$X"
+ changed=true
+ done
+ ne0=$ne
+ nu0=$nu
+ nf0=$nf
+ if $changed; then
+ msgfmt -o /dev/null --check-format --check-header --use-fuzzy "$X" 2>&1 \
+ | grep . > "$X".errors || rm -f "$X".errors
+ msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
+ msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
+ ne=$((`wc -l < "$X".errors 2>/dev/null` + 0))
+ nu=$((`grep -c ^#: "$X".untranslated 2>/dev/null` + 0))
+ nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
+ n=$(($ne + $nu + $nf))
+ fi
+ if [ $n -gt 0 ]; then
+ echo "TODO for translation $X:"
+ echo "Errors: $ne (was: $ne0)"
+ echo "Untranslated: $nu (was: $nu0)"
+ echo "Fuzzy: $nf (was: $nf0)"
+ ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
+ ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
+ echo "Translators: $ltr, $ltm"
+ case "$ltr" in
+ '')
+ to=$ltm
+ cc=
+ ;;
+ *)
+ to=$ltr
+ if [ x"$ltr" = x"$ltm" ]; then