Translate click and change label (#1299)

This commit is contained in:
Lipis 2020-04-07 16:40:37 +03:00 committed by GitHub
parent b7230b05d7
commit 5b684495ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View File

@ -77,7 +77,7 @@ export const actionShortcuts = register({
}; };
}, },
PanelComponent: ({ updateData }) => ( PanelComponent: ({ updateData }) => (
<HelpIcon title={t("buttons.showShortcuts")} onClick={updateData} /> <HelpIcon title={t("shortcutsDialog.title")} onClick={updateData} />
), ),
keyTest: (event) => event.key === KEYS.QUESTION_MARK, keyTest: (event) => event.key === KEYS.QUESTION_MARK,
}); });

View File

@ -165,12 +165,22 @@ export const ShortcutsDialog = ({ onClose }: { onClose?: () => void }) => {
<Shortcut label={t("toolBar.text")} shortcuts={["T", "7"]} /> <Shortcut label={t("toolBar.text")} shortcuts={["T", "7"]} />
<Shortcut <Shortcut
label={t("shortcutsDialog.curvedArrow")} label={t("shortcutsDialog.curvedArrow")}
shortcuts={["A", "click", "click", "click"]} shortcuts={[
"A",
t("shortcutsDialog.click"),
t("shortcutsDialog.click"),
t("shortcutsDialog.click"),
]}
isOr={false} isOr={false}
/> />
<Shortcut <Shortcut
label={t("shortcutsDialog.curvedLine")} label={t("shortcutsDialog.curvedLine")}
shortcuts={["L", "click", "click", "click"]} shortcuts={[
"L",
t("shortcutsDialog.click"),
t("shortcutsDialog.click"),
t("shortcutsDialog.click"),
]}
isOr={false} isOr={false}
/> />
<Shortcut label={t("toolBar.lock")} shortcuts={["Q"]} /> <Shortcut label={t("toolBar.lock")} shortcuts={["Q"]} />

View File

@ -71,8 +71,7 @@
"redo": "Redo", "redo": "Redo",
"roomDialog": "Start live collaboration", "roomDialog": "Start live collaboration",
"createNewRoom": "Create new room", "createNewRoom": "Create new room",
"toggleFullScreen": "Toggle full screen", "toggleFullScreen": "Toggle full screen"
"showShortcuts": "Show shortcuts"
}, },
"alerts": { "alerts": {
"clearReset": "This will clear the whole canvas. Are you sure?", "clearReset": "This will clear the whole canvas. Are you sure?",
@ -135,6 +134,7 @@
"title": "Keyboard shortcuts", "title": "Keyboard shortcuts",
"shapes": "Shapes", "shapes": "Shapes",
"or": "or", "or": "or",
"click": "click",
"curvedArrow": "Curved arrow", "curvedArrow": "Curved arrow",
"curvedLine": "Curved line", "curvedLine": "Curved line",
"editor": "Editor", "editor": "Editor",