[Po4a-devel]Winedocs and Po4a dependencies

Martin Quinson martin.quinson@loria.fr
Fri, 27 May 2005 11:14:02 +0200


--0/kgSOzhNoDC5T3a
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 27, 2005 at 10:45:42AM +0200, Francois Gouget wrote:
> Martin Quinson wrote:
> [...]
>=20
> >>* Text::WrapI18N (perl module)
>=20
> Ok. I can understand why it would be important to use it for writing po=
=20
> files and Sgml files. It's a shame it's used everywhere but there ;-)=20
> (I've seen your other email explaining why it's that way).

exactly.
=20
> What I don't understand is why it is used to print informational and=20
> error messages. Won't the xterm wrap things on its own? It does just=20
> fine when I print a very long line in French or English. Doesn't it do=20
> the same CKJ languages? If not I'd say it is pretty broken.

It may be seen as cosmetics. We wanted the error location to be more
obvious, something like:

toto.sgml:43: you stupid user, you did it again and gave me a file where the
              <p> tag is not closed, even if I told you not later than 5
              minutes ago that you shouldn't.
toto.sgml:46: Oh well. This file is really crappy: you don't even close the
              <a> tag. This *is* an error you ought to fix.

It's not a plain wrapping, but respects the indentation we wanted to make it
look better (in our opinions). For sure, when the dependency is not there,
you could use print() without wrapping, it wouldn't breaking anything
(beside my/our sense of beauty wrt error messages ;).

> My next question has to do with the wrapper implementation. I did not=20
> check it out in details but it seems like it works on the multibyte=20
> string. Wouldn't it be possible to implement a wrapper using the Perl=20
> 5.8 Unicode support?

Maybe. But this version is not really widespread yet, is it? If you come up
with a working implementation of that (I'm really bad at such issues and
leave Denis or Jordi answer), you could test whether we are using perl >=3D
5.8 and if not, fallback to libtext-wrap18n-perl, couldn't you?

You could also not wrap anything when the dependency isn't there. As temp
solution, it would perfectly work, I guess.

Mt.

--0/kgSOzhNoDC5T3a
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFCluTaIiC/MeFF8zQRAgdtAJ97xshUA03EGeFeqMGap5JTVW3eZwCgg1RG
YNYXfM5r2qiDHf+Mi+0ZHVk=
=jqRV
-----END PGP SIGNATURE-----

--0/kgSOzhNoDC5T3a--