Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -177,12 +178,12 @@ const Sidebar = (props) => {
{props.mobileMenuOpen ? (
<span>
<StyledIcon icon={faTimes} />
Sulje valikko
{props.t("closeMenu")}
</span>
) : (
<span>
<StyledIcon icon={faBars} />
Avaa valikko
{props.t("openMenu")}
</span>
)}
</Button>
Expand Down Expand Up @@ -233,4 +234,6 @@ const SidebarWithData = (props) => (
/>
)

export default withSimpleErrorBoundary(SidebarWithData)
export default withTranslation("common")(
withSimpleErrorBoundary(SidebarWithData),
)
2 changes: 2 additions & 0 deletions src/locales/common/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/common/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down