Conversion of Rosetta's OOo-templates into a SDF-file

Example for the Kurdish translation (ku)

To be able to use the shellscript, the directory structure should be like this:

debian/convert2oo       - script below
debian/l10n/export      - exported sdf files (not needed)
debian/l10n/ooo-base/ooo-base.pot
debian/l10n/ooo-base/ku.po
[...]

Then run the script with

sh debian/convert2oo ku

After that the files should be in the directory debian/l10n/ku.

Now type

cat debian/l10n/*.sdf2 > GSI_ku.sdf

and everything is ready for upstream.

FIXME it seems the .sdf-files have to be renamed to .oo

Please note that you will need translate-toolkit version 0.8rc6.

The shellscript

#! /bin/sh
 
_convert2oo()
{
    local lc=$1
    [ "$lc" = en-US ] && return
    rm -rf $basedir/$lc
    mkdir -p $basedir/$lc
    #$basedir/../splitgsi $basedir/export/GSI_$lc.sdf $basedir/$lc
    cd $basedir/$lc
    for f in *.sdf; do
        d=${f%*.sdf}
        echo $d
        rm -rf $d
        mkdir $d
        cp -l ../$d/$lc.po $d/$d.po
        po2oo --multifile=onefile -l $lc -i $d/ -o ${f}2 -t $f
        rm -rf $d
    done
    cd - >/dev/null
}
 
convert=`basename $0`
 
for lc in "$@"; do
    echo $convert $lc
    _$convert $lc
done

Thanks to Matthias Klose (DoKo) for the script.

 
wergerandin/matthias_klose.txt · Guherandina dawî: 2006/04/18 11:00 by erdalronahi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki