Bug 559226

Summary: gtk/ncurses: Allow escaping of literal '&' in UI strings
Product: [openSUSE] openSUSE 11.2 Reporter: Forgotten User h13THG8RK1 <forgotten_h13THG8RK1>
Component: YaST2Assignee: Katarina Machalkova <kmachalkova>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Minor    
Priority: P3 - Medium CC: forgotten_h13THG8RK1, jsmeix
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Test case

Description Forgotten User h13THG8RK1 2009-11-30 17:38:08 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.9.1.5) Gecko/20091103 SUSE/3.5.5-1.1.2 Firefox/3.5.5

As Johannes Meixner put it over the yast-devel mailing list:
http://lists.opensuse.org/yast-devel/2009-11/msg00075.html

I like to display a literal '&' in a UI dialog string like:
----------------------------------------------------------------
`InputField( `id(`options),
_("Options (option1=value1&option2=value2)"),
"" )
----------------------------------------------------------------
but neither
"Options (option1=value1\&option2=value2)"
nor
"Options (option1=value1\046option2=value2)"
works for me.

When I run the module with
yast2 --gt module
and with
yast2 --qt module
the text which is shown in the dialog is always

Options (option1=value1option2=value2)

i.e. the '&' character is omitted.

Reproducible: Always
Comment 1 Forgotten User h13THG8RK1 2009-11-30 17:41:57 UTC
I suggest GTK and ncurses UI adopt Qt UI's behavior. That is, double '&' character to convey escape. e.g. "This && that" -> "This & that"
Comment 2 Forgotten User h13THG8RK1 2009-12-01 02:58:33 UTC
Fixed GTK. Katarina, your turn.
Comment 3 Forgotten User h13THG8RK1 2009-12-01 02:59:06 UTC
Created attachment 330169 [details]
Test case
Comment 4 Katarina Machalkova 2010-01-13 12:24:02 UTC
Finally done, submitreq on the way (y2-nc 2.19.2)


I can't seem to like this UI, it can do so few things by itself and it gets sometimes way too challenging to teach it things other UIs can do by single library call ...
Comment 5 Forgotten User h13THG8RK1 2010-01-13 15:56:37 UTC
I'm sure there's a place in hell for ncurses -- but don't you worry, gtk isn't going to be received in open arms by St. Peter either. ;^)
Comment 6 Bernhard Wiedemann 2016-04-15 10:35:41 UTC
This is an autogenerated message for OBS integration:
This bug (559226) was mentioned in
https://build.opensuse.org/request/show/29410 Factory / yast2-ncurses