|
From: Fredrik K. <sci...@us...> - 2011-10-18 15:14:02
|
Author: Fredrik Klasson <sci...@gm...>
Date: Tue Oct 18 15:32:15 2011 +0200
Sanity checking: make sure the PO-file exists.
---
tools/scripts/translation_wiki_helper.sh | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/scripts/translation_wiki_helper.sh b/tools/scripts/translation_wiki_helper.sh
index 6a50324..d8c837b 100755
--- a/tools/scripts/translation_wiki_helper.sh
+++ b/tools/scripts/translation_wiki_helper.sh
@@ -173,7 +173,10 @@ elif [[ "$1" == "--infoboxes" ]] ; then
generate_infoboxes "$a"
done
else
- # FIXME: make sure $2 is sane.
+ if [[ -d lang ]] && [[ ! -f "lang/${2}.po" ]] ; then
+ echo "There is no translation (.po) file for <$2>!"
+ exit -1
+ fi
generate_infoboxes "$2"
fi
else
|