no-wrap again (Re: [xliff-tools] PO overview for XLIFF mapping guide)

Karl Eichwalder ke at suse.de
Fri May 6 05:28:40 PDT 2005


Asgeir Frimannsson <asgeirf at redhat.com> writes:

> I sat down trying to write a *brief* overview of the PO file format (and 
> gettext), for the PO mapping guide. Any input on how to improve it would be 
> appreciated :) 

Well done - there is just the no-wrap issue ;)

    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.

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.  Let's look at the gettext example once again:

      /* xgettext: no-wrap */
      printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions.  There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"),

Here the the programmer wants to make 'xgettext' and thus the translator
aware, that "Copyright (C)..." must be on a line of its own in the
translation as well.

It is just a side affect that it will not get wrapped in the PO file;
the goal, of course, is to make it possible to display it to the user
unwrapped.

    This flag is set by developers in the source code, or by adding a
    command-line flag when invoking the Gettext tools.

No, you cannot set the flag in the PO file using the --no-wrap switch.

-- 
Key fingerprint = B2A3 AF2F CFC8 40B1 67EA  475A 5903 A21B 06EB 882E


More information about the xliff-tools mailing list