Problems translating faqguide [Fwd: Re: xml2po]

Claude Paroz paroz at email.ch
Wed Sep 14 12:02:45 UTC 2005


Le mercredi 14 septembre 2005 à 12:43 +0100, Matthew East a écrit :
> Dear all,
> 
> we have some very serious problems translating the faqguide. I believe
> that this is caused by the fact that the document is in a number of
> different files, although a more accurate technical explanation has been
> provided by danilo of gnome-doc-devel in the below email.
> 
> To a certain extent, this problem is a little bit too complex for me, so
> any help or suggestions would really be welcome.
> 
> A possibility is merging the faqguide back to one file (faqguide.xml),
> ensuring that it validates properly, and then redoing the .pot file and
> uploading it. What do people think of this idea?

I have a script that deals with a multiple files DocBook document, but
it uses the former xml2pot tool (from KDE).

Are you interested to this one ?

Claude

> 
> Matt
> 
> -------- Forwarded Message --------
> > From: Danilo Šegan <danilo at gnome.org>
> > To: mdke at ubuntu.com
> > Cc: gnome-doc-devel-list at gnome.org
> > Subject: Re: xml2po
> > Date: Wed, 14 Sep 2005 13:02:01 +0200
> > 
> > Hi Matthew,
> > 
> > Today at 11:52, Matthew East wrote:
> > 
> > > The relevant xml file can be found here:
> > > https://docteam.ubuntu.com/repos/branches/breezy/generic/faqguide/C/installing-applications.xml
> > 
> > This file is not even well-formed XML.  xml2po really can't work with
> > such files, even though it tries sometimes.  However, you are
> > referencing entities which are not defined, so xml2po is pretty much
> > lost.
> > 
> > A good test if xml2po will be able to handle a file is to pass it
> > through "xmllint": if there are no errors, you're pretty safe.
> > 
> > Also, it's suggested that you use "-e" option (replace all entities,
> > this is really essential for any translation, since a single entity
> > might take a number of forms in translations, and only translator
> > knows when they need which), and to use "xinclude" mechanism for
> > multi-file documents.  Gnome release notes are a good example of all
> > this, and they live in Gnome CVS under 
> > 
> >   gnomeweb-wml/www.gnome.org/start/2.12/notes/
> > 
> > 
> > Also, I have some plans to support this kind of documents, but it
> > involves a couple of ugly hacks which I am not really looking forward
> > to implementing (such as extracting DTD node from another document,
> > inserting it in the current document tree, then trying to parse that 
> > combination, and stripping the DTD node on output).
> > 
> > > As you can see, a number of paragraphs are put on the same line of
> > > the .pot file, and loads of the entities (e.g. &ubuntu;) have been
> > > missed out.
> > 
> > Exactly—entities are undefined, so xml2po does best it can: it ignores
> > them.
> > 
> > Really, I think you should restructure your document to be more suited
> > for translation, and that would also make it a lot easier for
> > maintenance as well.
> > 
> > If you need a quick solution, you can simply use "xml2po -e" on your
> > top-level document (faqguide.xml), which will include all the files
> > correctly, but you'll be able to get only a single merged .xml file
> > that way. 
> > 
> > I can also suggest that you make use of gnome-doc-utils build system,
> > and migrating is described at:
> > 
> >   http://live.gnome.org/GnomeDocUtilsMigrationHowTo
> > 
> > 
> > Cheers,
> > Danilo





More information about the ubuntu-doc mailing list