diff options
Diffstat (limited to 'po/updatepo.sh')
-rwxr-xr-x | po/updatepo.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/po/updatepo.sh b/po/updatepo.sh index 84e6ef7c..d7b7afca 100755 --- a/po/updatepo.sh +++ b/po/updatepo.sh @@ -8,39 +8,39 @@ echo "Update gettext translation files." DER=`pwd` if [ ! -e "updatepo.sh" ] then - echo "Error: Run from po/, the location of hardinfo.pot and XX.po files." + echo "Error: Run from po/, the location of hardinfo2.pot and XX.po files." exit 1 fi -MSGTOTALOLD=`msgattrib --untranslated hardinfo.pot | grep -E "^msgstr \"\"" | wc -l` -echo "hardinfo.pot has $MSGTOTALOLD strings" +MSGTOTALOLD=`msgattrib --untranslated hardinfo2.pot | grep -E "^msgstr \"\"" | wc -l` +echo "hardinfo2.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/ includes/; +mv hardinfo2.pot hardinfo2.pot.old +echo "" > hardinfo2.pot # empty existing file to join (-j) with +for d in hardinfo2/ shell/ modules/ includes/; do - # work from hardinfo root to get reasonable file reference comments + # work from hardinfo2 root to get reasonable file reference comments cd .. echo -n `pwd`; echo "/$d ..." - find "$d" -type f -name "*.[hc]" -print | sort | xargs xgettext -j -d hardinfo -o "$DER/hardinfo.pot" -k_ -kN_ -kC_:1c,2 -kNC_:1c,2 -c/ --from-code=UTF-8 + find "$d" -type f -name "*.[hc]" -print | sort | xargs xgettext -j -d hardinfo2 -o "$DER/hardinfo2.pot" -k_ -kN_ -kC_:1c,2 -kNC_:1c,2 -c/ --from-code=UTF-8 cd "$DER" done; -MSGTOTAL=`msgattrib --untranslated hardinfo.pot | grep -E "^msgstr \"\"" | wc -l` -CMSG=`msgattrib --untranslated hardinfo.pot | grep -E "^#,.*c-format" | wc -l` +MSGTOTAL=`msgattrib --untranslated hardinfo2.pot | grep -E "^msgstr \"\"" | wc -l` +CMSG=`msgattrib --untranslated hardinfo2.pot | grep -E "^#,.*c-format" | 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), with $CMSG c-format strings" +echo "hardinfo2.pot now has $MSGTOTAL strings ($CHANGE), with $CMSG c-format strings" echo "(as of $GITVER $GITHASH)" for f in *.po do cp "$f" "$f.old" - msgmerge -q -N "$f" hardinfo.pot > tmp.po + msgmerge -q -N "$f" hardinfo2.pot > tmp.po # set/reset the X-Poedit-Basepath header grep -v '"X-Poedit-Basepath\:[^"]*"' tmp.po | sed 's:\("Language\:[^"]*"\):\1\n"X-Poedit-Basepath\: ../\\n":' >"$f" |