Bug 405925

Summary: Key modifier names are not translated while setting a shortcut
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: David Redondo <kde>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aacid
Priority: NOR    
Version First Reported In: 5.56.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Shift being displayed instead of Umschalt

Description David Redondo 2019-03-27 09:50:14 UTC
Created attachment 119075 [details]
Shift being displayed instead of Umschalt

SUMMARY
While setting a shortcut the modifier is not correctly translated while holding it down. It is correctly translated after setting the shortcut.
STEPS TO REPRODUCE
1. Change a shortcut.
2. Hold down shift or ctrl
OBSERVED RESULT
"Shift + ..." / "Ctrl + ..." is displayed
EXPECTED RESULT
Shift and Ctrl should be translated (in my case Umschalt and Strg)

Frameworks version: 5.56
Comment 1 Christoph Feck 2019-04-16 19:42:13 UTC
The translated key names come from https://cgit.kde.org/kwindowsystem.git/tree/src/kkeyserver.cpp

Someone familiar with Qt translations would be needed to investigate.

The code seems to cache the translations. Maybe that's the cause for the issue.
Comment 2 Albert Astals Cid 2019-04-16 21:38:24 UTC
Having a look (well almost have a patch)
Comment 3 Albert Astals Cid 2019-04-16 21:54:26 UTC
https://phabricator.kde.org/D20614
Comment 4 Albert Astals Cid 2019-04-16 22:07:36 UTC
Git commit 1b49ea4d3154630f79b604a191265cff687c18ad by Albert Astals Cid.
Committed on 16/04/2019 at 22:07.
Pushed by aacid into branch 'master'.

KKeySequenceWidget: Don't show English strings to the user

Summary:
KKeyServer::modToStringUser is only for english texts

Reviewers: apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D20614

M  +11   -0    autotests/kxmlgui_unittest.cpp
M  +1    -0    autotests/kxmlgui_unittest.h
M  +7    -7    src/kkeysequencewidget.cpp

https://commits.kde.org/kxmlgui/1b49ea4d3154630f79b604a191265cff687c18ad