diff --git a/webapp/src/components/CustomModal/CustomModal.js b/webapp/src/components/CustomModal/CustomModal.js index 31f1706e..024782ae 100644 --- a/webapp/src/components/CustomModal/CustomModal.js +++ b/webapp/src/components/CustomModal/CustomModal.js @@ -1,11 +1,14 @@ import React from 'react'; import { Button, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react'; import { useNavigate } from 'react-router-dom'; +import { useTranslation } from "react-i18next"; const CustomModal = ({ title, text, route }) => { const { isOpen, onOpen, onClose } = useDisclosure(); const navigate = useNavigate(); + const { t } = useTranslation(); + return ( <> {title} @@ -21,9 +24,9 @@ const CustomModal = ({ title, text, route }) => { - Cerrar + {t("components.custommodal.close")} - navigate(route)}>Jugar + navigate(route)}>{t("components.custommodal.play")} diff --git a/webapp/src/locales/en.json b/webapp/src/locales/en.json index 11b00d8c..0879d619 100644 --- a/webapp/src/locales/en.json +++ b/webapp/src/locales/en.json @@ -1,5 +1,9 @@ { "components": { + "custommodal": { + "play": "Jugar", + "close": "Cerrar" + }, "footer": { "copyright": "Copyright 2024 ® Software Architecture Group 1A" }, @@ -87,7 +91,8 @@ "playAgain": "Play Again", "back": "Back to Menu", "question": "Question", - "time": "Time Remaining:" + "time": "Time Remaining:", + "send": "Send" }, "config": { "title": "Settings", diff --git a/webapp/src/locales/es.json b/webapp/src/locales/es.json index 33e57b6b..d8a072d4 100644 --- a/webapp/src/locales/es.json +++ b/webapp/src/locales/es.json @@ -1,5 +1,9 @@ { "components": { + "custommodal": { + "play": "Jugar", + "close": "Cerrar" + }, "footer": { "copyright": "Copyright 2024 ® Grupo 1A de Arquitectura del Software" }, @@ -87,7 +91,8 @@ "playAgain": "Jugar de nuevo", "back": "Volver al menú", "question": "Pregunta", - "time": "Tiempo restante:" + "time": "Tiempo restante:", + "send": "Enviar" }, "config": { "title": "Configuración", diff --git a/webapp/src/pages/Calculadora/Calculadora.js b/webapp/src/pages/Calculadora/Calculadora.js index 5cbbc809..a196ebb4 100644 --- a/webapp/src/pages/Calculadora/Calculadora.js +++ b/webapp/src/pages/Calculadora/Calculadora.js @@ -173,7 +173,7 @@ const CalculadoraHumana = () => { {juegoTerminado ? ( {t('pages.humancalculator.finished')} - Tu puntuación: {puntuacion} + {t("pages.humancalculator.score")} {puntuacion} {t('pages.humancalculator.playAgain')} @@ -198,7 +198,7 @@ const CalculadoraHumana = () => { /> handleAnswer(Number(valSubmit))} data-testid="submit-button"> {" "} - Enviar{" "} + {t('pages.humancalculator.send')}{" "} {t('pages.humancalculator.time')} {Math.floor(tiempoRestante)} diff --git a/webapp/src/pages/Clasico/Clasico.js b/webapp/src/pages/Clasico/Clasico.js index 194c2344..f1aac13b 100644 --- a/webapp/src/pages/Clasico/Clasico.js +++ b/webapp/src/pages/Clasico/Clasico.js @@ -318,7 +318,7 @@ const JuegoPreguntas = () => { {t("pages.classic.time")} {Math.floor(tiempoRestante)} - Puntuación: {puntuacion} + {t("pages.classic.score")} {puntuacion} { @@ -55,7 +55,7 @@ const GroupDetails = () => { }; const redirectToProfile = (member) => { - navigate(`/perfil/${member.username}`); + setUser(member); }; @@ -63,7 +63,7 @@ const GroupDetails = () => { return ( <> - + setUser("")}>Volver >
Tu puntuación: {puntuacion}
{t("pages.humancalculator.score")} {puntuacion}
{t('pages.humancalculator.time')} {Math.floor(tiempoRestante)}
{t("pages.classic.time")} {Math.floor(tiempoRestante)}
Puntuación: {puntuacion}
{t("pages.classic.score")} {puntuacion}