]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a feature to regenerate the languages file.
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 30 Dec 2014 11:40:44 +0000 (12:40 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 30 Dec 2014 11:40:44 +0000 (12:40 +0100)
check-translations.sh

index 41653ca00e0d61e063f4ce1f68d56e67245caa93..ee80688da293dec60b0b9de50a73ef8d82b4a66e 100755 (executable)
@@ -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