RenderKDEDocs

In this page I describe the steps that I had to take in order to generate PDF and HTML docs from translated .po docmessge files of KDE. Probably in the near future they will need to be updated, since KDE is switching from SVN to GIT.

So, I have translated the files sq/docmessages/kdeedu/kturtle*.po and I would like to convert them to PDF, HTML, etc. in order to read and check them properly.

$ ls sq/docmessages/kdeedu/kturtle*.po
sq/docmessages/kdeedu/kturtle_getting-started.po
sq/docmessages/kdeedu/kturtle_glossary.po
sq/docmessages/kdeedu/kturtle.po
sq/docmessages/kdeedu/kturtle_programming-reference.po
sq/docmessages/kdeedu/kturtle_translator-guide.po
sq/docmessages/kdeedu/kturtle_using-kturtle.po

I followed more or less the instructions described here:

Install the needed tools

sudo aptitude install kdesdk
sudo aptitude install kdelibs
sudo aptitude install imagemagick
cd l10n-kde4/
svn checkout svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/scripts  

Get a copy of 'documentation/kdeedu/kturtle/'

svn checkout svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/fr/docs/kdeedu/kturtle
mkdir -p documentation/kdeedu/
mv kturtle documentation/kdeedu/

ls -1 documentation/kdeedu/kturtle/
CMakeLists.txt
getting-started.docbook
glossary.docbook
index.docbook
mainwindow_flower_nrs.png
mainwindow.png
programming-reference.docbook
translator-guide.docbook
using-kturtle.docbook

Generate the XML docs

echo Albanian > sq/docmessages/language
cp -a /usr/share/kde4/apps/ksgmltools2/customization/{en,sq}
scripts/update_xml --nodelete --noupdate sq kdeedu kturtle

ls -1 '''sq'''/docs/kdeedu/kturtle/
getting-started.docbook
glossary.docbook
index.docbook
programming-reference.docbook
translator-guide.docbook
using-kturtle.docbook

Take lokalized screenshots with ImageMagic

`import -depth 8 -dither FloydSteinberg mainwindow_flower_nrs.png

Save them on sq/docs/kdeedu/kturtle/:

ls -1 sq/docs/kdeedu/kturtle/*.png
sq/docs/kdeedu/kturtle/mainwindow_flower_nrs.png
sq/docs/kdeedu/kturtle/mainwindow.png

Generate the HTML docs

mkdir -p sq/htmldocs/kdeedu/kturtle/
cd sq/htmldocs/kdeedu/kturtle/
meinproc4 ../../../docs/kdeedu/kturtle/index.docbook
cp -a /usr/share/doc/kde/HTML/en/common/ .
ls *.html | xargs sed 's,help:/,,g' -i
cp ../../../docs/kdeedu/kturtle/*.png .
cd ..
tar cfz kturtle_html.tgz kturtle/

Generate the PDF docs

cp -a /usr/share/kde4/apps/ksgmltools2/customization/dtd/      sq/docs/kdeedu/kturtle/
cp -a /usr/share/kde4/apps/ksgmltools2/customization/entities/ sq/docs/kdeedu/kturtle/
cp -a /usr/share/kde4/apps/ksgmltools2/customization/sq/       sq/docs/kdeedu/kturtle/
cp sq/htmldocs/kdeedu/kturtle/*.png                            sq/docs/kdeedu/kturtle/
xmlto --with-dblatex --skip-validation pdf                     sq/docs/kdeedu/kturtle/index.docbook
mv index.pdf Udhezuesi-KTurtle.pdf
xmlto --with-fop --skip-validation pdf                         sq/docs/kdeedu/kturtle/index.docbook

RenderKDEDocs (last edited 2011-06-27 17:44:45 by 109)