From 0d590092342193bef0f7f08218287973289a5008 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 12 Oct 2017 07:46:50 +0200 Subject: update-po(|t).sh: Add gettext update scripts. --- update-po.sh | 15 +++++++++++++++ update-pot.sh | 5 +++++ 2 files changed, 20 insertions(+) create mode 100755 update-po.sh create mode 100755 update-pot.sh diff --git a/update-po.sh b/update-po.sh new file mode 100755 index 00000000..6a5dcaf9 --- /dev/null +++ b/update-po.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -x + +GETTEXT_DOMAIN=$(cat configure.ac | grep -E "^GETTEXT_PACKAGE=" | sed -e 's/GETTEXT_PACKAGE=//') + +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 diff --git a/update-pot.sh b/update-pot.sh new file mode 100755 index 00000000..7c1db94f --- /dev/null +++ b/update-pot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +GETTEXT_DOMAIN=$(cat configure.ac | grep -E "^GETTEXT_PACKAGE=" | sed -e 's/GETTEXT_PACKAGE=//') + +cd po/ && intltool-update --gettext-package ${GETTEXT_DOMAIN} --pot -- cgit v1.2.3