This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to generate the translated documentation from .po files?

Tags: None
(comma "," separated)
Wizzard
Registered Member
Posts
35
Karma
0
OS
Hello

I have started to translate the KDE documentation to Slovak. There was nothing translated, except one single file, and no .po files were created from .pot files at svn. So I created all those files and filled them using TM in Lokalize.

I would like to test this partially translated documentation but dont know how to do that. I read something about po2xml program, so I tried it at krusader.po file, which generated a docbook file, which I copied to the directory /usr/share/doc/kde/HTML/sk/krusader/ as index.docbook. When I opened the help center with Krusader, it rendered an empty page. After deleting that index.docbook, the Krusader help page showed English page again.

How to generate all the documentation from all of my partially translated .po files?


KDE Slovak translation team translator and coordinator
User avatar
yurchor
Registered Member
Posts
64
Karma
1
OS
It is not that simple. KDE uses meinproc4 to convert docbooks into HTML first. To have main page (index.html) successfully converted and validated you should copy all other parts (English sections and chapters) into /usr/share/doc/kde/HTML/sk/krusader/ . However the first rendering and archiving by gzip is not very fast, so be patient to see the results.

But the first rule should be as follows: use update_xml for this to obtain 100% translated and valid docbooks. Do not translate large docbooks (over 1000 messages) if you do not have time or manpower to finish the translation. Even 99% translated manual will not be released.
User avatar
yurchor
Registered Member
Posts
64
Karma
1
OS
It can be helpful to use a script to automate Slovak docbook generation. Just copy English docbooks and Slovak po into the same temporary directory, create /sk subdirectory and run something like this
Code: Select all
#!/bin/sh

for i in *.docbook
do
     po2xml $i krusader_${i%.*}.po > sk/$i
done
po2xml index.docbook krusader.po | sed "s/English/Slovak/g" > sk/index.docbook
You will have the material to place in /usr/share... in /sk.

But please note that Slovak translation for KDE entities should be added to kdelibs to produce the full valid translation. ;)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]