diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json index c1f7e439edae23e44ed6a45de1e1c0fae96c4ad9..b2fbf979b4df067bf25e13dc0485312e1cf0b412 100644 --- a/frontend/public/locales/en/common.json +++ b/frontend/public/locales/en/common.json @@ -101,6 +101,7 @@ "button": { "yes": "Yes", "no": "No", + "logout": "Log out", "back": "Back", "next": "Next", "save": "Save", diff --git a/frontend/public/locales/nb/common.json b/frontend/public/locales/nb/common.json index 64ac355125d35d8c40de428d91df23a59ca8e5ce..4d5c867d9a491e2bc93a7013275d720a6869c7b1 100644 --- a/frontend/public/locales/nb/common.json +++ b/frontend/public/locales/nb/common.json @@ -100,6 +100,7 @@ "button": { "yes": "Ja", "no": "Nei", + "logout": "Logg ut", "back": "Tilbake", "next": "Neste", "save": "Lagre", diff --git a/frontend/public/locales/nn/common.json b/frontend/public/locales/nn/common.json index 6000ca6ee8d12388338fda29ebddcc6129a9ead7..062f719323edb9a6d1c3f9aef840b73442fa535c 100644 --- a/frontend/public/locales/nn/common.json +++ b/frontend/public/locales/nn/common.json @@ -101,6 +101,7 @@ "button": { "yes": "Ja", "no": "Nei", + "logout": "Logg ut", "back": "Tilbake", "next": "Neste", "save": "Lagre", diff --git a/frontend/src/routes/components/header.tsx b/frontend/src/routes/components/header.tsx index f107dbc81bdf0961e285408cfac51ff7cb38a735..b69c4782854eaa0fd04a661f938d2f4d3d29bbbb 100644 --- a/frontend/src/routes/components/header.tsx +++ b/frontend/src/routes/components/header.tsx @@ -1,7 +1,7 @@ import { styled } from '@mui/material/styles' import { Box, Link } from '@mui/material' import LogoutIcon from '@mui/icons-material/Logout' - +import { useTranslation } from 'react-i18next' import { useUserContext } from 'contexts' import LanguageSelector from 'components/languageselector' import UserInfo from 'routes/components/userInfo' @@ -46,6 +46,7 @@ const Menu = styled('div')({ const Header = () => { const { user } = useUserContext() + const { t } = useTranslation('common') return ( <StyledHeader> @@ -62,7 +63,7 @@ const Header = () => { }} href="/oidc/logout" > - Logg ut + {t('button.logout')} <LogoutIcon fontSize="small" sx={{