diff options
Diffstat (limited to 'packages/renderer/src/components/locationBar/NavigationButtons.tsx')
-rw-r--r-- | packages/renderer/src/components/locationBar/NavigationButtons.tsx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/packages/renderer/src/components/locationBar/NavigationButtons.tsx b/packages/renderer/src/components/locationBar/NavigationButtons.tsx index 9995a21..219ed90 100644 --- a/packages/renderer/src/components/locationBar/NavigationButtons.tsx +++ b/packages/renderer/src/components/locationBar/NavigationButtons.tsx | |||
@@ -28,6 +28,7 @@ import Box from '@mui/material/Box'; | |||
28 | import IconButton from '@mui/material/IconButton'; | 28 | import IconButton from '@mui/material/IconButton'; |
29 | import { observer } from 'mobx-react-lite'; | 29 | import { observer } from 'mobx-react-lite'; |
30 | import React from 'react'; | 30 | import React from 'react'; |
31 | import { useTranslation } from 'react-i18next'; | ||
31 | 32 | ||
32 | import type Service from '../../stores/Service'; | 33 | import type Service from '../../stores/Service'; |
33 | 34 | ||
@@ -36,6 +37,9 @@ function NavigationButtons({ | |||
36 | }: { | 37 | }: { |
37 | service: Service | undefined; | 38 | service: Service | undefined; |
38 | }): JSX.Element { | 39 | }): JSX.Element { |
40 | const { t } = useTranslation(undefined, { | ||
41 | keyPrefix: 'toolbar', | ||
42 | }); | ||
39 | const { direction } = useTheme(); | 43 | const { direction } = useTheme(); |
40 | 44 | ||
41 | return ( | 45 | return ( |
@@ -46,26 +50,26 @@ function NavigationButtons({ | |||
46 | }} | 50 | }} |
47 | > | 51 | > |
48 | <IconButton | 52 | <IconButton |
49 | aria-label="Back" | 53 | aria-label={t('back')} |
50 | disabled={service === undefined || !service.canGoBack} | 54 | disabled={service === undefined || !service.canGoBack} |
51 | onClick={() => service?.goBack()} | 55 | onClick={() => service?.goBack()} |
52 | > | 56 | > |
53 | {direction === 'ltr' ? <IconArrowBack /> : <IconArrowForward />} | 57 | {direction === 'ltr' ? <IconArrowBack /> : <IconArrowForward />} |
54 | </IconButton> | 58 | </IconButton> |
55 | <IconButton | 59 | <IconButton |
56 | aria-label="Forward" | 60 | aria-label={t('forward')} |
57 | disabled={service === undefined || !service.canGoForward} | 61 | disabled={service === undefined || !service.canGoForward} |
58 | onClick={() => service?.goForward()} | 62 | onClick={() => service?.goForward()} |
59 | > | 63 | > |
60 | {direction === 'ltr' ? <IconArrowForward /> : <IconArrowBack />} | 64 | {direction === 'ltr' ? <IconArrowForward /> : <IconArrowBack />} |
61 | </IconButton> | 65 | </IconButton> |
62 | {service?.loading ?? false ? ( | 66 | {service?.loading ?? false ? ( |
63 | <IconButton aria-label="Stop" onClick={() => service?.stop()}> | 67 | <IconButton aria-label={t('stop')} onClick={() => service?.stop()}> |
64 | <IconStop /> | 68 | <IconStop /> |
65 | </IconButton> | 69 | </IconButton> |
66 | ) : ( | 70 | ) : ( |
67 | <IconButton | 71 | <IconButton |
68 | aria-label="Refresh" | 72 | aria-label={t('reload')} |
69 | disabled={service === undefined} | 73 | disabled={service === undefined} |
70 | onClick={(event) => service?.reload(event.shiftKey)} | 74 | onClick={(event) => service?.reload(event.shiftKey)} |
71 | > | 75 | > |
@@ -73,7 +77,7 @@ function NavigationButtons({ | |||
73 | </IconButton> | 77 | </IconButton> |
74 | )} | 78 | )} |
75 | <IconButton | 79 | <IconButton |
76 | aria-label="Home" | 80 | aria-label={t('home')} |
77 | disabled={service === undefined} | 81 | disabled={service === undefined} |
78 | onClick={() => service?.goHome()} | 82 | onClick={() => service?.goHome()} |
79 | > | 83 | > |