On Tue, Jun 12, 2007 at 04:24:35PM +0200, Christian Perrier wrote:
> > > If you have read so far, please find the POT file in attachment.
> > 
> > All strings (except the last) end with "\\n". Should this be "\n"
> > instead?
> 
> 
> Let's ask Bill. I suspect that some reason needs this double escaping
> to be needed, though.

Yes, su-to-root is a shell script, so I am using gettext(1) and not
gettext(3).
Compare:
in C:
printf(gettext("Hello World\n"));
in POSIX sh:
printf "$(gettext "Hello World\n")"

In C \n is replaced by a new line inside the string by the compile
before gettext is called (the new line is reconverted to \n in the POT
file).

In POSIX sh, \n is not expanded inside strings:
$ echo "Hello World\n"
Hello World\n
Instead it is expanded by printf. This means that gettext see the \n
(which is escaped to \\n in the POT file).

Cheers,
-- 
Bill. <[EMAIL PROTECTED]>

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to