On 27/10/09 14:24 +0100, Cédric Krier wrote:
> On 26/10/09 23:37 +0100, Cédric Krier wrote:
> > On 23/10/09 10:01 +0200, Cédric Krier wrote:
> > > On 22/10/09 12:50 -0700, Tobias Paepke wrote:
> > > > 
> > > > hi,
> > > > 
> > > > just wanna hear what you all think about translated documentation like
> > > > the rst-files in the tryton/doc directory.
> > > > how can we archieve that?
> > > > Cause they are published on the tryton-homepage i'd like to see there
> > > > other translations as well.
> > > > 
> > > 
> > > We don't have yet find a good tool to translate rst file.
> > > 
> > 
> > I have spend sometimes to find a good/simple tool to translate rst or text
> > file but I did not find anyone.
> > 
> > So I had an idea, we could write a script that will use mercurial history to
> > show the change that have been made in english version since last change of
> > the translated version.
> > 
> 
> 
> Finally, we found a good tool writen in Python: translate-toolkit [1].
> It can generate po file base on text file (text2po) and after it can generate
> translated file from po file and template (orignal) file (po2text).
> I made some tests and it seems to work as we need.
> It seems well maintained.
> So I will write an ebuild for it and after I come back to propose a way to
> work.

Here is the way:
I used index.rst as file example but it must be done for every rst file.

- Create/Update pot file in doc directory:

    # txt2po doc/index.rst doc/index.pot -P

- Create the language directory:

    # mkdir -p doc/lang

- Create/Update language po file:

    # pot2po doc/index.pot doc/lang/index.po -t doc/lang/index.po

- Create/Update the language rst file:

    # po2txt doc/lang/index.po doc/lang/index.rst -t doc/index.rst

And so we will add to mercurial:
    doc/*.pot
    doc/*.rst
    doc/lang/*.po
    doc/lang/*.rst

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email protected]
Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgppq8CXTjn11.pgp
Description: PGP signature

Reply via email to