aboutsummaryrefslogtreecommitdiff
path: root/update-po.sh
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-12 07:44:25 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-12 07:45:22 +0200
commitf41bb7dca7578034d1988654e6fc0abfa9e61624 (patch)
treeb3f03ecda492c0c43b0a24c79512a94077c539de /update-po.sh
parent8a1c505899c18b2f265f0ae938093cb6a425fa57 (diff)
downloadayatana-indicator-datetime-f41bb7dca7578034d1988654e6fc0abfa9e61624.tar.gz
ayatana-indicator-datetime-f41bb7dca7578034d1988654e6fc0abfa9e61624.tar.bz2
ayatana-indicator-datetime-f41bb7dca7578034d1988654e6fc0abfa9e61624.zip
update-po(|t).sh: Add gettext update scripts.
Diffstat (limited to 'update-po.sh')
-rwxr-xr-xupdate-po.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/update-po.sh b/update-po.sh
new file mode 100755
index 0000000..e87c96b
--- /dev/null
+++ b/update-po.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -x
+
+GETTEXT_DOMAIN=$(cat CMakeLists.txt | grep 'set.*(.*GETTEXT_PACKAGE' | sed -r -e 's/.*\"([^"]+)\"\)/\1/')
+
+cd po/
+cat LINGUAS | while read lingua; do
+ if [ ! -e ${lingua}.po ]; then
+ msginit --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
+ else
+ intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basename ${lingua})
+ fi
+done
+cd - 1>/dev/null