From: Rudolf Polzer Date: Tue, 30 Dec 2014 11:40:44 +0000 (+0100) Subject: Add a feature to regenerate the languages file. X-Git-Tag: xonotic-v0.8.0~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9624636e903f783160a12c4127bff4f318544c76;p=xonotic%2Fxonotic-data.pk3dir.git Add a feature to regenerate the languages file. --- diff --git a/check-translations.sh b/check-translations.sh index 41653ca00..ee80688da 100755 --- a/check-translations.sh +++ b/check-translations.sh @@ -62,10 +62,13 @@ if [ x"$mode" = x"txt" ]; then echo >&2 "Percent: $p" l=${X#common.} l=${l%.po} - item=`grep "^$l " languages.txt || echo "$l $l \"$l (0%)\""` - if [ "$p" -gt 50 ]; then - printf "%s\n" "$item" | sed -e "s/([0-9][0-9]*%)/($p%)/" + if ! item=`grep "^$l " languages.txt`; then + if [ "$p" -lt 50 ]; then + continue + fi + item="$l $l \"$l (0%)\"" fi + printf "%s\n" "$item" | sed -e "s/([0-9][0-9]*%)/($p%)/" done fi