@@ -20,6 +20,7 @@ import { Link as RouterLink } from "react-router-dom";
2020import { Theme } from "@material-ui/core/styles/createMuiTheme" ;
2121import Typography from "@material-ui/core/Typography" ;
2222import makeStyles from "@material-ui/styles/makeStyles" ;
23+ import { useTranslation } from "react-i18next" ;
2324
2425const useStyles = makeStyles ( ( theme : Theme ) => ( {
2526 drawerPaper : {
@@ -33,6 +34,7 @@ interface MenuDrawerProps {
3334}
3435
3536const MenuDrawer = ( { handleMenuClose, open } : MenuDrawerProps ) => {
37+ const { t } = useTranslation ( [ "mainMenu" , "glossary" ] ) ;
3638 const classes = useStyles ( ) ;
3739 return (
3840 < Drawer
@@ -43,7 +45,7 @@ const MenuDrawer = ({ handleMenuClose, open }: MenuDrawerProps) => {
4345 < Grid container direction = "column" >
4446 < Grid container item justify = "flex-end" >
4547 < IconButton onClick = { ( ) => handleMenuClose ( ) } >
46- < Typography variant = "srOnly" > close menu </ Typography >
48+ < Typography variant = "srOnly" > { t ( "glossary: close" ) } </ Typography >
4749 { CloseIcon }
4850 </ IconButton >
4951 </ Grid >
@@ -55,7 +57,7 @@ const MenuDrawer = ({ handleMenuClose, open }: MenuDrawerProps) => {
5557 onClick = { ( ) => handleMenuClose ( ) }
5658 to = "/"
5759 >
58- < Typography variant = "srOnly" > home</ Typography >
60+ < Typography variant = "srOnly" > { t ( " home" ) } </ Typography >
5961 < Box maxWidth = "100%" width = { 250 } >
6062 < Logo />
6163 </ Box >
@@ -67,7 +69,7 @@ const MenuDrawer = ({ handleMenuClose, open }: MenuDrawerProps) => {
6769 to = "/about"
6870 >
6971 < ListItemIcon > { InfoIcon } </ ListItemIcon >
70- < ListItemText > About </ ListItemText >
72+ < ListItemText > { t ( "about" ) } </ ListItemText >
7173 </ ListItem >
7274 < ListItem
7375 button
@@ -76,7 +78,7 @@ const MenuDrawer = ({ handleMenuClose, open }: MenuDrawerProps) => {
7678 to = "/terms-of-use"
7779 >
7880 < ListItemIcon > { TermsOfServiceIcon } </ ListItemIcon >
79- < ListItemText > Terms of Use </ ListItemText >
81+ < ListItemText > { t ( "termsOfUse" ) } </ ListItemText >
8082 </ ListItem >
8183 < ListItem
8284 button
@@ -85,7 +87,7 @@ const MenuDrawer = ({ handleMenuClose, open }: MenuDrawerProps) => {
8587 to = "/privacy-policy"
8688 >
8789 < ListItemIcon > { PolicyIcon } </ ListItemIcon >
88- < ListItemText > Privacy policy </ ListItemText >
90+ < ListItemText > { t ( "privacyPolicy" ) } </ ListItemText >
8991 </ ListItem >
9092 < ListItem
9193 button
@@ -94,7 +96,7 @@ const MenuDrawer = ({ handleMenuClose, open }: MenuDrawerProps) => {
9496 to = "/favorites"
9597 >
9698 < ListItemIcon > { FavoriteIcon } </ ListItemIcon >
97- < ListItemText > Favorites </ ListItemText >
99+ < ListItemText > { t ( "favorites" ) } </ ListItemText >
98100 </ ListItem >
99101 </ List >
100102 </ Grid >
0 commit comments