refactor: Remove the word toggle from labels (#2648)

This commit is contained in:
Lipis 2020-12-21 15:58:43 +02:00 committed by GitHub
parent c3c20b6087
commit b0eeb8e6e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View File

@ -14,7 +14,9 @@ export const DarkModeToggle = (props: {
return (
<label
className={`ToolIcon ToolIcon_type_floating ToolIcon_size_M`}
title={t("buttons.toggleDarkMode")}
title={
props.value === "dark" ? t("buttons.lightMode") : t("buttons.darkMode")
}
>
<input
className="ToolIcon_type_checkbox ToolIcon_toggle_opaque"
@ -23,7 +25,11 @@ export const DarkModeToggle = (props: {
props.onChange(event.target.checked ? "dark" : "light")
}
checked={props.value === "dark"}
aria-label={t("buttons.toggleDarkMode")}
aria-label={
props.value === "dark"
? t("buttons.lightMode")
: t("buttons.darkMode")
}
/>
<div className="ToolIcon__icon">
{props.value === "light" ? ICONS.MOON : ICONS.SUN}

View File

@ -210,12 +210,9 @@ export const ShortcutsDialog = ({ onClose }: { onClose?: () => void }) => {
label={t("shortcutsDialog.zoomToSelection")}
shortcuts={["Shift+2"]}
/>
<Shortcut label={t("buttons.fullScreen")} shortcuts={["F"]} />
<Shortcut
label={t("buttons.toggleFullScreen")}
shortcuts={["F"]}
/>
<Shortcut
label={t("buttons.toggleZenMode")}
label={t("buttons.zenMode")}
shortcuts={[getShortcutKey("Alt+Z")]}
/>
<Shortcut

View File

@ -118,9 +118,10 @@
"redo": "Redo",
"roomDialog": "Start live collaboration",
"createNewRoom": "Create new room",
"toggleFullScreen": "Toggle full screen",
"toggleDarkMode": "Toggle dark mode",
"toggleZenMode": "Toggle zen mode",
"fullScreen": "Full screen",
"darkMode": "Dark mode",
"lightMode": "Light mode",
"zenMode": "Zen mode",
"exitZenMode": "Exit zen mode"
},
"alerts": {