aboutsummaryrefslogtreecommitdiff
path: root/update-po.sh
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-12 07:41:14 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-12 07:41:14 +0200
commit9b43c33b47b72c1ed6ddbdbfc651ee5aabab03e4 (patch)
tree102efa246789ebaab99b5ab4b0fc3a928ae699aa /update-po.sh
parent2cddae13f83e2710c0235f73f3868d657864d2cd (diff)
downloadayatana-indicator-session-9b43c33b47b72c1ed6ddbdbfc651ee5aabab03e4.tar.gz
ayatana-indicator-session-9b43c33b47b72c1ed6ddbdbfc651ee5aabab03e4.tar.bz2
ayatana-indicator-session-9b43c33b47b72c1ed6ddbdbfc651ee5aabab03e4.zip
update-po.sh: Add support for creating new LINGUAS.
Diffstat (limited to 'update-po.sh')
-rwxr-xr-xupdate-po.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/update-po.sh b/update-po.sh
index 5b0da1c..e87c96b 100755
--- a/update-po.sh
+++ b/update-po.sh
@@ -5,5 +5,11 @@ set -x
GETTEXT_DOMAIN=$(cat CMakeLists.txt | grep 'set.*(.*GETTEXT_PACKAGE' | sed -r -e 's/.*\"([^"]+)\"\)/\1/')
cd po/
-cat LINGUAS | while read lingua; do touch ${lingua}.po; intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basename ${lingua}); done
+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