dolibarr/dev/translation/txpull.sh

52 lines
1.2 KiB
Bash
Raw Normal View History

2013-05-27 10:32:47 +02:00
#!/bin/sh
#------------------------------------------------------
# Script to pull language files to Transifex
#
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
2013-08-03 16:24:52 +02:00
# Usage: txpull.sh (all|xx_XX) [-r dolibarr.file] [-f]
2013-05-27 10:32:47 +02:00
#------------------------------------------------------
# Syntax
if [ "x$1" = "x" ]
then
2013-08-03 16:24:52 +02:00
echo "This pull remote transifex files to local dir."
2013-09-03 00:06:42 +02:00
echo "Note: If you pull a language file (not source), file will be skipped if local file is newer."
2013-08-03 16:24:52 +02:00
echo " Using -f will overwrite local file (does not work with 'all')."
2015-03-14 02:37:18 +01:00
echo "Usage: ./dev/translation/txpull.sh (all|xx_XX) [-r dolibarr.file] [-f] [-s]"
2014-05-18 12:06:09 +02:00
exit
fi
if [ ! -d ".tx" ]
then
echo "Script must be ran from root directory of project with command ./dev/translation/txpull.sh"
2013-05-27 10:32:47 +02:00
exit
fi
if [ "x$1" = "xall" ]
then
2017-02-21 10:26:11 +01:00
if [ "x$2" = "x" ]
then
echo "tx pull"
tx pull
else
for dir in `find htdocs/langs/* -type d`
do
fic=`basename $dir`
if [ $fic != "en_US" ]
then
echo "tx pull -l $fic $2 $3"
tx pull -l $fic $2 $3
fi
done
fi
2015-03-14 02:37:18 +01:00
cd -
2013-05-27 10:32:47 +02:00
else
2015-03-14 02:37:18 +01:00
echo "tx pull -l $1 $2 $3 $4 $5"
tx pull -l $1 $2 $3 $4 $5
2013-05-27 10:32:47 +02:00
fi
2015-03-14 02:37:18 +01:00
echo Think to launch also:
2016-10-11 10:24:02 +02:00
echo "> dev/tools/fixaltlanguages.sh fix all"