Translation documentation

From Mandriva Community Wiki

Jump to: navigation, search
As you may know, Mandriva Linux documentation is written under DocBook XML format, which is possibly the most common markup language for writing documents.


Contents

Maintained with PO

Mandriva Linux documentation is managed through Borges, which is a tool which can compile XML into HTML and PDF via "make". In order to make it easier to keep changes of the original XML file (called "module"), Borges introduces a new XML attribute "revision". While compiling documents, Borges can give a report on which elements are not "synched" by comparing the revision attributes of original and translated modules.

Some translators do not feel at ease with the XML format, even aided by Borges. So, I try to release the translators by introducing PO into translating.


Directory Hierarchy and How-to

At the time I'm writing this article, Mandriva Linux documentation is organized as follows:

doc/
   manualB/
   MDKL-doc-unofficial/
      images/
         zh_cn/
   po/   <--- here we are
      templates/
         modules/
         entities/
      zh_CN/
         modules/
         entities/

As a contributor focused on translating, you might have seen this hierarchy in KDE SVN: You can find a lot of POTs in templates/modules, and POs merged by scripty in LANG/modules.

All you need to do is to translate POT in templates/modules, then put the PO into LANG/modules.

Changes after LE2005:

You must put the translated images into the MDKL-doc-unofficial/images/LL directory.


Technical Issues

Currently, the converting between XML and PO is done via xml2po, which is a simple Python script. In fact, only two files are needed: xml2po.py and docbook.py.

The PO repository is currently maintained by Funda Wang, which means I've setup a cron script that does following. You can find the scripts in doc/po/*.sh:

  1. Converts XML to POT, merge POs with correspoding POT (currently runs twice a day);
  2. Backports PO to XML (currently runs once a day);

If you want to see the compiling results of your translation, you should have the borges package installed:

# urpmi --auto-select borges
# cd path_to_cvs/doc/MDKL-doc-unofficial
# ./configure
# make


Existing translations

To dear pl, ru and other language translators, I'm sorry that I haven't ported your existing translatons to po format. You might want to do it by hand. Just have a look at po/forwport.sh.


Subversion

Anonymous access of the svn repository

  • To create a local copy of the svn documentation repository

mkdir ~/svn-mandriva-doc
cd ~/svn-mandriva-doc
svn co http://svn.mandriva.com/svn/doc/MandrivaLinux/trunk/content/Distrib/ doc

See also

External links

An xml editor, that lets you edit the content of an xml file, without affecting the syntax code.
Personal tools