From 8d18947d06ed612d39ecb58816c82fd64daec1f2 Mon Sep 17 00:00:00 2001
From: Andreas Ellewsen <ae@uio.no>
Date: Mon, 29 Nov 2021 08:44:35 +0100
Subject: [PATCH] Add missing translation

---
 frontend/public/locales/en/common.json    | 1 +
 frontend/public/locales/nb/common.json    | 1 +
 frontend/public/locales/nn/common.json    | 1 +
 frontend/src/routes/components/header.tsx | 5 +++--
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json
index c1f7e439..b2fbf979 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 64ac3551..4d5c867d 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 6000ca6e..062f7193 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 f107dbc8..b69c4782 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={{
-- 
GitLab