summaryrefslogtreecommitdiff
path: root/transifexpull.sh
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-25 15:50:47 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-25 15:50:47 (GMT)
commitfd5f6ebf052b7e602e54a6593b8add60ad89a1d6 (patch)
tree6180483c1bdbc192b694f1f0da391dc6d62ad347 /transifexpull.sh
parentf96e93eec29ea1686a30a4986006d2eef9f46295 (diff)
downloadroundcubemail-plugins-kolab-fd5f6ebf052b7e602e54a6593b8add60ad89a1d6.tar.gz
Allow to pull translations for single plugins
Diffstat (limited to 'transifexpull.sh')
-rwxr-xr-xtransifexpull.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/transifexpull.sh b/transifexpull.sh
index bb010e1..32d7cfe 100755
--- a/transifexpull.sh
+++ b/transifexpull.sh
@@ -6,9 +6,15 @@
# --force is necessary to avoid timestamp issues
# https://bugs.launchpad.net/ironic/+bug/1298645/comments/4
-tx --debug pull --force -a --mode translator
-
PWD=`dirname "$0"`
+RES=${1:-'*'}
+TXARGS=""
+
+if [ "$RES" != "*" ]; then
+ TXARGS="-r kolab.$RES"
+fi
+
+tx --debug pull --force -a --mode translator $TXARGS
do_count()
{
@@ -37,7 +43,7 @@ do_clean()
}
# clean up translation files
-for plugin in $PWD/plugins/*; do
+for plugin in $PWD/plugins/$RES; do
if [ -s $plugin/localization/en_US.inc ]; then
do_count $plugin/localization/en_US.inc
EN_CNT=$?
@@ -52,6 +58,8 @@ for plugin in $PWD/plugins/*; do
# git-add localizations with more than 0%
if [ "$PERCENT" != "0" ]; then
git add $file
+ else
+ rm $file
fi
done
fi