After translate KDE documentations, I need to validate all translated docs in both spelling and XML tags. Because the final result will be in docbook format and if there's anything wrong, the documentation will not be shown in khelpcenter.
First off, there's a tool called ksgmltools2 which contains many many entities used in kde documentations and there's no entity set for Thai (th)!!! (Maybe because there's no one starting documentation translation before - -') Alright, I already created one and submitted it to svn. So, the next release will contain this set. (Many thanks to Albert, telling me about this) You can't translate docbook (xml) to html correctly without this.
Next, a directory containing English docbooks called documentation from svn is needed. (get it from svn co http://websvn.kde.org/kde/branches/stable/l10n-kde4/documentation/) Keep it outside the language directory (th).
Next use po2xml to transcribe docs .po files to docbook like this:
po2xml english.docbook translated.po > translated.docbook
The english.docbook resides in documentation directory and the translated.po is in th/docmessages/
Next, validate the xml (docbook) file created using meinproc4:
meinproc4 --check translated.docbook
If there's nothing wrong, many html files will be created and can be displayed in any browser. However, if there's something wrong in syntax meinproc4 will produce output so that you can go and correct the error parts (in po, of course).
Another way is to use update_xml script. However, this script will delete .docbook and display error output if there's something wrong with syntax, so don't forget the --nodelete option. Before using this script, make sure that there's a file named lanuage, containing name of language (i.e. Thai) in docmessages directory.
scripts/update_xml --nodelete th package
The final output is docbook files in directory docs in language (th) directory.