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

Re: i18l, gettext and (X)dialog



On Sun, Apr 30, 2006 at 03:39:34PM +0200, Michelle Konzack wrote:
> > What string should eval_gettext see as its argument?  You need to make sure
> > that it gets that.
> 
>         "Here a text which show \$FOO BAR"

I'll assume you mean literally that, without the double quotes.  In that case,
you should use single quotes instead of double quotes.  This is because double
quotes still let most substitutions happen, including \$ -> $.   That means
that the string that eval_gettext will see is:

	Here a text which show $FOO BAR

> > This gives eval_gettext several arguments instead of one, which is very
> > unlikely to be what you want.  Also, you actually give the quotes to it,
> > which also doesn't seem to be what you want.
> > 
> > A good way of debugging this is by using echo instead of eval_gettext.  It
> > will show you exactly what string is given to it.
> If I try
> 
> Xdialog --title "sampleprogi" --screen-center --no-cancel --wrap \
>         --backtitle "`echo \"Here a text which show \$FOO BAR\"`" \
>         --fixed-font --textbox $FILE 30 $DLGW
> 
> it is outputed correctly,

1. It is output including the quotes, which is probably not what eval_gettext
   needs.
2. It is output without the \, which may not be what eval_gettext needs (at
   least above you seem to say that it wants the \ as well).
3. You can't see it, but echo received the words as separate arguments.  It
   outputs them by putting spaces in between.  eval_gettext may not accept
   that at all (I'm not actually familiar with it, so I don't know).

Thanks,
Bas

-- 
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
   in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://129.125.47.90/e-mail.html

Attachment: signature.asc
Description: Digital signature


Reply to: