FIX: correctly shortcut format on mac (#28556)

On windows + are shown between keys, not on mac. The fix was to wrap the whole shortcut in `translateModKey`.
This commit is contained in:
Joffrey JAFFEUX 2024-08-26 20:58:23 +02:00 committed by GitHub
parent fe3d82a44a
commit fbc485c218
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,8 +27,8 @@ export default class ToolbarPopupMenuOptions extends DropdownSelectBoxComponent
label = I18n.t(content.label); label = I18n.t(content.label);
if (content.shortcut) { if (content.shortcut) {
label += ` <kbd class="shortcut">${translateModKey( label += ` <kbd class="shortcut">${translateModKey(
PLATFORM_KEY_MODIFIER PLATFORM_KEY_MODIFIER + "+" + content.shortcut
)}+${translateModKey(content.shortcut)}</kbd>`; )}</kbd>`;
} }
} }
@ -37,8 +37,8 @@ export default class ToolbarPopupMenuOptions extends DropdownSelectBoxComponent
title = I18n.t(content.title); title = I18n.t(content.title);
if (content.shortcut) { if (content.shortcut) {
title += ` (${translateModKey( title += ` (${translateModKey(
PLATFORM_KEY_MODIFIER PLATFORM_KEY_MODIFIER + "+" + content.shortcut
)}+${translateModKey(content.shortcut)})`; )})`;
} }
} }