diff --git a/website/public/locales/en/dashboard.json b/website/public/locales/en/dashboard.json index 0427fb0d..c0d4c0a2 100644 --- a/website/public/locales/en/dashboard.json +++ b/website/public/locales/en/dashboard.json @@ -4,5 +4,11 @@ "evaluate": "Evaluate", "label": "Label", "dashboard": "Dashboard", - "go": "Go" + "go": "Go", + "welcome_message": { + "label": "Welcome, {{username}}!", + "contributor": "Contributor", + "description": "Open Assistant is an open-source AI assistant that uses and trains advanced language models to understand and respond to humans.", + "instruction": "Complete tasks to help train the model and earn points." + } } diff --git a/website/public/locales/es/dashboard.json b/website/public/locales/es/dashboard.json index 3d81cae8..4ae772d3 100644 --- a/website/public/locales/es/dashboard.json +++ b/website/public/locales/es/dashboard.json @@ -4,5 +4,11 @@ "evaluate": "Evaluar", "go": "Ir", "grab_a_task": "¡Toma una tarea!", - "label": "Etiquetar" + "label": "Etiquetar", + "welcome_message": { + "label": "Bienvenido, {{username}}!", + "contributor": "Contribuidor", + "description": "Open Assistant es un asistente de Inteligencia Artificial de código abierto que utiliza y entrena modelos de lenguaje avanzados para entender y responder a los humanos.", + "instruction": "Completa tareas para ayudar a entrenar el modelo y ganar puntos." + } } diff --git a/website/src/components/Dashboard/WelcomeCard.tsx b/website/src/components/Dashboard/WelcomeCard.tsx index 8c7d687f..4ce6a587 100644 --- a/website/src/components/Dashboard/WelcomeCard.tsx +++ b/website/src/components/Dashboard/WelcomeCard.tsx @@ -1,5 +1,6 @@ import { Box, Divider, Text, useColorMode } from "@chakra-ui/react"; import { useSession } from "next-auth/react"; +import { useTranslation } from "next-i18next"; export function WelcomeCard() { const { colorMode } = useColorMode(); @@ -7,6 +8,7 @@ export function WelcomeCard() { const titleColor = colorMode === "light" ? "blue.500" : "blue.300"; const { data: session } = useSession(); + const { t } = useTranslation("dashboard"); if (!session) { return <>; @@ -24,17 +26,13 @@ export function WelcomeCard() { - Welcome, {session.user.name || "Contributor"}! + {t("welcome_message.label", { username: session.user.name || t("welcome_message.contributor") })} - - - Open Assistant is an open-source AI assistant that uses and trains advanced language models to - understand and respond to humans. - + {t("welcome_message.description")} - Complete tasks to help train the model and earn points. + {t("welcome_message.instruction")}