[Po4a-devel]Some comments

Martin Quinson mquinson@ens-lyon.fr
Tue, 27 Apr 2004 16:39:23 +0200


--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Apr 21, 2004 at 11:44:34PM +0200, Jordi Vilalta wrote:
> Hi.
>=20
> Sorry for the delay in this answer, currently I'm busy with the=20
> university, so I won't be very active. I'll try to work in the=20
> translations when I'll have more free time.

Dude, 2 days are a very quick answer, isn't it?

> On Wed, 14 Apr 2004, Martin Quinson wrote:
> > On Tue, Apr 13, 2004 at 08:03:51PM +0200, Jordi Vilalta wrote:
> >
> > [skip intro]
> >=20
> > > Recently I tried the po4a-gettextize with a DocBook XML document that=
 I'm
> > > starting to write and I found some problems.=20
=20
[...]

> > > Then I deleted the first line, which is xml specific:
> > > <?xml version=3D"1.0"?>
> > > and this error disappeared. Apart from this line, the rest is a valid=
 SGML=20
> > > DocBook. Would there be an easy way to auto-detect and bypass it? (Th=
en=20
> > > I think you could officialy say that po4a supports DocBook XML docume=
nts=20
> > > at the same level as DocBook SGML)
> >=20
> > I just commited a fix to the CVS. If this line is found when trying to =
use
> > the SGML backend, it will write the following warning:=20

[...]

> It detects if there is that line, but now it seems it fails when=20
> searching for the DTD:
>=20
> File kk.xml have an unknown DTD
> Supported for now: debiandoc, docbook.
>=20
> It may be that it is still watching at the first line of the file, not th=
e=20
> second.

Erm, I prefer not to detail what exactly it looks for ;) Let's say that the
CVS version is "a bit broken". Let me commit what I have locally, and it
should do the trick.

> Here's what I've tried:
> ...
> <!ENTITY aaa "aeiou">
> ]>
> ...
> <para>
> &aaa;
> </para>
> ...
>=20
> and in the po generated by po4a-gettextize:
>=20
> # type: <para></para>
> #: kk.xml:26
> msgid "&aaa;"
> msgstr ""

And you got nothing, right?=20

po4a skips the generation of msgid containing an entity only (or tags only).
It will now issue a warning when such optimizations are done. Thanks for the
repport. [At least this is what I planned, but the msgid containing spaces
along with entities where not detected. This is also fixed]

It was furthermore impossible to translate the content of the entity because
it was not implemented. This will be fixed as soon as I find the time to
commit my local version into the CVS. At least, I hope so ;)

> > > The inclusion entities are also important, but if we could treat each=
 file=20
> > > alone it would be good enough for now :)
> >=20
> > Inclusion entities are handled... What was your problem when using them?
>=20
> Well, last day I only tried that with included files that had entities=20
> including other files... It wasn't handled. I used the following
> construction:
>=20
> ...
> <!ENTITY % common SYSTEM "common.ent">
> %common;
> ]>
>=20
> I don't know if it's somewhat strange. The DocBook parser accepts it.=20
> The common.ent file has only entities, which are extended in the main=20
> document definition.

If that's legal (ie, if nsgmls accepts it, I'll have to accept it. Again,
please fill a bug about this (another one). Do not forget to attach a
example file being valid, but refused by po4a. For example, are you sure
that it's %common; and not &common; ?

> Now I've tried to include a file with:
>=20
> <!ENTITY chapter SYSTEM "chap1.xml">
> ]>
> ...
> &chapter;
>=20
> and its contents now appear on the .po as expected.

At least, something works ;)

> > > I've also found that there may be some attributes important to transl=
ate=20
> > > (such as the "lang" one), and it seems to be ignored for now.
> >=20
> > Yeah, ignoring them is bad. but the parser used for now does not give s=
imple
> > access to them. I dunno what to do.
> >=20
>=20
> Don't worry, that's a minor thing if the rest gets working ;)

It's worthing a bug, also ;)



Thanks for your time, such feedback is very very valuable to the software.=
=20
Bye, Mt.

--=20
Outlook is a good virus spreading tool. It was also doubtfully reported as
able to send mail.

--yrj/dFKFPuw6o+aM
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAjnCbIiC/MeFF8zQRAnRhAJ9mn28rYFcPpf8Nt4hHqIJ6C70idACgt8At
a+KAGkfgLXD3+/C9Fp0Dqco=
=R0tA
-----END PGP SIGNATURE-----

--yrj/dFKFPuw6o+aM--