Re: doc-i18n-tool



On Mon, Oct 22, 2001 at 12:55:38AM -0400, Gregory Leblanc wrote:
> On Wed, 2001-10-10 at 14:38, Jonathan Blandford wrote:
> > Hi,
> > 
> > Daniel and I managed to whip up a small tool for generating a pot file
> > to and from a sgml/xml file.  It seems to work pretty well for a quick
> > hack, and I don't know how complicated this needs to be.  It needs a
> > little cleaning up ('--help' doesn't work and there are other argument
> > oddities) and a man page as well, but it might be worth starting to work
> > with it.
> 
> > It'd be nice to move to docbook xml ASAP, as we can use the xmllint
> > tool, then.  Daniel, can we add a --sgml style arg to xmllint to handle
> > docbook-sgml?  There's no reason we'd want to ever install these po
> > files, as this should be done in CVS by the translator.

  Done, I also fixed the DTD generated when saving the resulting XML
so that the output validates against DocBook XML 4.1.2 with the exceptions
of changes between the SGML version and XML one. It's in CVS now.
  It's not a generic tool, it is also not ready to parse documents outside
ISO Latin (using iconv(1) to convert the SGML to UTF8 first is a good idea),
it will have troubles with internal subset and possibly external parsed
entities, but it is there. Otherwise use sgmlns to convert to XML.

> > Another problem is that we are over-sensitive.  Ie, if we run into
> > passages like: <para>... mail to <email>accounts@gnome.org</email>
> > with...</para>, we probably don't want to do the <email> section
> > separately.  It think we'll need to add some docbook specific hacks to
> > catch 'leaf' nodes like this to condense into the doc.
> 
> Yeah, this is something that we'll definately want to work on.  Does
> anybody know if there's a systematic way to determine if these things
> are "inline" versus "block level"?  (hint, hint, Dave?)

  Basically it could boil down to a list of elements whose text nodes
don't need to be converted, in that case it's easy to exclude them.

> > Comment?
> 
> I just nagged a few people from #i18n into playing with this tonight,
> and, at least on my test document, the .pot file isn't good.  Here's a
> wee bit from it:
> 
> #: policies.sgml:4
> msgid "\n"
> "  "
> msgstr ""
> 
> I poked Daniel about this on IRC (although as it turns out, I'm almost
> too sleepy to ask constructive questions there), and he suggested that
> "maybe the parser needs to be instructed to ignore whitespace".  I'll
> stop right here, before I ramble too much further, and hopefully
> somebody can take a look at this today.  Later,

  Hum, I will let Jonathan check this one.

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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