Wednesday, February 13, 2008

This entry was posted from my Wii

Well, yes, I posted this entry from my Wii using Opera browser and a usb keyboard.

For a new version of Wii, you have to buy the Internet Channel which is the Opera browser, costing 500 Wii points. It is fine in browsing www, posting blog, checking emails. It can't display Thai, though (of course, Thai input is impossible). The screen estate is quite important, because if you use Wii browser on a small screen TV, you can't read anything comfortably. The page have to be magnified using '+' button and contents need to be scrolled up and down, back and forth. Input system is quite awkward, needing to switch to the input screen everytime you need to in put text. Well it's not a good idea to use Wii internet channel for everyday use, replacing your PC (or iPhone :P ) browser. Just occasional browsing when you're stuck with your game on Wii is fine.

Sunday, February 10, 2008

Documentation translation

Another memoir...


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.

That's it!