summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-11 12:49:45 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-11 12:49:45 (GMT)
commitdf7c3e0d05673e99361295b9181540843ddfe2f5 (patch)
treeb082400158c3d958546591d504846d8f2be53364
parent95fd5f49669e74441de141770c14e86f2a7fc21e (diff)
downloadpykolab-df7c3e0d05673e99361295b9181540843ddfe2f5.tar.gz
Attempt to be a little smarter when updating the language files
-rwxr-xr-xbin/pykolab-update-lang15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/pykolab-update-lang b/bin/pykolab-update-lang
index cd2cdb5..e6bab88 100755
--- a/bin/pykolab-update-lang
+++ b/bin/pykolab-update-lang
@@ -1,6 +1,21 @@
#!/bin/bash
echo "Updating language files"
+
+> po/POTFILES.in
+> po/POTFILES.skip
+
+find . -type f -name "*.py" -o -name "*.py.in" | \
+ sort | \
+ sed -e 's/^.\///g' | \
+ while read file; do
+ if [ $(git ls-files --error-unmatch "${file}" >/dev/null 2>&1; echo $?) -eq 0 ]; then
+ echo "${file}" >> po/POTFILES.in
+ else
+ echo "${file}" >> po/POTFILES.skip
+ fi
+ done
+
cd po/
intltool-update --pot --gettext-package=pykolab
if [ "$1" == "po" ]; then