Bug 143184 - In French, "P" accelerator is used three times in the Tools menu, including for a submenu
Summary: In French, "P" accelerator is used three times in the Tools menu, including f...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All All
: low enhancement
Assignee: Stéphane Guillou (stragu)
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks: Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2021-07-04 16:20 UTC by TorrAB
Modified: 2023-07-25 13:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
file showing menu Outils (35.44 KB, image/png)
2022-11-30 13:48 UTC, TorrAB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TorrAB 2021-07-04 16:20:40 UTC
Description:
French version. Menu Outils. Hit p, get ‘Assistant Publi…’; OK. Hit p again to get ‘Personnaliser’, menu closes instead. May be related to Bug 137827.


Steps to Reproduce:
1.French version. Menu Outils. Hit p, get ‘Assistant Publi…’
2.Hit p again
3.

Actual Results:
menu closes

Expected Results:
jump to ‘Personnaliser’


Reproducible: Always


User Profile Reset: No



Additional Info:
May be related to Bug 137827
Comment 1 V Stuart Foote 2021-07-05 15:03:54 UTC
Accelerators (and shortcuts) are os/DE dependnet, in addition to locale (assume that you are working with fr-FR locale).

Please post the Help -> About details for this issue.
Comment 2 TorrAB 2021-07-08 22:24:59 UTC
French version. Menu Outils. Hit p, get ‘Assistant Publi…’; OK. Hit p again, get ‘Protéger’. Hit p again to get ‘Personnaliser’, menu closes instead. Remedy: ‘Personnaliser’ could be triggered by ‘r’. Bug 143184. May be related to Bug 137827
> 
> Steps to Reproduce:
> 1.French version. Menu Outils. Hit p, get ‘Assistant Publi…’
> 2.Hit p again, twice
> 
> Actual Results:
> menu closes
> 
> Expected Results:
> jump to ‘Personnaliser’
> 
> Reproducible: Always
> 
> User Profile Reset: No
> 
Version: 7.1.4.2 (x64) / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: fr-FR (en_US); UI: fr-FR
Calc: CL
Comment 3 raal 2021-12-20 07:04:06 UTC
No repro with English version Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: d47628f287f4377394c4ff488c433bfe254b6abe
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

