diff --git a/frontend/.env b/frontend/.env index f88bc76d5125c8062602a947a654ab9e0f62e1e2..6033d809eaefd355da227ce5bbdc8742e874e7a8 100644 --- a/frontend/.env +++ b/frontend/.env @@ -9,6 +9,7 @@ REACT_APP_SUPPORT_URL=https://example.org REACT_APP_SUPPORT_URL_EN=https://example.org/en REACT_APP_RESPONSIBLE_ORGANIZATION='Seksjon for integrasjon og elektroniske identiteter (INT)' +REACT_APP_RESPONSIBLE_ORGANIZATION_EN='Department for System Integration and Identity Management (INT)' REACT_APP_RESPONSIBLE_ORGANIZATION_LINK='https://www.usit.uio.no/om/organisasjon/bnt/usitint/' REACT_APP_DISABLE_NIN_VERIFICATION='false' diff --git a/frontend/src/appConfig.ts b/frontend/src/appConfig.ts index 63f8b64c32b1b3ab2b4d5a5085f4d7264cb71fa4..3204750712a0f8e46fc6390a3903480c2db82d88 100644 --- a/frontend/src/appConfig.ts +++ b/frontend/src/appConfig.ts @@ -41,6 +41,8 @@ export const enableIgaCheck: boolean = env.REACT_APP_ENABLE_IGA_CHECK === 'true' /* Footer content */ export const responsibleOrganization: string = env.REACT_APP_RESPONSIBLE_ORGANIZATION as string +export const responsibleOrganizationEn: string = + env.REACT_APP_RESPONSIBLE_ORGANIZATION_EN as string /* no links */ export const itRulesLink: string = env.REACT_APP_IT_RULES_LINK as string diff --git a/frontend/src/routes/components/footer.tsx b/frontend/src/routes/components/footer.tsx index c2d737e8c899df600c6f3fbe2be45cda745d9bbb..3b04be499636cea67819bf64fc30a2a9b1207ddc 100644 --- a/frontend/src/routes/components/footer.tsx +++ b/frontend/src/routes/components/footer.tsx @@ -5,6 +5,7 @@ import { Link } from '@mui/material' import { appInst, responsibleOrganization, + responsibleOrganizationEn, responsibleOrganizationLink, responsibleOrganizationLinkEn, itRulesLink, @@ -87,6 +88,8 @@ function Footer() { return link || '' } + const getResponsibleOrganization = () => i18n.language === 'en' ? responsibleOrganizationEn : responsibleOrganization + const getItRulesLink = () => getLink(itRulesLinkEn, itRulesLink) const getTechnicalSupportLink = () => getLink(technicalSupportLinkEn, technicalSupportLink) @@ -127,7 +130,7 @@ function Footer() { {t('footer:link.responsibleOrganization.header')} </LinkHeader> <StyledLink href={getResponsibleOrganizationLink()}> - {responsibleOrganization} + {getResponsibleOrganization()} </StyledLink> </LinkSection> </LinkContainer>