[Koha-docs] Translation of manual using pootle

Bernardo Gonzalez Kriegel bgkriegel at gmail.com
Thu Aug 30 13:45:53 CEST 2012


On Wed, Aug 29, 2012 at 11:30 AM, Galen Charlton <gmcharlt at gmail.com> wrote:

> The better version of my patch is now available in the load-dtd branch
> and I've submitted a merge request to the maintainer.
>
>
Well, with a fixed itstool, then I would like suggest following procedure

Prerequisites: working copy of kohadocs.git with 3.8.x branch,
translate-toolkit and Galen's fixed "itstools"
(Galen points that itstool do a better job to create PO files, expanding
character entities)

1) To create initial PO file (I use some variables as example)
DOCGITDIR=(where kohadocs.git lives, 3.8.x branch)
DSTDIR=(pootle, etc., where translation takes place)
LANG="xx"
LOCALE="xx_YY"
VER="38"

cd $DOCGITDIR/en/
itstool -d --lang=$LANG -o /tmp/$LANG-$VER-manual.pot manual.xml
msginit -i /tmp/$LANG-$VER-manual.pot -o
$DSTDIR/$LANG-$VER-manual.po --locale=$LOCALE --no-translator
rm /tmp/$LANG-$VER-manual.pot

Next do some translation on PO file.

2) To update PO files from updated manual
(same variables, updated repository)

cd $DOCGITDIR/en/
itstool -d --lang=$LANG -o /tmp/$LANG-$VER-manual.pot manual.xml
msginit -i /tmp/$LANG-$VER-manual.pot -o /tmp/$LANG-$VER-manual.po
--locale=$LOCALE --no-translator
msgmerge -U $DSTDIR/$LANG-$VER-manual.po /tmp/$LANG-$VER-manual.po
rm /tmp/$LANG-$VER-manual.po*

3) To create translated version of the manual
(same variables, updated repository)

cd $DOCGITDIR/
msgfmt -o /tmp/$LANG-$VER-manual.mo $DSTDIR/$LANG-$VER-manual.po
itstool -d --lang=$LANG -m /tmp/$LANG-$VER-manual.mo -o $LANG/manual.xml
en/manual.xml
rm /tmp/$LANG-$VERSION-manual.mo
And eventually commit...

All this should be done on the translation server,
 (1) once,
 (2) periodically or when Nicole commits,
 (3) periodically or with a new release...
but Frédéric want someone else to try if the procedure works.

So, if someone wants to try ...

Regards,

Bernardo
-- 
Bernardo Gonzalez Kriegel
bgkriegel at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.koha-community.org/cgi-bin/mailman/private/koha-docs/attachments/20120830/dcb33b3b/attachment.htm>


More information about the Koha-docs mailing list