i18l, gettext and (X)dialog
Hello,
I hope I can ask here, because you are the i18n special1sts and from
none of the other mailinglists I have gotten a suitable answer.
OK, I have gotten a couple of tools and frontends which are using
(X)dialog but unfortunatly they are only in english.
OK, no problem, - I was thinking...
Most displayed text are now i18n but there is a problem with
"--backtitle" in (X)dialog.
The original looks like:
----8<--------------------------------------------------------------
Xdialog --title "sampleprog" --screen-center --no-cancel --wrap --backtitle "Here a text which show $FOO BAR" --fixed-font --textbox $FILE 30 $DLGW
----8<--------------------------------------------------------------
this is working fine, but I want the Backtitle i18n.
So now I want to internationalize this Dialog and
I have tried:
----8<--------------------------------------------------------------
Xdialog --title "sampleprog" --screen-center --no-cancel --wrap --backtitle "`eval_gettext "Here a text which show \$FOO BAR"`" --fixed-font --textbox $FILE 30 $DLGW
----8<--------------------------------------------------------------
which does not work. Same for
----8<--------------------------------------------------------------
Xdialog --title "sampleprog" --screen-center --no-cancel --wrap --backtitle "`eval_gettext \"Here a text which show \$FOO BAR\"`" --fixed-font --textbox $FILE 30 $DLGW
----8<--------------------------------------------------------------
and
----8<--------------------------------------------------------------
Xdialog --title "sampleprog" --screen-center --no-cancel --wrap --backtitle "`eval_gettext 'Here a text which show \$FOO BAR'`" --fixed-font --textbox $FILE 30 $DLGW
----8<--------------------------------------------------------------
Then I have tried to translate the Sting before the Xdialog with
----8<--------------------------------------------------------------
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
----8<--------------------------------------------------------------
which was not working too. So the only thing working was to echo the
Xdialog into a script and source it like
----8<--------------------------------------------------------------
TMPFILE=`mktemp -t sampleprog.XXXXXX || exit 0`
echo -n "Xdialog --title 'sampleprog' --screen-center --no-cancel --wrap --backtitle '" >$TMPFILE
eval_gettext "Here a text which show \$FOO BAR" >>$TMPFILE
echo "' --fixed-font --textbox $FILE 30 $DLGW" >>$TMPFILE
. $TMPFILE
rm -f $TMPFILE
----8<--------------------------------------------------------------
which is a little bit crazzy! I do not like to rewrite thos dialogs
and do not want to have the hassles if the scripts die without
cleaning up the $TMP, to have tonns of tempfiles laying around.
(it was allready happen)
So now my question to you i18n profis:
How can I get it running?
Oh yes, the old version $"Some text to translate." was working fine,
but it is deprecated and a security problem (see manpage).
Greetings
Michelle
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: