From 9624636e903f783160a12c4127bff4f318544c76 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 30 Dec 2014 12:40:44 +0100 Subject: [PATCH] Add a feature to regenerate the languages file. --- check-translations.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.39.2