aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-12 07:40:41 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-12 07:40:41 +0200
commitb140fe817097d3f2046aafb0cca7647d7a649d19 (patch)
tree80d5dc26610b5864fe1d650f89fee28019a26cbf
parent22c70c076b75716553b19256f03a83cdb14dda03 (diff)
downloadayatana-indicator-power-b140fe817097d3f2046aafb0cca7647d7a649d19.tar.gz
ayatana-indicator-power-b140fe817097d3f2046aafb0cca7647d7a649d19.tar.bz2
ayatana-indicator-power-b140fe817097d3f2046aafb0cca7647d7a649d19.zip
update-po.sh: Add support for creating new LINGUAS.
-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