Skip to content

Commit

Permalink
feat(web): translation for page title/footer (#3401)
Browse files Browse the repository at this point in the history
Add translations for title and footer.
  • Loading branch information
mind-ar committed Jun 9, 2022
1 parent f06fc04 commit 37de389
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion internal/server/locales/en/portal.json
Expand Up @@ -65,5 +65,7 @@
"This saves this consent as a pre-configured consent for future use": "This saves this consent as a pre-configured consent for future use",
"Remember Consent": "Remember Consent",
"Consent Request": "Consent Request",
"Client ID": "Client ID: {{client_id}}"
"Client ID": "Client ID: {{client_id}}",
"Powered by": "Powered by",
"Login":"Login"
}
8 changes: 5 additions & 3 deletions internal/server/locales/es/portal.json
Expand Up @@ -62,8 +62,10 @@
"Must have at least one special character": "Debe tener por lo menos un carácter especial",
"Must be at least {{len}} characters in length": "La longitud mínima es de {{len}} caracteres",
"Must not be more than {{len}} characters in length": "La longitud máxima es de {{len}} caracteres",
"This saves this consent as a pre-configured consent for future use": "Esto guarda este consentimiento como consentimiento pre-configurado para uso futuro",
"This saves this consent as a pre-configured consent for future use": "Esto guarda este consentimiento como consentimiento preconfigurado para uso futuro",
"Remember Consent": "Recordar consentimiento",
"Consent Request": "Solicitud de consentimiento",
"Client ID": "ID de cliente: {{client_id}}"
}
"Client ID": "ID de cliente: {{client_id}}",
"Powered by": "Desarrollado por",
"Login":"Iniciar Sesión"
}
9 changes: 7 additions & 2 deletions web/src/layouts/LoginLayout.tsx
@@ -1,7 +1,8 @@
import React, { ReactNode } from "react";
import React, { ReactNode, useEffect } from "react";

import { Grid, makeStyles, Container, Link } from "@material-ui/core";
import { grey } from "@material-ui/core/colors";
import { useTranslation } from "react-i18next";

import { ReactComponent as UserSvg } from "@assets/images/user.svg";
import TypographyWithTooltip from "@components/TypographyWithTootip";
Expand All @@ -24,6 +25,10 @@ const LoginLayout = function (props: Props) {
) : (
<UserSvg className={style.icon} />
);
const { t: translate } = useTranslation();
useEffect(() => {
document.title = `${translate("Login")} - Authelia`;
}, [translate]);
return (
<Grid id={props.id} className={style.root} container spacing={0} alignItems="center" justifyContent="center">
<Container maxWidth="xs" className={style.rootContainer}>
Expand Down Expand Up @@ -55,7 +60,7 @@ const LoginLayout = function (props: Props) {
target="_blank"
className={style.poweredBy}
>
Powered by Authelia
{translate("Powered by")} Authelia
</Link>
</Grid>
) : null}
Expand Down

0 comments on commit 37de389

Please sign in to comment.