diff options
Diffstat (limited to 'po')
-rw-r--r-- | po/updatepo.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/po/updatepo.sh b/po/updatepo.sh index 1825d696..cd30b4bb 100644 --- a/po/updatepo.sh +++ b/po/updatepo.sh @@ -9,6 +9,9 @@ then exit 1 fi +MSGTOTALOLD=`msgattrib --untranslated hardinfo.pot | grep -E "^msgstr \"\"" | wc -l` +echo "hardinfo.pot has $MSGTOTALOLD strings" + mv hardinfo.pot hardinfo.pot.old echo "" > hardinfo.pot # empty existing file to join (-j) with for d in hardinfo/ shell/ modules/; @@ -20,8 +23,21 @@ do cd "$DER" done; +MSGTOTAL=`msgattrib --untranslated hardinfo.pot | grep -E "^msgstr \"\"" | wc -l` +TDIFF=$(($MSGTOTAL - $MSGTOTALOLD)) +CHANGE="$TDIFF" +if [ $TDIFF -gt 0 ]; then CHANGE="+$TDIFF"; fi +if [ $TDIFF -eq 0 ]; then CHANGE="no change"; fi +echo "hardinfo.pot now has $MSGTOTAL strings ($CHANGE)" + for f in *.po do cp "$f" "$f.old" - msgmerge -N "$f" hardinfo.pot > tmp.po && mv tmp.po "$f" + msgmerge -q -N "$f" hardinfo.pot > tmp.po && mv tmp.po "$f" + UNMSG=`msgattrib --untranslated "$f" | grep -E "^msgstr \"\"" | wc -l` + DONE=" " + if [ $UNMSG -eq 0 ]; then + DONE="x" + fi + echo "- [$DONE] $f : ($UNMSG / $MSGTOTAL remain untranslated)" done |