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

Re: i18l, gettext and (X)dialog



On Tue, Apr 25, 2006 at 11:52:14PM +0200, Michelle Konzack wrote:
> Xdialog --title "sampleprogi" --screen-center --no-cancel --wrap \
>         --backtitle "Here a text which show $FOO BAR" --fixed-font \
>         --textbox $FILE 30 $DLGW
> 
> this is working fine, but I want the Backtitle i18n.
> So I have tried:
> 
> BACKTITLE=`eval_gettext "Here a text which show \$FOO BAR"`
> Xdialog --title "sampleprogi" --screen-center --no-cancel --wrap \
>         --backtitle "$BACKTITLE" --fixed-font \
>         --textbox $FILE 30 $DLGW

What do you want to achieve?  Is the value of the variable already translated,
or untranslatable?  Or should the string be translated including the
substituted value?  In the latter case, you should remove the \ before the $.

What string should eval_gettext see as its argument?  You need to make sure
that it gets that.

> Xdialog --title "sampleprogi" --screen-center --no-cancel --wrap \
>         --backtitle "`eval_gettext \"Here a text which show \$FOO BAR\"`" \
>         --fixed-font --textbox $FILE 30 $DLGW

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.

I hope this helps,
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: