aboutsummaryrefslogtreecommitdiff
path: root/po/updatepo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'po/updatepo.sh')
-rw-r--r--po/updatepo.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/po/updatepo.sh b/po/updatepo.sh
index 9289dabd..d1d3c427 100644
--- a/po/updatepo.sh
+++ b/po/updatepo.sh
@@ -1,3 +1,24 @@
+#!bash
+
+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."
+ exit 1
+fi
+
+mv hardinfo.pot hardinfo.pot.old
+echo "" > hardinfo.pot # empty existing file to join (-j) with
+for d in shell/ modules/ hardinfo/;
+do
+ # work form hardinfo root to get reasonable file reference comments
+ cd ..
+ echo -n `pwd`; echo "/$d ..."
+ find "$d" -type f -name "*.c" -print | xargs xgettext -j -d hardinfo -o "$DER/hardinfo.pot" -k_ -kN_ -kC_:1c,2 -kNC_:1c,2 -c/ --from-code=UTF-8
+ cd "$DER"
+done;
for f in *.po
do