mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
parent
fe3d82a44a
commit
fbc485c218
@ -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)})`;
|
)})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user