[CVS] scripts/di-docs README,NONE,1.1 po2xml.sh,NONE,1.1 setup.sh,NONE,1.1 sync2upstream.sh,NONE,1.1 xml2po.sh,NONE,1.1
- To: debian-l10n-russian@lists.debian.org
- Subject: [CVS] scripts/di-docs README,NONE,1.1 po2xml.sh,NONE,1.1 setup.sh,NONE,1.1 sync2upstream.sh,NONE,1.1 xml2po.sh,NONE,1.1
- From: Eugene Konev <ejka-guest@alioth.debian.org>
- Date: Fri, 30 Jan 2004 07:31:24 +0000
- Message-id: <[🔎] E1AmT7c-0005QJ-00@quantz.debian.org>
- Reply-to: debian-l10n-russian@lists.debian.org
Update of /cvsroot/l10n-russian/scripts/di-docs
In directory quantz:/tmp/cvs-serv20846/di-docs
Added Files:
README po2xml.sh setup.sh sync2upstream.sh xml2po.sh
Log Message:
Initial import
--- NEW FILE: setup.sh ---
#!/bin/sh
if [ -e language ]; then
. language
echo "This dir seems to be already setup for \"$L\" language"
echo
echo "If this is not the case -- remove the file \"language\" first"
echo "and run this script again"
exit -1
fi
if [ "x$1" = "x" ]; then
echo "Usage: $0 <YOUR_LANGUAGE_CODE>"
echo "E.g.: $0 ru or $0 pt_BR"
exit -2
else
L=$1
echo "L=$L" > language
fi
echo "Press enter when you are asked for CVS password"
cvs -z3 -d:pserver:anonymous@cvs.alioth.debian.org:/cvsroot/d-i login
cvs -z3 -d:pserver:anonymous@cvs.alioth.debian.org:/cvsroot/d-i co debian-installer/doc/manual/en
mv debian-installer/doc/manual/en .
rm -rf debian-installer
./xml2po.sh
--- NEW FILE: xml2po.sh ---
#!/bin/sh
if [ -e language ]; then
. language
else
echo "Run setup.sh first!"
exit -1
fi
XMLS=`find en -name '*.xml' -print`
for XML in $XMLS; do
XMLNAME=`basename $XML`
XMLDIR=`dirname $XML`
DIR=`echo $XMLDIR | sed 's/en//'`
NAME=`echo $XMLNAME | sed 's/\.xml//'`
POTDIR="templates/$DIR"
PODIR="po/$DIR"
LANGDIR="$L/$DIR"
POTNAME="$NAME.pot"
PONAME="$NAME.po"
mkdir -p $POTDIR $PODIR $LANGDIR
xml2pot $XML > $POTDIR/$POTNAME
if [ -e $PODIR/$PONAME ]; then
msgmerge --update $PODIR/$PONAME $POTDIR/$POTNAME
else
cp $POTDIR/$POTNAME $PODIR/$PONAME
fi
done
--- NEW FILE: README ---
BUGS/PROBLEMS/PREREQUISITES
This needs poxml from kde!
poxml (at least mine) is somehow buggy and doesn't extract all messages from xml
files. So, after po2xml.sh translated xmls should be checked and edited with hands
(I'm trying to solve this now).
USAGE
Run
setup.sh <LANGUAGE_CODE>
to setup the environment.
When upstream docs are changed run sync2upstream.sh
When you finished translating po files run po2xml.sh to build translated xml docs.
TODO
* Fix bugs.
* Probably drop poxml.
* Add more scripts / make usable for syncforge
* Use some ideas from here in syncforge
--- NEW FILE: sync2upstream.sh ---
#!/bin/sh
cd en
cvs -z3 up -dPA
./xml2po.sh
--- NEW FILE: po2xml.sh ---
#!/bin/sh
if [ -e language ]; then
. language
else
echo "Run setup.sh first!"
exit -1
fi
POS=`find po -name '*.po' -print`
for PO in $POS; do
PONAME=`basename $PO`
PODIR=`dirname $PO`
DIR=`echo $PODIR | sed 's/po//'`
NAME=`echo $PONAME | sed 's/\.po//'`
XMLDIR="en/$DIR"
LANGDIR="$L/$DIR"
XMLNAME="$NAME.xml"
po2xml $XMLDIR/$XMLNAME $PO > $LANGDIR/$XMLNAME
done
Reply to: