email@example.com: PO files and working with them
This diary entry will be the basis of the documentation for POT/PO files handling and OpenOffice.org
translation using them. Please send comments to
OpenOffice.org comes with POT files (see FTP server
is mirroring my directory at ftp.linux.cz
). Download the
latest file (right now, it is OpenOffice.org-SRC680_m63-POT.tar.gz
and unpack it somewhere. It contains POT files (*.pot) and the file
to generate GSI/SDF
file you can then
use while building your localized version of OpenOffice.org.
POT files contain entries like
This particular POT entry comes from file
. What does it mean? The
which contains translatable texts.
Texts to be translated are stored inside
files in the source code. They
are extracted using mechanism that is still to be described (it already is implemented in my build
system, but I haven't yet described it). But anyway: it is not that important for translators,
because they only need POT files.
Back to sample POT entry: the line starting with
allows people to look for the
string inside OpenOffice.org source code. This particular string comes
, and has identifier
. The string
itself is "File" (see msgid). The translation it empty, because it is POT file (PO Template). PO
files look very similar, but they have msgstr line filled in with the translation.
How to generate PO files for translators from these POT files? I wrote a script called POT2PO
which can be
used for two tasks:
- generating new PO files when you are starting with the translation
- updating existing PO files to newer version of POT files
Just read its commentary section and run it. You'll end up with new/updated
directory with new PO files. Now you translate them, generate GSI/SDF
file and build
with it. And that's all.
If you have any questions, please ask on
. Thanks for your feedback!