diff options
-rwxr-xr-x | update-po.sh | 8 |
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 |