diff --git a/src/actions/actionCanvas.tsx b/src/actions/actionCanvas.tsx index a6dc57fa..a819a17b 100644 --- a/src/actions/actionCanvas.tsx +++ b/src/actions/actionCanvas.tsx @@ -90,7 +90,7 @@ export const actionZoomIn = register({ { updateData(null); @@ -117,7 +117,7 @@ export const actionZoomOut = register({ { updateData(null); diff --git a/src/actions/actionDuplicateSelection.tsx b/src/actions/actionDuplicateSelection.tsx index 61b4d206..5ab54e5b 100644 --- a/src/actions/actionDuplicateSelection.tsx +++ b/src/actions/actionDuplicateSelection.tsx @@ -38,7 +38,7 @@ export const actionDuplicateSelection = register({ updateData(null)} - title={`${t("labels.sendBackward")} ${getShortcutKey("CtrlOrCmd+[")}`} + title={`${t("labels.sendBackward")} — ${getShortcutKey("CtrlOrCmd+[")}`} > {sendBackward} @@ -116,7 +116,7 @@ export const actionBringForward = register({ type="button" className="zIndexButton" onClick={() => updateData(null)} - title={`${t("labels.bringForward")} ${getShortcutKey("CtrlOrCmd+]")}`} + title={`${t("labels.bringForward")} — ${getShortcutKey("CtrlOrCmd+]")}`} > {bringForward} @@ -145,7 +145,7 @@ export const actionSendToBack = register({ type="button" className="zIndexButton" onClick={() => updateData(null)} - title={`${t("labels.sendToBack")} ${ + title={`${t("labels.sendToBack")} — ${ isDarwin ? getShortcutKey("CtrlOrCmd+Alt+[") : getShortcutKey("CtrlOrCmd+Shift+[") @@ -178,7 +178,7 @@ export const actionBringToFront = register({ type="button" className="zIndexButton" onClick={(event) => updateData(null)} - title={`${t("labels.bringToFront")} ${ + title={`${t("labels.bringToFront")} — ${ isDarwin ? getShortcutKey("CtrlOrCmd+Alt+]") : getShortcutKey("CtrlOrCmd+Shift+]") diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 827989d5..44f74982 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -6,7 +6,7 @@ import { hasBackground, hasStroke, hasText, getTargetElement } from "../scene"; import { t } from "../i18n"; import { SHAPES } from "../shapes"; import { ToolButton } from "./ToolButton"; -import { capitalizeString, getShortcutKey, setCursorForShape } from "../utils"; +import { capitalizeString, setCursorForShape } from "../utils"; import Stack from "./Stack"; import useIsMobile from "../is-mobile"; @@ -94,9 +94,9 @@ export function ShapesSwitcher({ <> {SHAPES.map(({ value, icon }, index) => { const label = t(`toolBar.${value}`); - const shortcut = getShortcutKey( - `${capitalizeString(value)[0]}, ${index + 1}`, - ); + const shortcut = `${capitalizeString(value)[0]} ${t( + "shortcutsDialog.or", + )} ${index + 1}`; return ( { setAppState({ elementType: value, diff --git a/src/components/HelpIcon.tsx b/src/components/HelpIcon.tsx index 5e700834..d5ed178b 100644 --- a/src/components/HelpIcon.tsx +++ b/src/components/HelpIcon.tsx @@ -1,5 +1,4 @@ import React from "react"; -import { getShortcutKey } from "../utils"; type HelpIconProps = { title?: string; @@ -21,10 +20,7 @@ const ICON = ( export function HelpIcon(props: HelpIconProps) { return ( -