From: Klaus Ethgen Date: Sat, 11 Apr 2009 20:46:37 +0000 (+0000) Subject: Fix that the output of msgfmt could be singular X-Git-Tag: v1.0.0~262 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=957656a98cb956da53e2e52cb025c2f93dd170cf Fix that the output of msgfmt could be singular The output of msgfmt could be singular if there is only one translation of the given type. --- diff --git a/po/gen_translations_stats.sh b/po/gen_translations_stats.sh index 36aeda93..85b71875 100755 --- a/po/gen_translations_stats.sh +++ b/po/gen_translations_stats.sh @@ -19,9 +19,9 @@ for i in *.po; do msgfmt --statistics -o /dev/null $i 2>&1 \ | perl -ne ' my ($tr_done, $tr_fuzz, $tr_un) = (0, 0, 0); - $tr_done = $1 if /(\d+) translated messages/; - $tr_fuzz = $1 if /(\d+) fuzzy translations/; - $tr_un = $1 if /(\d+) untranslated messages/; + $tr_done = $1 if /(\d+) translated messages?/; + $tr_fuzz = $1 if /(\d+) fuzzy translations?/; + $tr_un = $1 if /(\d+) untranslated messages?/; my $tr_tot = $tr_done + $tr_fuzz + $tr_un; printf "%8.0f|%s|%7.2f|%5d|%5d|%7d|%5d\n", 10000*$tr_done/$tr_tot, "'"${i%%.po}"'",