Fix common_translation_update

Use "git rm -f" to force removal. We might have files that were changed by
the previous steps and then "git rm" will fail with:
$ git rm heat/locale/fr/LC_MESSAGES/heat-log-warning.po
error: 'heat/locale/fr/LC_MESSAGES/heat-log-warning.po' has changes
 staged in the index
| (use --cached to keep the file, or -f to force removal)

This change is needed to fix propose_translation_update.sh for a few
repositories including heat.

Change-Id: Ia5887a0442a25d6bd66351f266cb392cb46ca4d5
This commit is contained in:
Andreas Jaeger 2014-10-03 08:37:33 +02:00
parent 5c919faaaa
commit 7ddd7b74d0

View File

@ -314,7 +314,7 @@ function cleanup_po_files {
check="^0 translated messages"
if [[ $trans =~ $check ]] ; then
# Nothing is translated, remove the file.
git rm $i
git rm -f $i
else
if [[ $trans =~ " translated message" ]] ; then
trans_no=`echo $trans|sed -e 's/ translated message.*$//'`
@ -334,7 +334,7 @@ function cleanup_po_files {
# For now we delete files that suddenly are less than 20
# per cent translated.
if [[ "$ratio" -lt "20" ]] ; then
git rm $i
git rm -f $i
fi
fi
done