https://bugs.kde.org/show_bug.cgi?id=509273

            Bug ID: 509273
           Summary: After opening a file, accelerator keys are erroneously
                    included for buttons in the toolbar
    Classification: Frameworks and Libraries
           Product: frameworks-ktexteditor
      Version First 6.17.0
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
Some background information. Accelerator keys are usually assigned for menubar
entries using the ampersand "&" for quicker keyboard navigation. For example,
you can press Alt+S to trigger the "&Save" action quickly. However, for
non-Latin languages, things become somewhat trickier. For example, in Chinese,
the action "Save" is translated into "保存". However, it is impossible to type
the character "保" directly on a keyboard. As a result, the accelerator key have
to be put into a pair of parentheses after the main string (e.g. "保存(&S)").
This is the convention for both MS Windows and KDE Applications.

Here is the problem. If you open an arbitrary file with Kate (or KWrite)
directly (e.g. double-click on the file), then the buttons in the menubar are
labelled *without* accelerator keys ("保存", "另存为…", "撤销" and "重做"). However, if
you open the file after Kate or KWrite is launched (e.g. Ctrl+O and select the
file), then the buttons in the menubar are labelled *with* accelerator keys
("保存(S)", "另存为(A)…", "撤销(U)" and "重做(D)"). After that, if you click on the
corresponding menubar menu ("文件(F)"/File and "编辑(E)"/Edit), then the
accelerator keys disappear suddenly. This is very noticeable in a Chinese UI
environment.

STEPS TO REPRODUCE
1. Set the UI language of Kate (or KWrite) to Simplified Chinese (zh_CN) and
restart it
2. Open an arbitrary file with Ctrl+O
3. Click on the "文件(F)" (File) or "编辑(E)" (Edit) menubar entry

OBSERVED RESULT
At Step 2, accelerator keys are shown in the toolbar. At Step 3, the
accelerator keys disappear suddenly.

EXPECTED RESULT
The label text shouldn't change at all. Considering that the other two buttons
("新建" (New) and "打开…" (Open...)) are shown without accelerator keys from the
beginning, I think these four buttons should follow the same behavior.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.3-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
This bug may be related to KStandardActions (from KConfig) and KPart. However,
I'm not able to understand what's happening under those complicated code
completely...

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to