[Po4a-devel]Re: [Po4a-commits] po4a/t 02-TransTractors.t,1.8,1.9

Denis Barbier barbier@linuxfr.org
Sun, 27 Feb 2005 19:23:37 +0100


On Sun, Feb 27, 2005 at 06:20:25PM +0100, Nicolas Fran=E7ois wrote:
> On Sun, Feb 27, 2005 at 06:08:06PM +0100, Denis Barbier wrote:
> > On Sun, Feb 27, 2005 at 05:12:24PM +0100, Nicolas Fran=E7ois wrote:
> > > Hi,
> > >=20
> > > On Sun, Feb 27, 2005 at 04:54:30PM +0100, Denis Barbier wrote:
> > > > On Sun, Feb 27, 2005 at 03:28:52PM +0000, Nicolas FRAN??OIS wrote=
:
> > > > >   * change back non breaking spaces to '\\ ' in the PO files fo=
r man pages.
> > > >=20
> > > > I quickly read previous messages but did not realize that this ch=
ange
> > > > was needed.  Adding "\\ " is much less natural than a non breakin=
g space
> > > > (at least for those who are used to write this glyph), so can you=
 please
> > > > explain why this conversion was troublesome?
> > >=20
> > > Using non breaking spaces by default is troublesome because all enc=
odings
> > > don't support this glyph, and thus the generated PO may be invalid =
in some
> > > cases.
> >=20
> > Ok, this is indeed troublesome in msgid, but should seldom happen.
> > Is there a way to keep "\\ " in msgid but convert to non breaking
> > space in msgstr?
>=20
> Yes and no.
>=20
> With the default behavior, msgid will contain "\\ ". Then, a french
> translator may use non breaking space in msgstr if he wants.
>=20
> But, during a gettextization (with an original and translation), msgid =
and
> msgstr will be handled the same way (both having "\\ " or non breaking
> space).
>=20
> I can't see a way to have msgid with "\\ " and msgstr with non breaking
> spaces in this case

I had another look at the "Non breaking spaces in man pages" thread;
being on vacation during this period I could not post.

Your with-non_breaking_spaces and with-hyphen_to_minus options look
bogus to me.  The reason is that the POT file is unique, and thus
msgmerge won't be able to handle PO files if their msgid are different.

> Then, if you really need this, you can cheat a little bit with gettext
> tools.
> Or, if original is in English:
> English doesn't use non breaking spaces (IMHO), English man pages (most=
ly)
> use them to indicate that two words are in the same argument, and thus
> only appear in short macro lines. Thus a simple sed script could do the
> trick (with the "-o with-non_breaking_spaces=3D1" option).

Then manual pages should be fixed by replacing
  .B foo\ bar
by
  .B "foo bar"

Denis