[Konsole-devel] [Bug 165949] Wrong solution(for asia) to strip	ampersand characters from top-level menu items in SVN:825353
    Chusslove Illich 
    caslav.ilic at gmx.net
       
    Thu Jul 10 18:57:20 UTC 2008
    
    
  
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=165949         
caslav.ilic gmx net changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caslav.ilic gmx net
------- Additional Comments From caslav.ilic gmx net  2008-07-10 20:57 -------
The regex in #6 patch should not have the leading \s before the parenthesis, as there are no spaces in CJK; otherwise it works, checked here on Japanese-localized Konsole.
Another solution would be to let translators handle extra accelerator removal, by providing a "filtering" message, e.g.:
  ...
  itemText.remove('&');
  itemText = i18nc("Menu title in main menu", "%1", itemText);
  menuItem->setText(itemText);
  ...
after which translators can script modifications to the text being filtered (amounts to single function call). This is the solution I provided e.g. for toolbar icon labels, to be sure not to clash with something else in some unrelated language, and to allow solutions per language if needed.
I can't say which of these two is better. At any rate, for 4.2 perhaps we should add a KLocale::stripAccelerator function -- this is already third out-of-kdelibs case where such a need arose (implementation wise it could use either of the above methods).
    
    
More information about the konsole-devel
mailing list