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