diff options
-rwxr-xr-x | update-po.sh | 15 | ||||
-rwxr-xr-x | update-pot.sh | 5 |
2 files changed, 20 insertions, 0 deletions
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 diff --git a/update-pot.sh b/update-pot.sh new file mode 100755 index 0000000..93371e4 --- /dev/null +++ b/update-pot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +GETTEXT_DOMAIN=$(cat CMakeLists.txt | grep 'set.*(.*GETTEXT_PACKAGE' | sed -r -e 's/.*\"([^"]+)\"\)/\1/') + +cd po/ && intltool-update --gettext-package ${GETTEXT_DOMAIN} --pot |