diff --git a/compile b/compile index d5d1962..327a72c 100755 --- a/compile +++ b/compile @@ -30,8 +30,9 @@ for BRANCH in $TRUNK $BRANCHES; do fi for file in `ls $DIR`; do echo "Compiling $file"; - $MSGFMT "$DIR/$file" -o "$MDIR/$BRANCH/`echo $file | sed "s/."$LCODE".po/.mo/"`" + $MSGFMT "$DIR/$file" -o "$MDIR/$BRANCH/`echo wesnoth-$file | sed "s/."$LCODE".po/.mo/" | sed "s/wesnoth-wesnoth//"`" done + rm "$MDIR/$BRANCH/wesnoth-manpages.mo" "$MDIR/$BRANCH/wesnoth-manual.mo" done echo -e $GREEN"Finished."$ENDCOLOR diff --git a/pack b/pack index 7044fdc..4ec9fab 100755 --- a/pack +++ b/pack @@ -38,25 +38,27 @@ for BRANCH in $TRUNK $BRANCHES; do echo -e "Branch: $BLUE$BRANCH"$ENDCOLOR DIR="$PREFIX-$BRANCH" mkdir "$LCODE-temp" - for file in `ls $DIR/wesnoth*.$LCODE.po`; do + for file in `find $DIR -name *.lt.po`; do bfile=`basename $file` echo -n "Processing catalog $bfile... "; d=`echo "$bfile" | sed "s/.$LCODE.po//"` - $MSGMERGE --no-wrap --silent $file $file -o $file.temp - if [ -f "$BRANCH/$d/$LCODE.po" ]; then - $MSGMERGE --no-wrap --silent "$BRANCH/$d/$LCODE.po" "$BRANCH/$d/$LCODE.po" -o "$BRANCH/$d/$LCODE.po.temp" - if ! $DIFF -q "$file.temp" "$BRANCH/$d/$LCODE.po.temp" > /dev/null ; then - mkdir "$LCODE-temp/$d" - cp "$file" "$LCODE-temp/$d/$LCODE.po" + dirdomain=`echo wesnoth-$d | sed "s/wesnoth-wesnoth/wesnoth/"` + $MSGMERGE --silent "$file" "$file" -o $file.temp + mv $file.temp $file + if [ -f "$BRANCH/$dirdomain/$LCODE.po" ]; then + $MSGMERGE --silent "$BRANCH/$dirdomain/$LCODE.po" "$BRANCH/$dirdomain/$LCODE.po" -o "$BRANCH/$dirdomain/$LCODE.po.temp" + if ! $DIFF -q "$file" "$BRANCH/$dirdomain/$LCODE.po.temp" > /dev/null ; then + mkdir "$LCODE-temp/$dirdomain" + cp "$file" "$LCODE-temp/$dirdomain/$LCODE.po" echo -e $GREEN"OK"$ENDCOLOR counter=$(($counter+1)) else echo -e $BLUE"Skipping"$ENDCOLOR fi - rm $file.temp "$BRANCH/$d/$LCODE.po.temp" + rm "$BRANCH/$dirdomain/$LCODE.po.temp" else - mkdir -p "$LCODE-temp/$d" - cp "$file" "$LCODE-temp/$d/$LCODE.po" + mkdir -p "$LCODE-temp/$dirdomain" + cp "$file" "$LCODE-temp/$dirdomain/$LCODE.po" echo -e $GREEN"OK"$ENDCOLOR counter=$(($counter+1)) fi diff --git a/statistics b/statistics index 1ae2b83..017c1b0 100755 --- a/statistics +++ b/statistics @@ -188,15 +188,9 @@ for BRANCH in $TRUNK $BRANCHES; do echo "" >> $STATSFILE CL=$(( ($CL+1)%2 )) - if [ $(($f+$u)) -gt 0 ]; then - echo " `basename $filename` + echo " `basename $filename` $st $t" >> $STATSFILE - else - echo " `basename $filename` - $st - $t" >> $STATSFILE - fi printf '%s%d%s%.2f%s\n' " " $rt "" >> $STATSFILE echo " $f" >> $STATSFILE printf '%s%d%s%.2f%s\n' " " $rf "" >> $STATSFILE diff --git a/update b/update index ddcdbe4..be9fa89 100755 --- a/update +++ b/update @@ -77,19 +77,19 @@ for BRANCH in $TRUNK $BRANCHES; do DIR="$PREFIX-$BRANCH" echo -e "Merging: $BLUE$BRANCH"$ENDCOLOR for dir in `ls $SVNDIR/wesnoth* -d`; do - echo "Processing "`basename $dir`"."$LCODE".po" - stat=`LC_MESSAGES=C $MSGFMT --statistics -o /dev/null $dir"/"$LCODE".po" 2>&1` + echo "Processing `basename $dir | sed s/wesnoth-//`$LCODE.po" + stat=`LC_MESSAGES=C $MSGFMT --statistics -o /dev/null "$dir/$LCODE.po" 2>&1` u=`echo "$stat" | sed -ne 's/.* \([0-9]\+\) untranslated .*/\1/p'`; u=${u:-0} f=`echo "$stat" | sed -ne 's/.* \([0-9]\+\) fuzzy translation.*/\1/p'`; f=${f:-0} - file=$DIR"/"`basename $dir`"."$LCODE".po" + file="$DIR/`basename $dir | sed s/wesnoth-//`.$LCODE.po" if [ -f $dir"/"$LCODE".po" ]; then - if [ -f "$DIR/"`basename $dir`".$LCODE.po" ]; then + if [ -f "$file" ]; then echo -e $BLUE"Merging:"$ENDCOLOR - $MSGMERGE -U -v $file $dir"/"`basename $dir`".pot" + $MSGMERGE -U -v "$file" "$dir/`basename $dir`.pot" rm -f $file~ else echo -e $RED"Copying:"$ENDCOLOR - cp $dir"/"$LCODE".po" $file + cp "$dir/$LCODE.po" "$file" fi else if [ ! -f $file ]; then diff --git a/variables b/variables index 2b61852..be3180d 100644 --- a/variables +++ b/variables @@ -17,8 +17,8 @@ # Repositories REPO="http://svn.gna.org/svn/wesnoth" -BRANCHES="" # one or multiple branches separated by space. Can be blank. -TRUNK="trunk" # "trunk" or "" +BRANCHES="1.6" # one or multiple branches separated by space. Can be blank. +TRUNK="" # "trunk" or "" # Options LCODE="lt" # Language code. Only 1 language is supported.