|
|
|
@ -76,19 +76,20 @@ upd_dir=$1
|
|
|
|
|
tra_tree=$2
|
|
|
|
|
tpl_tree=$3
|
|
|
|
|
|
|
|
|
|
total_files=`find $upd_dir -name "*.po" | wc -l`
|
|
|
|
|
newtrans=`cd $upd_dir; find . -name "*.po"`
|
|
|
|
|
total_files=`echo $newtrans | wc -w`
|
|
|
|
|
skipped_files=0
|
|
|
|
|
merged_files=0
|
|
|
|
|
changed_files=0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$option_verbose" = "Y" ]; then
|
|
|
|
|
echo "Checking if updated files are in the specified directory ..."
|
|
|
|
|
else
|
|
|
|
|
echo -ne "\r$merged_files/$total_files merged"
|
|
|
|
|
fi
|
|
|
|
|
newtrans=`cd $upd_dir; find . -name "*.po"`
|
|
|
|
|
if [ "$newtrans" == "" ]; then
|
|
|
|
|
echo " ... no updated files found in: $upd_dir"
|
|
|
|
|
echo -e $RED"\t\t... no updated files found in: $upd_dir"$ENDCOLOR
|
|
|
|
|
exit 1
|
|
|
|
|
else
|
|
|
|
|
if [ "$option_verbose" = "Y" ]; then
|
|
|
|
@ -100,22 +101,25 @@ fi
|
|
|
|
|
## MAIN LOOP
|
|
|
|
|
for updfile in $newtrans
|
|
|
|
|
do
|
|
|
|
|
|
|
|
|
|
if [ `cd $tpl_tree; find ${updfile}t 2> /dev/null | wc -l` -gt 1 ]; then
|
|
|
|
|
echo
|
|
|
|
|
echo "Strange, there is more than one template for `basename $updfile`,"
|
|
|
|
|
echo "cannot determine the right one,"
|
|
|
|
|
echo "SKIPPING..."
|
|
|
|
|
if [ "$option_verbose" = "Y" ]; then
|
|
|
|
|
echo
|
|
|
|
|
echo "Strange, there is more than one template for `basename $updfile`,"
|
|
|
|
|
echo "cannot determine the right one,"
|
|
|
|
|
echo "SKIPPING..."
|
|
|
|
|
fi
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ `cd $tra_tree; find ${updfile} 2> /dev/null | wc -l` -gt 1 ]; then
|
|
|
|
|
echo
|
|
|
|
|
echo "Strange, there is more than one version of translation `basename $updfile`,"
|
|
|
|
|
echo "although there is only one translation template. There might be an extra"
|
|
|
|
|
echo "unneeded file in your translation tree, check it out!"
|
|
|
|
|
echo "Cannot determine the right file to translate,"
|
|
|
|
|
echo "SKIPPING..."
|
|
|
|
|
if [ `cd $tpl_tree; find ${updfile} 2> /dev/null | wc -l` -gt 1 ]; then
|
|
|
|
|
if [ "$option_verbose" = "Y" ]; then
|
|
|
|
|
echo
|
|
|
|
|
echo "Strange, there is more than one version of translation `basename $updfile`,"
|
|
|
|
|
echo "although there is only one translation template. There might be an extra"
|
|
|
|
|
echo "unneeded file in your translation tree, check it out!"
|
|
|
|
|
echo "Cannot determine the right file to translate,"
|
|
|
|
|
echo "SKIPPING..."
|
|
|
|
|
fi
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -173,8 +177,7 @@ if [ "`$DIFF $tra_tree/${trafile}.old $tra_tree/${trafile}.new`" ]; then
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
rm $tra_tree/${trafile}.new
|
|
|
|
|
rm $tra_tree/${trafile}.old
|
|
|
|
|
rm $tra_tree/${trafile}.old $tra_tree/${trafile}.new
|
|
|
|
|
|
|
|
|
|
merged_files=$(($merged_files+1))
|
|
|
|
|
if [ ! "$option_verbose" = "Y" ]; then
|
|
|
|
|