no-wrap again (Re: [xliff-tools] PO overview for XLIFF mapping
guide)
Asgeir Frimannsson
asgeirf at redhat.com
Fri May 6 23:45:27 PDT 2005
Hi Bruno and Karl,
On Sat, 7 May 2005 04:23, Bruno Haible wrote:
> Asgeir Frimannsson wrote:
> > no-wrap
> >
> > Indicates that the text in the msgid field is not to be wrapped at
> > page with (usually 80 characters) which it usually is. Note that
> > this does not affect the wrapping of the actual source string, only
> > the representation of it in the PO file.
>
> Correct.
>
> Karl Eichwalder wrote:
> > No, the no-wrap tells the translator, that the program will display the
> > message as-is, that is, without changing any white-space using a
> > monospaced font. At least, the no-wrap flag in .c files was invented
> > with this in mind.
>
> This is not true, IMO.
> - The effects of /* xgettext: no-wrap */ are not documented in the
> manual.
> - The vast majority of terminal-based programs do no line-wrapping on
> strings retrieved through gettext(). If your assumption was true,
> most strings should carry the 'no-wrap' attribute. They don't.
>
Yeah, agree with you here Bruno. You were both [Bruno, Karl] involved in the
discussion leading to the implementation of this I believe (?), so there
might have been some mis-communication somewhere on the actual function of
the no-wrap flag, but anyway - I should stay out of that discussion :)
> Really, 'no-wrap' is only an indicator for the tools when creating a PO
> file. If a programmer wants to tell something to the translator, he uses
> plain comments like
>
> /* TRANSLATORS: Please make the translation fit in 79 columns,
> assuming a monospaced font. */
Ideally though, there would be a way to make such
a comment map to something like:
<trans-unit ... maxwidth='79' size-unit='char'>
<source>....</source>
<target>....</target>
</trans-unit>
meaning translators won't be able to add more than 79 unicode characters to a
single line in their editor.
...but I'm a bit a head of myself here - most editors does not honour the
maxwith attribute anyway - and it's certainly not an issue for the current PO
to XLIFF implementations :)
> > No, you cannot set the flag in the PO file using the --no-wrap switch.
>
> Correct. --no-wrap makes the tools behave as if there was a 'no-wrap'
> attribute on every message. But it doesn't add the attribute.
Yep. My mistake.
Thanks for your input on this guys, much appreciated :)
cheers,
asgeir
More information about the xliff-tools
mailing list