From f41bb7dca7578034d1988654e6fc0abfa9e61624 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 Oct 2017 07:44:25 +0200 Subject: update-po(|t).sh: Add gettext update scripts. --- update-po.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 update-po.sh (limited to 'update-po.sh') 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 -- cgit v1.2.3