From 9b43c33b47b72c1ed6ddbdbfc651ee5aabab03e4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 Oct 2017 07:41:14 +0200 Subject: update-po.sh: Add support for creating new LINGUAS. --- update-po.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'update-po.sh') 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 -- cgit v1.2.3