diff --git a/autotranslate b/autotranslate index 0dec02f..2b101a6 100755 --- a/autotranslate +++ b/autotranslate @@ -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 diff --git a/pocompare b/pocompare index dd2691c..8ea078c 100755 --- a/pocompare +++ b/pocompare @@ -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 diff --git a/pocompare-kdiff3 b/pocompare-kdiff3 index 8539862..a1f1820 100755 --- a/pocompare-kdiff3 +++ b/pocompare-kdiff3 @@ -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 diff --git a/potopot b/potopot index aca68e2..ea1ec21 100755 --- a/potopot +++ b/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 diff --git a/poupdate b/poupdate index 5f68ac6..b244694 100755 --- a/poupdate +++ b/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 diff --git a/stripfuzzy b/stripfuzzy index 629a975..aba1c2a 100755 --- a/stripfuzzy +++ b/stripfuzzy @@ -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 diff --git a/ths-variables b/ths-variables index 21beacf..69f36ab 100644 --- a/ths-variables +++ b/ths-variables @@ -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