help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-texinfo] Translation files in texinfo format


From: Patrice Dumas
Subject: Re: [help-texinfo] Translation files in texinfo format
Date: Fri, 9 Aug 2013 11:40:26 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Thu, Aug 08, 2013 at 11:14:33PM +0000, Karl Berry wrote:
> 
> Perhaps it would be possible to somehow "import" a Texinfo manual into
> gettext (paragraph by paragraph?) to ease handling of updates, but I
> have no idea how to do so; address@hidden would be the place to get
> ideas along those lines, I think.  (Unless someone else here chimes in.)

At some point, Bruno Haible wanted to use the Texinfo XML to break
text in paragraphs and other translatable units, feed it to something
that would have been like a po file and give back some translated
Texinfo or something along those lines.  I developped util/txixml2texi
for that use case, though it is certainly useful on its own.  My
understanding is that Bruno wanted to use XML for both the tools that
process manuals for translation and the "language" that translators are
presented with to have something more or less 'normalized' and avoid
doing specific work/training for each of the formats used for manuals.
I have no idea whether Bruno did something concrete along those lines 
or if it remained as a plan.  I put Bruno in CC.

Now that there is an intermediate representation of Texinfo as a tree in
texi2any, it should not be too hard to put paragraphs and other
translatable units in po files or the like.  It is not completly obvious
either, for instance footnotes have to be treated especially, maybe raw
formatting sections too.  To turn the translated units back to a
document, maybe a backend similar to the one that selected the units to
be translated, run on the original untranslated manual could allow to
reconstitute a tree with translated Texinfo that could then
straightforwardly be turned to a manual.

I like the plan of Bruno better, though, as it allows avoiding
duplicating efforts.  


XML may not be the perfect format, though, as it is not completly
obvious that every documentation format may be represented as a tree.
Before Texinfo 5, in fact, it was not clear that it would be possible
for Texinfo.  We had to forbid some constructs for that, though it was
not an issue in practice.  Some elements of the language (user defined
macros, values) still cannot be represented in a tree.

Here is an example of constructs we had to forbid:

  Some text in a paragraph @emph{emphasized text

  Still in emphasized text in a new paragraph?} Following text.

Or even

  @emph{
  First para.

  Second para.
  }

In my recalling TeX also didn't like that construct, which made the
decision to forbid it easier, but it shows that it is not too hard to go
for a structure that cannot be represented as a tree and would therefore
not have obvious mappings to and back from XML.

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]