From 3ab8f3f325bb01b905d4983b6d6bc62315598c49 Mon Sep 17 00:00:00 2001 From: ghaddaditw <40211818-ghaddaditw@users.noreply.replit.com> Date: Sun, 8 Jun 2025 08:52:32 +0000 Subject: [PATCH] Add translations to the landing page to support multiple languages Adds i18n support to LandingPage.tsx and introduces new keys in en.json and ar.json for translating landing page content. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 5a4f78b4-6a2e-4391-b005-5544e086dac8 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/b281d9b5-65f2-4854-b74e-21841ec0541a.jpg --- client/src/i18n/locales/ar.json | 8 ++++++++ client/src/i18n/locales/en.json | 8 ++++++++ client/src/pages/LandingPage.tsx | 15 ++++++++------- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json index e32dc0e..8bd910a 100644 --- a/client/src/i18n/locales/ar.json +++ b/client/src/i18n/locales/ar.json @@ -276,6 +276,14 @@ "invalidCredentials": "بيانات اعتماد غير صحيحة", "passwordMismatch": "كلمات المرور غير متطابقة" }, + "landing": { + "heroTitle": "مدعوم بالصوت", + "heroSubtitle": "إدارة شاملة للمهام والشؤون المالية بدون إنترنت مع معالجة ذكية محلية للصوت. لا يتطلب إنترنت، خصوصية مضمونة بالكامل.", + "taskManagement": "إدارة المهام", + "taskManagementDesc": "إنشاء المهام بالأوامر الصوتية", + "financialTracking": "تتبع الشؤون المالية", + "financialTrackingDesc": "تسجيل تلقائي للنفقات" + }, "dashboard": { "title": "لوحة التحكم", "welcome": "مرحباً", diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json index 28da038..7db55db 100644 --- a/client/src/i18n/locales/en.json +++ b/client/src/i18n/locales/en.json @@ -315,6 +315,14 @@ "invalidCredentials": "Invalid credentials", "passwordMismatch": "Passwords do not match" }, + "landing": { + "heroTitle": "Voice-Powered", + "heroSubtitle": "Complete offline task and financial management with local AI voice processing. No internet required, complete privacy guaranteed.", + "taskManagement": "Task Management", + "taskManagementDesc": "Voice-powered task creation", + "financialTracking": "Financial Tracking", + "financialTrackingDesc": "Automated expense logging" + }, "dashboard": { "title": "Dashboard", "welcome": "Welcome", diff --git a/client/src/pages/LandingPage.tsx b/client/src/pages/LandingPage.tsx index 1ff5ba2..0f6d104 100644 --- a/client/src/pages/LandingPage.tsx +++ b/client/src/pages/LandingPage.tsx @@ -2,6 +2,7 @@ import { useLocation } from "wouter"; import { useAuth } from "@/hooks/useAuth"; import { useVoice } from "@/hooks/useVoice"; import { useQuery } from "@tanstack/react-query"; +import { useTranslation } from "react-i18next"; import { aiService } from "@/services/aiService"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; @@ -28,6 +29,7 @@ export default function LandingPage() { const { user } = useAuth(); const { isListening, startListening, stopListening, isSupported } = useVoice(); const { theme } = useTheme(); + const { t } = useTranslation(); // Redirect to dashboard if already authenticated if (user) { @@ -66,15 +68,14 @@ export default function LandingPage() {

- Voice-Powered + {t('landing.heroTitle')} {" "}MenAssist

- Complete offline task and financial management with local AI voice processing. - No internet required, complete privacy guaranteed. + {t('landing.heroSubtitle')}

@@ -85,8 +86,8 @@ export default function LandingPage() {
-

Task Management

-

Voice-powered task creation

+

{t('landing.taskManagement')}

+

{t('landing.taskManagementDesc')}

@@ -95,8 +96,8 @@ export default function LandingPage() {
-

Financial Tracking

-

Automated expense logging

+

{t('landing.financialTracking')}

+

{t('landing.financialTrackingDesc')}