From 37de389c2ff18ecac7b66c3168941496e038ef37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Nu=C3=B1ez?=
<10672208+mind-ar@users.noreply.github.com>
Date: Wed, 8 Jun 2022 22:46:15 -0300
Subject: [PATCH] feat(web): translation for page title/footer (#3401)
Add translations for title and footer.
---
internal/server/locales/en/portal.json | 4 +++-
internal/server/locales/es/portal.json | 8 +++++---
web/src/layouts/LoginLayout.tsx | 9 +++++++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/internal/server/locales/en/portal.json b/internal/server/locales/en/portal.json
index a5a458c8..0bc10fd4 100644
--- a/internal/server/locales/en/portal.json
+++ b/internal/server/locales/en/portal.json
@@ -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"
}
\ No newline at end of file
diff --git a/internal/server/locales/es/portal.json b/internal/server/locales/es/portal.json
index 352e9912..d90c2b07 100644
--- a/internal/server/locales/es/portal.json
+++ b/internal/server/locales/es/portal.json
@@ -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}}"
-}
\ No newline at end of file
+ "Client ID": "ID de cliente: {{client_id}}",
+ "Powered by": "Desarrollado por",
+ "Login":"Iniciar Sesión"
+}
diff --git a/web/src/layouts/LoginLayout.tsx b/web/src/layouts/LoginLayout.tsx
index f86756fd..6a780ce6 100644
--- a/web/src/layouts/LoginLayout.tsx
+++ b/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";
@@ -24,6 +25,10 @@ const LoginLayout = function (props: Props) {
) : (
);
+ const { t: translate } = useTranslation();
+ useEffect(() => {
+ document.title = `${translate("Login")} - Authelia`;
+ }, [translate]);
return (
@@ -55,7 +60,7 @@ const LoginLayout = function (props: Props) {
target="_blank"
className={style.poweredBy}
>
- Powered by Authelia
+ {translate("Powered by")} Authelia
) : null}