poupdate: Print the number of changed files.
This commit is contained in:
rodzic
329e7b5a25
commit
12883916c4
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
# ths-autotranslate.sh - automatically translates project files (may initialize files that have not been started to translate) using a specified compendium.
|
||||
|
||||
source ths-variables
|
||||
source `dirname $0`/ths-variables
|
||||
|
||||
if [ ! $MSGINIT ]; then
|
||||
echo -e $RED"This program needs the msginit utility."$ENDCOLOR
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# ths-pocompare.sh - compare two translation files using diff, unwrapps first
|
||||
# for best comparison.
|
||||
|
||||
source ths-variables
|
||||
source `dirname $0`/ths-variables
|
||||
|
||||
if [ ! $MSGMERGE ]; then
|
||||
echo -e $RED"This program needs the msgmerge utility."$ENDCOLOR
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# ths-pocompare-kdiff3.sh - compare two translation files using kdiff3,
|
||||
# unwrapps first for best comparison.
|
||||
|
||||
source ths-variables
|
||||
source `dirname $0`/ths-variables
|
||||
|
||||
if [ ! $MSGMERGE ]; then
|
||||
echo -e $RED"This program needs the msgmerge utility."$ENDCOLOR
|
||||
|
|
2
potopot
2
potopot
|
@ -19,7 +19,7 @@
|
|||
# ths-potopot.sh - converts po files to pot (template) files (basically
|
||||
# strips all the translation).
|
||||
|
||||
source ths-variables
|
||||
source `dirname $0`/ths-variables
|
||||
|
||||
if [ ! $MSGMERGE ]; then
|
||||
echo -e $RED"This program needs the msgmerge utility."$ENDCOLOR
|
||||
|
|
21
poupdate
21
poupdate
|
@ -22,7 +22,7 @@
|
|||
|
||||
## First - the necessary checks before going into the loop
|
||||
|
||||
source ths-variables
|
||||
source `dirname $0`/ths-variables
|
||||
|
||||
if [ ! $MSGMERGE ]; then
|
||||
echo -e $RED"This program needs the msgmerge utility."$ENDCOLOR
|
||||
|
@ -72,12 +72,14 @@ upd_dir=$1
|
|||
tra_tree=$2
|
||||
tpl_tree=$3
|
||||
|
||||
total_files=`find $upd_dir -name "*.po" | wc -l`
|
||||
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
|
||||
total_files=`find $upd_dir -name "*.po" | wc -l`
|
||||
skipped_files=0
|
||||
merged_files=0
|
||||
echo -ne "\r$merged_files/$total_files merged"
|
||||
fi
|
||||
newtrans=`cd $upd_dir; find . -name "*.po"`
|
||||
|
@ -119,9 +121,8 @@ if [ `cd $tpl_tree; find ${updfile}t 2> /dev/null | wc -l` -lt 1 ]; then
|
|||
echo "File `basename $updfile` does not belong to this translation project,"
|
||||
echo "SKIPPING..."
|
||||
find ${updfile}t -print
|
||||
else
|
||||
skipped_files=$(($skipped_files+1))
|
||||
fi
|
||||
skipped_files=$(($skipped_files+1))
|
||||
continue
|
||||
|
||||
fi
|
||||
|
@ -164,8 +165,8 @@ cat $tra_tree/${trafile}.new | sed '/X-Rosetta-Export-Date/d' > $tra_tree/$trafi
|
|||
rm $tra_tree/${trafile}.new
|
||||
rm $tra_tree/${trafile}.old
|
||||
|
||||
merged_files=$(($merged_files+1))
|
||||
if [ ! "$option_verbose" = "Y" ]; then
|
||||
merged_files=$(($merged_files+1))
|
||||
echo -ne "\r$merged_files/$total_files merged"
|
||||
if [ ! $skipped_files -eq 0 ]; then
|
||||
echo -ne ", $skipped_files skipped"
|
||||
|
@ -174,6 +175,8 @@ fi
|
|||
|
||||
done
|
||||
|
||||
if [ ! "$option_verbose" = "Y" ]; then
|
||||
echo
|
||||
echo -ne $BLUE"\r$merged_files/$total_files merged"$ENDCOLOR
|
||||
if [ ! $skipped_files -eq 0 ]; then
|
||||
echo -ne $BLUE", $skipped_files skipped"$ENDCOLOR
|
||||
fi
|
||||
echo
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
# ths-stripfuzzy.sh - makes all fuzzy strings non-fuzzy in a translation project.
|
||||
|
||||
source ths-variables
|
||||
source `dirname $0`/ths-variables
|
||||
|
||||
if [ ! $MSGMERGE ]; then
|
||||
echo -e $RED"This program needs the msgmerge utility."$ENDCOLOR
|
||||
|
|
|
@ -21,7 +21,7 @@ MSGATTRIB=`which msgattrib 2> /dev/null`
|
|||
MSGFILTER=`which msgfilter 2> /dev/null`
|
||||
MSGFMT=`which msgfmt 2> /dev/null`
|
||||
MSGINIT=`which msginit 2> /dev/null`
|
||||
MSGMERGE=`which msgmerg1e 2> /dev/null`
|
||||
MSGMERGE=`which msgmerge 2> /dev/null`
|
||||
KDIFF3=`which kdiff3 2> /dev/null`
|
||||
|
||||
#Colors
|
||||
|
|
Ładowanie…
Reference in New Issue