tested: Alt+I > S > S > M
Insect > Shape > Symbol shapes > Moon
Comment 4 Dieter 2021-12-30 13:41:21 UTC
(In reply to TorrAB from comment #0)
> Additional Info:
> May be related to Bug 137827

Bug 137827 is fixed. So could you please try to reproduce the problem described here with the recent version of LO?
=> NEEDINFO
Comment 5 TorrAB 2021-12-30 14:19:48 UTC
(In reply to Dieter from comment #4)
> (In reply to TorrAB from comment #0)
> > Additional Info:
> > May be related to Bug 137827
> 
> Bug 137827 is fixed. So could you please try to reproduce the problem
> described here with the recent version of LO?
> => NEEDINFO

Comment 2 remains in Writer, with
Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: fr-FR
Calc: CL

Indeed, Bug 137827 was different.
Comment 6 Buovjaga 2022-11-28 12:25:44 UTC
Not reproduced, there is not even an entry for Assistant Publi…
Have you added this menu entry yourself? Is it for the wiki publisher? I do have the extension installed.

Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: fr-FR
Calc: threaded

Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: fr-FR
7.4.3-1
Calc: threaded

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 7 TorrAB 2022-11-30 13:48:58 UTC
Created attachment 183912 [details]
file showing menu Outils
Comment 8 TorrAB 2022-11-30 13:55:22 UTC
correct description:

Menu Outils. Hit p, get ‘Assistant Publi…’; OK. Hit p again, get ‘Protéger’; OK. Hit p again to get ‘Personnaliser’, menu closes instead.
Comment 9 Buovjaga 2022-11-30 14:18:38 UTC
(In reply to TorrAB from comment #8)
> correct description:
> 
> Menu Outils. Hit p, get ‘Assistant Publi…’; OK. Hit p again, get ‘Protéger’;
> OK. Hit p again to get ‘Personnaliser’, menu closes instead.

Thanks, I can reproduce that.
Comment 10 V Stuart Foote 2022-11-30 15:31:46 UTC
This is a localization issue of the Tools menu.

In fr-FR locale the "p" mnemonic for the "Mail Merge Wizard"--'Assistant Publipostage...'--conflicts with the "p" assigned to "Protect Document"--'Protéger le document'--conflicts with the "p" assigned to "Customize..."--'Personnaliser...'

OPs report is weird, bcz on default en-US using the "z" mnemonic of the "Mail Word Wizard" launches the wizard dialog. Would expect the fr-FR to likewise launch the dialog--and subsequent p key entry to be directed at the dialog, no longer to the Tools menu.

While in default en-US the Tools -> "p" mnemonic will open to the sub-menu of the Protect Document (for Protect fields or Protect Bookmarks).  And subsequent "p" will apply the field protection. So that works as expected in en-US.

But in general reuse of characters for a mnemonic in the same menu level is not good. The automated ~ assignment or the localized _ assignments should avoid it. But when it conflicts as here--it should be corrected.
Comment 11 V Stuart Foote 2022-11-30 16:45:09 UTC
Actually, resetting UI to fr-FR I have correct and consistent action when a sub-menu opens containing an accelerator in question.

In this case the sub-menu has a target assigned the "p" accelerator--so entering the "p" performs the action (protecting the document fields).

And as expected, using <Esc> to close the sub-menu without any action, returns focus to the menu, and then a "p" then advances to the Customize... (Personnaliser...) dialog.  Where it needs an <Enter> to open the dialog.

Regards the Mail Merge Wizard dialog not opening when its accelerator is used, that actually makes sense in fr-FR locale where the Tools (Outils) menu has repeated "p" accelerators. Others without duplicated accelerators will directly launches its target dialog.

In en-US the "Mail Merge Wizard..." and the "Customize..." and the "Options..." dialogs have unique accelerators. While in fr-FR locale there are duplicates on the menu and block a direct launch.

IIUC that is correct behavior for menus with duplicated accelerators. 

So a simple documentation issue for menus with duplicated accelerators that can't be avoided during localization.

So, IMHO behavior is correct and there is no issue here => NAB

@Maxim, any wisdom to share here?
Comment 12 Stéphane Guillou (stragu) 2023-07-24 21:51:16 UTC
(In reply to TorrAB from comment #8)
> Menu Outils. Hit p, get ‘Assistant Publi…’; OK. Hit p again, get ‘Protéger’;
> OK. Hit p again to get ‘Personnaliser’, menu closes instead.

As Stuart explained in comment 11 it doesn't just "close", but it executes the "Protéger les champs" command in the submenu. But I can reproduce.

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: fr-FR
Calc: threaded

I think it is inevitable that some accelerators will be shared in some menus, and that's why we are able to cycle through choices by pressing the key repeatedly.

But in this case, to reach the "Personnaliser" item (which is an important function), one has to:
- press P twice
- exit the submenu with left arrow or Escape
- press P again

It is realistic to make sure that any accelerator for a submenu is unique, so we don't have to navigate out of the submenu to then reach the top menu item we are after.

Looking at master, it's a tricky one because every single character in "Protéger le document" is already taken! I suggested two changes to the translated French strings to fix it, and checked that it would work for both Writer and Calc in current master:

1. Use "Y" for "Dictionnaire des synonymes"... (which is a safe bet given how rare is Y in French)
2. ... so we can use "D" for "Protéger le document"

Sophie, could you accept the 4 string suggestions, if you think they're OK? I don't have the privilege to directly submit them.

1. https://translations.documentfoundation.org/translate/libo_ui-master/officecfgregistrydataorgopenofficeofficeui/fr/?q=%22Dictionnaire+des+synonymes%22&sort_by=-priority%2Cposition&offset=1
2. https://translations.documentfoundation.org/translate/libo_ui-master/officecfgregistrydataorgopenofficeofficeui/fr/?q=%22Prot%C3%A9ger+le+document%22&sort_by=-priority%2Cposition&offset=1

(Side note: gtk3 VCL is not affected because the expansion of the submenu does not focus it automatically.)
Comment 13 sophie 2023-07-25 08:00:31 UTC
(In reply to Stéphane Guillou (stragu) from comment #12)
> Looking at master, it's a tricky one because every single character in
> "Protéger le document" is already taken! I suggested two changes to the
> translated French strings to fix it, and checked that it would work for both
> Writer and Calc in current master:
> 
> 1. Use "Y" for "Dictionnaire des synonymes"... (which is a safe bet given
> how rare is Y in French)
> 2. ... so we can use "D" for "Protéger le document"
> 
> Sophie, could you accept the 4 string suggestions, if you think they're OK?
> I don't have the privilege to directly submit them.
> 
> 1.
> https://translations.documentfoundation.org/translate/libo_ui-master/
> officecfgregistrydataorgopenofficeofficeui/fr/
> ?q=%22Dictionnaire+des+synonymes%22&sort_by=-priority%2Cposition&offset=1
> 2.
> https://translations.documentfoundation.org/translate/libo_ui-master/
> officecfgregistrydataorgopenofficeofficeui/fr/
> ?q=%22Prot%C3%A9ger+le+document%22&sort_by=-priority%2Cposition&offset=1
> 
> (Side note: gtk3 VCL is not affected because the expansion of the submenu
> does not focus it automatically.)

I've accepted both, thanks for your fixes Stéphane! By the past I had a macro that searches for duplicate accelerators, but I can't find it anymore, seems I lost it in the archives of the time ;)
Comment 14 Stéphane Guillou (stragu) 2023-07-25 09:33:37 UTC
Thanks Sophie! Let's mark as fixed, at least for master. I might suggest similar string changes for 7.6 and 7.5 but I have to double-check if they work as menus keep evolving.