diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index 5f1e2fb7..0c2c556c 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -3,6 +3,7 @@ import styled from "styled-components" import { graphql, StaticQuery } from "gatsby" import { Button } from "@material-ui/core" import CourseSettings from "../../course-settings" +import { withTranslation } from "react-i18next" import Logo from "./Logo" import TreeView from "./TreeView" @@ -177,12 +178,12 @@ const Sidebar = (props) => { {props.mobileMenuOpen ? ( - Sulje valikko + {props.t("closeMenu")} ) : ( - Avaa valikko + {props.t("openMenu")} )} @@ -233,4 +234,6 @@ const SidebarWithData = (props) => ( /> ) -export default withSimpleErrorBoundary(SidebarWithData) +export default withTranslation("common")( + withSimpleErrorBoundary(SidebarWithData), +) diff --git a/src/locales/common/en.json b/src/locales/common/en.json index 7beef7da..fbb3f122 100644 --- a/src/locales/common/en.json +++ b/src/locales/common/en.json @@ -14,6 +14,8 @@ "logout":"Log out", "newAccount":"Create a new account", "login":"Log in", + "closeMenu": "Close menu", + "openMenu": "Open menu", "mailingListTitle":"Remind me when the course starts", "subscribe":"subscribe", "tableOfContents":"Table of contents", diff --git a/src/locales/common/fi.json b/src/locales/common/fi.json index 11e26ceb..64698916 100644 --- a/src/locales/common/fi.json +++ b/src/locales/common/fi.json @@ -14,6 +14,8 @@ "logout":"Kirjaudu ulos", "newAccount":"Luo uusi tunnus", "login":"Kirjaudu sisään", + "closeMenu": "Sulje valikko", + "openMenu": "Avaa valikko", "mailingListTitle":"Muistuta minua kun kurssi alkaa", "subscribe":"tilaa", "tableOfContents":"Sisällysluettelo",