Merge branch 'master' into donato

This commit is contained in:
Donatas G 2009-02-13 08:07:12 +02:00
commit 72ee866c01
6 changed files with 21 additions and 17 deletions

View File

@ -16,9 +16,11 @@
# # along with this script; if not, write to the Free Software
# # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ths-applysed.sh - apply a sed script to the whole project (the sed commands have to be supplied in an external file).
# ths-applysed.sh - apply a sed script to the whole project (the sed commands
# have to be supplied in an external file).
## example of the replacements file content (remove preceeding comment marks #):
## example of the replacements file content (remove preceeding comment marks #
## and the ======== lines ):
# ==================
# s/bylai/failui/g
# s/bylą/failą/g

View File

@ -104,7 +104,7 @@ else
filename=`basename $pot .pot`.po
directory=`dirname $pot`
mkdir -p $new/$directory
# kopijuojamas failas jei randamas tikslus atitikmuo tam, kas yra pot direktorijoje.
# copy a po file if an exact match is found for it in the templates directory
if [ -f $new/$directory/$filename ]; then
echo -n "file $new/$directory/$filename already exists, skipping creation..."
echo

View File

@ -16,7 +16,8 @@
# # along with this script; if not, write to the Free Software
# # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ths-pocompare-kdiff3.sh - compare two translation files using kdiff3, unwrapps first for best comparison.
# ths-pocompare-kdiff3.sh - compare two translation files using kdiff3,
# unwrapps first for best comparison.
if [ $# -ne 2 ]; then
echo "Usage `basename $0` <file1> <file2>"

View File

@ -16,7 +16,8 @@
# # along with this script; if not, write to the Free Software
# # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ths-pocompare.sh - compare two translation files using diff, unwrapps first for best comparison.
# ths-pocompare.sh - compare two translation files using diff, unwrapps first
# for best comparison.
if [ $# -ne 2 ]; then
echo "Usage `basename $0` <file1> <file2>"

View File

@ -16,7 +16,8 @@
# # along with this script; if not, write to the Free Software
# # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ths-potopot.sh - converts po files to pot (template) files (basically strips all the translation).
# ths-potopot.sh - converts po files to pot (template) files (basically
# strips all the translation).
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` </directory/with/pofiles/>"

View File

@ -19,9 +19,9 @@
#
# ths-poupdate.sh - takes a bunch of files from a single directory and transfers the translations therein to a translation file tree; may use the new files either as primary, or as secondary translations.
## BŪTINIEJI PATIKRINIMAI PRIEŠ CIKLĄ
## First - the necessary checks before going into the loop
## FUNKCIJOS
## Declaring Functions
function usage() {
echo "Usage `basename $0` [options] <updated-file-dir> <translations-file-tree> <translations-template-tree>"
echo
@ -54,12 +54,12 @@ do
esac
done
# PATIKRINIMAS IR NAUDOJIMO PRANEŠIMAS
# Check and, if incorrect usage, print usage
if [ $# -ne 3 ]; then
usage
fi
## KELIŲ INTERPRETAVIMAS
## Change paths to variables
upddir=$1
tradir=$2
tpldir=$3
@ -83,7 +83,7 @@ else
fi
fi
## PAGRINDINIS CIKLAS
## MAIN LOOP
for updfile in $newtrans
do
@ -92,8 +92,7 @@ if [ `cd $tpldir; find ${updfile}t 2> /dev/null | wc -l` -gt 1 ]; then
echo "Strange, there is more than one template for `basename $updfile`,"
echo "cannot determine the right one,"
echo "SKIPPING..."
# kopijuoti naują failą į vertimų medį
continue # o gal ir ne taip daroma
continue
fi
if [ `cd $tradir; find ${updfile} 2> /dev/null | wc -l` -gt 1 ]; then
@ -103,8 +102,7 @@ if [ `cd $tradir; find ${updfile} 2> /dev/null | wc -l` -gt 1 ]; then
echo "unneeded file in your translation tree, check it out!"
echo "Cannot determine the right file to translate,"
echo "SKIPPING..."
# kopijuoti naują failą į vertimų medį
continue # o gal ir ne taip daroma
continue
fi
if [ `cd $tpldir; find ${updfile}t 2> /dev/null | wc -l` -lt 1 ]; then
@ -117,7 +115,7 @@ if [ `cd $tpldir; find ${updfile}t 2> /dev/null | wc -l` -lt 1 ]; then
skipped_files=$(($skipped_files+1))
fi
continue
# o gal ir ne taip daroma
fi
if [ `cd $tradir; find ${updfile} 2> /dev/null | wc -l` -lt 1 ]; then
@ -130,7 +128,7 @@ if [ `cd $tradir; find ${updfile} 2> /dev/null | wc -l` -lt 1 ]; then
cp $upddir/$updfile $tradir/$secdir/$updfile
fi
# atlikti msgmerge ir kitus veiksmus
# perform msgmerge and other actions
trafile=`cd $tradir; find $updfile`
tplfile=`cd $tpldir; find ${updfile}t`
mv $tradir/$trafile $tradir/${trafile}.old
@ -153,6 +151,7 @@ else
fi
fi
# delete the Rosetta/Launchpad headers, only needed if the file was imported from Rosetta
cat $tradir/${trafile}.new | sed '/X-Rosetta-Export-Date/d' > $tradir/$trafile
rm $tradir/${trafile}.new
rm $tradir/${trafile}.old