Skip to content

Commit 83d3dd4

Browse files
Translate "My Dashboard" button
Translate the "My Dashboard" button text in the `LandingHeader` component using i18n.
1 parent 513255c commit 83d3dd4

6 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/components/landing/LandingHeader.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ArrowRight } from "lucide-react";
44
import { RefSpringLogo } from "@/components/RefSpringLogo";
55
import { Link } from "react-router-dom";
66
import { useAuth } from "@/hooks/useAuth";
7+
import { useTranslation } from "react-i18next";
78

89
interface LandingHeaderProps {
910
onRedirectToDashboard: () => void;
@@ -12,6 +13,7 @@ interface LandingHeaderProps {
1213

1314
export const LandingHeader = ({ onRedirectToDashboard, currentPage = 'landing' }: LandingHeaderProps) => {
1415
const { user } = useAuth();
16+
const { t } = useTranslation();
1517

1618
const handleLoginClick = () => {
1719
if (user) {
@@ -52,7 +54,7 @@ export const LandingHeader = ({ onRedirectToDashboard, currentPage = 'landing' }
5254
</nav>
5355
<div className="flex items-center gap-3">
5456
<Button variant="outline" className="hidden md:flex hover:scale-105 transition-transform" onClick={handleLoginClick}>
55-
{user ? "My Dashboard" : "Se connecter"}
57+
{user ? t("auth.myDashboard") : t("auth.signIn")}
5658
</Button>
5759
<Button
5860
className="bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white font-semibold px-6 py-2 shadow-lg hover:shadow-xl hover:scale-105 transition-all animate-pulse"

src/i18n/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
{
32
"auth": {
43
"title": "RefSpring",
@@ -20,7 +19,8 @@
2019
"accountCreated": "Account created",
2120
"accountCreatedDesc": "Your account has been created successfully!",
2221
"error": "Error",
23-
"genericError": "An error occurred"
22+
"genericError": "An error occurred",
23+
"myDashboard": "My Dashboard"
2424
},
2525
"loading": "Loading...",
2626
"dashboard": {

src/i18n/locales/es.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
{
32
"auth": {
43
"title": "RefSpring",
@@ -20,7 +19,8 @@
2019
"accountCreated": "Cuenta creada",
2120
"accountCreatedDesc": "¡Tu cuenta ha sido creada exitosamente!",
2221
"error": "Error",
23-
"genericError": "Ocurrió un error"
22+
"genericError": "Ocurrió un error",
23+
"myDashboard": "Mi Panel de Control"
2424
},
2525
"loading": "Cargando...",
2626
"dashboard": {

src/i18n/locales/fr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
{
32
"auth": {
43
"title": "RefSpring",
@@ -20,7 +19,8 @@
2019
"accountCreated": "Compte créé",
2120
"accountCreatedDesc": "Votre compte a été créé avec succès !",
2221
"error": "Erreur",
23-
"genericError": "Une erreur s'est produite"
22+
"genericError": "Une erreur s'est produite",
23+
"myDashboard": "Mon Tableau de Bord"
2424
},
2525
"loading": "Chargement...",
2626
"dashboard": {

src/i18n/locales/ru.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
{
32
"auth": {
43
"title": "RefSpring",
@@ -20,7 +19,8 @@
2019
"accountCreated": "Аккаунт создан",
2120
"accountCreatedDesc": "Ваш аккаунт был успешно создан!",
2221
"error": "Ошибка",
23-
"genericError": "Произошла ошибка"
22+
"genericError": "Произошла ошибка",
23+
"myDashboard": "Моя Панель"
2424
},
2525
"loading": "Загрузка...",
2626
"dashboard": {

src/i18n/locales/zh.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
{
32
"auth": {
43
"title": "RefSpring",
@@ -20,7 +19,8 @@
2019
"accountCreated": "账户已创建",
2120
"accountCreatedDesc": "您的账户已成功创建!",
2221
"error": "错误",
23-
"genericError": "发生了错误"
22+
"genericError": "发生了错误",
23+
"myDashboard": "我的仪表板"
2424
},
2525
"loading": "加载中...",
2626
"dashboard": {

0 commit comments

Comments
 (0)