[email protected]: generating GSI/SDF file from translated PO files
Yesterday, I wrote
about generating PO files from PO Template files (POT files). And as I promised, this entry will
show next step needed to create GSI/SDF file for OpenOffice.org.
You have all (or some of them) PO files translated in the same structure as it was generated, in the
directory
PO
. To do the conversion process, you need the
po2oo
command
from
translate package. The current version is
0.8 rc1.
To install it, you can use this sequence of commands (you must have Python's distutils installed -
e.g. from
python-devel
RPM package on SUSE Linux):
tar xfz translate-0.8rc1.tar.gz
cd translate-0.8rc1
./setup.py install --home=/tmp/SOMEWHERE |
After the installation, you have to specify the path to the Python files using the following
command:
export PYTHONPATH=/tmp/SOMEWHERE/lib/python |
If you have root privileges or your private Python library, you probably know much better what to
do ;-) Now you can test
po2oo
command:
oo@oo:~/> /tmp/SOMEWHERE/bin/po2oo
usage: po2oo [--version] [-h|--help] [--progress PROGRESS] \
[-i|--input] INPUT [-x|--exclude EXCLUDE] [-o|--output] OUTPUT \
[-t|--template TEMPLATE] [--psyco PSYCO]
po2oo: error: You need to give an inputfile or use - for stdin; \
use --help for full usage instructions |
Now you have everything ready to transform your PO files to GSI/SDF file using the following
command:
/tmp/SOMEWHERE/bin/po2oo -l cs -t cs.sdf PO GSI_cs.sdf |
cs
is the ISO code for your language (cs if for my language,
Czech),
cs.sdf
is one of the GSI/SDF files used for generating POT files (see GSI
directory on my FTP server from where you got POT files),
PO
is the name of the
directory with PO files and
GSI_cs.sdf
is the final, long awaited GSI/SDF file that you
can use with
localize
tool with
-m
(merge) argument.
Please let me know if this description is enough or what should I describe more properly. Thanks!
-----