Bug 420409 - Mnemonics in chinese (and possibly others) shouldn't take symbols
Summary: Mnemonics in chinese (and possibly others) shouldn't take symbols
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: Master
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-22 04:34 UTC by Han Han
Modified: 2020-08-20 12:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Han Han 2020-04-22 04:34:33 UTC
SUMMARY
shortcut should use English character but Chinese


STEPS TO REPRODUCE
1. open discover
2. hover over the About
3. Alt + 关 appeared

OBSERVED RESULT
Alt + 关 appeared

EXPECTED RESULT

Alt+a
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: archlinux
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Aleix Pol 2020-04-29 10:42:18 UTC
I'm not sure what's the right way to do this, will need some more investigation.

This is coming from Discover's ActionListItem.qml

    Kirigami.MnemonicData.enabled: item.enabled && item.visible
    Kirigami.MnemonicData.controlType: Kirigami.MnemonicData.MenuItem
    Kirigami.MnemonicData.label: action.text
    label: Kirigami.MnemonicData.richTextLabel

    readonly property var tooltip: QQC2.ToolTip {
        text: action.shortcut ? action.shortcut : p0.nativeText
    }
Comment 2 Eike Hein 2020-04-29 11:43:03 UTC
Chinese UI conventionally renders menu items as "Label(Latin mnemonic)".
Comment 3 Aleix Pol 2020-08-14 15:45:52 UTC
This is how it was done in xmlgui.
https://phabricator.kde.org/D7964
Comment 4 Bug Janitor Service 2020-08-17 09:23:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/79
Comment 5 Marco Martin 2020-08-17 09:24:39 UTC
please test
https://invent.kde.org/frameworks/kirigami/-/merge_requests/79
Comment 6 Marco Martin 2020-08-20 12:26:48 UTC
Git commit 6dda5f1d3782b2c8aeb385fdade6e9487c29f571 by Marco Martin.
Committed on 20/08/2020 at 12:26.
Pushed by mart into branch 'master'.

new logic to remove acceleration marks

Logic to remove acceleration marks borrowed from KWidgetAddons
https://phabricator.kde.org/D7964
This should handle as wel CJK text.

M  +89   -3    src/mnemonicattached.cpp

https://invent.kde.org/frameworks/kirigami/commit/6dda5f1d3782b2c8aeb385fdade6e9487c29f571