itools.odf: An Office Document Translation infrastrucure

itools.odf: An Enterprise Document Translation Infrastrucure

  • Developers: Sylvain Taverne
  • Mentors: Hervé Cauwelier

AbstractThe itools library includes an XML engine and localization tools to extract messages, and merge translations back into a copy of the source document.

he OpenDocument Format (ODF) is mostly an XML document with a clean separation of contents, style and layout.

The idea is to implement the semantics of the OpenDocument XML namespace and reuse the internationalization infrastructure from itools.

ODF Internationalization Infrastructure

Goals

  1. To load the XML document containing the contents and separate it from the extra information.
  2. To generate a translation template (.pot) from the source language.
  3. To merge the translation (.po) from human translators back into a copy of the source document using the same style and layout.
  4. To be able to reuse the same workflow with a updated revision of the source document and update the translations without having to start all over again (merging).

Status

Accepted and merged in the stable branch. Browse the source code

Usage

Install itools and the gettext package from your system.

Extracting text

$ igettext-extract.py document.odt > locale.pot

Add a new translation

$ cp locale.pot pt.po

Update an existing translation

If the master document changes:

$ msgmerge -U -s pt.po locale.pot

The Human Translator

Editing the XX.po files... No help is provided here. :-)

The Build Process

$ igettext-build.py document.odt pt.po -o document_pt.odt

Appendix

To automatize the process an option is to write a Makefile.