bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xgettext --no-wrap


From: Bruno Haible
Subject: Re: xgettext --no-wrap
Date: Tue, 16 Feb 2010 21:56:20 +0100
User-agent: KMail/1.9.9

Hi,

Thomas McCroskery wrote:
> I noticed while using xgettext with the -no-wrap command that this works
> fine for ...
> But, I noticed if my strings start with a white space, then the wrap
> will occur, as in
> 
> #: ..\wxSaver\IncidentImporterExporter.cpp:307
> msgid ""
> " already exists in directory.\n"
> "This entire record will be skipped."
> msgstr ""
> 
> Is there any way around this? To prevent the wrap around?

You mean, you want

  msgid " already exists in directory.\nThis entire record will be skipped."

There is no option for 'xgettext' or 'msgcat' to produce this. The reason is
that often a msgid contains 10 lines of about 60 characters, separated by
newlines ("\n"), and without the line break at the '\n' these result in very
long lines. Such long lines not only look ugly; they also cause some tools
to malfunction. (Ever tried to do syntax-coloring on a line of length 10000
in 'vim'? Ever used a non-GNU 'grep' program on a file with lines longer than
2000?)

This does not depend on the strings starting with a space or not, it is
the formatting used to highlight a newline for the translator.

If you wanted this in order to process PO files, please look at the 'msgexec'
and 'msgfilter' programs and at the libgettextpo library. These are made for
manipulating PO files in an easy and robust way.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]