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
This commit is contained in:
ghaddaditw
2025-06-08 08:52:32 +00:00
parent e80e08fdb5
commit 3ab8f3f325
3 changed files with 24 additions and 7 deletions
+8
View File
@@ -276,6 +276,14 @@
"invalidCredentials": "بيانات اعتماد غير صحيحة", "invalidCredentials": "بيانات اعتماد غير صحيحة",
"passwordMismatch": "كلمات المرور غير متطابقة" "passwordMismatch": "كلمات المرور غير متطابقة"
}, },
"landing": {
"heroTitle": "مدعوم بالصوت",
"heroSubtitle": "إدارة شاملة للمهام والشؤون المالية بدون إنترنت مع معالجة ذكية محلية للصوت. لا يتطلب إنترنت، خصوصية مضمونة بالكامل.",
"taskManagement": "إدارة المهام",
"taskManagementDesc": "إنشاء المهام بالأوامر الصوتية",
"financialTracking": "تتبع الشؤون المالية",
"financialTrackingDesc": "تسجيل تلقائي للنفقات"
},
"dashboard": { "dashboard": {
"title": "لوحة التحكم", "title": "لوحة التحكم",
"welcome": "مرحباً", "welcome": "مرحباً",
+8
View File
@@ -315,6 +315,14 @@
"invalidCredentials": "Invalid credentials", "invalidCredentials": "Invalid credentials",
"passwordMismatch": "Passwords do not match" "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": { "dashboard": {
"title": "Dashboard", "title": "Dashboard",
"welcome": "Welcome", "welcome": "Welcome",
+8 -7
View File
@@ -2,6 +2,7 @@ import { useLocation } from "wouter";
import { useAuth } from "@/hooks/useAuth"; import { useAuth } from "@/hooks/useAuth";
import { useVoice } from "@/hooks/useVoice"; import { useVoice } from "@/hooks/useVoice";
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
import { useTranslation } from "react-i18next";
import { aiService } from "@/services/aiService"; import { aiService } from "@/services/aiService";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card"; import { Card, CardContent } from "@/components/ui/card";
@@ -28,6 +29,7 @@ export default function LandingPage() {
const { user } = useAuth(); const { user } = useAuth();
const { isListening, startListening, stopListening, isSupported } = useVoice(); const { isListening, startListening, stopListening, isSupported } = useVoice();
const { theme } = useTheme(); const { theme } = useTheme();
const { t } = useTranslation();
// Redirect to dashboard if already authenticated // Redirect to dashboard if already authenticated
if (user) { if (user) {
@@ -66,15 +68,14 @@ export default function LandingPage() {
<div className="space-y-4"> <div className="space-y-4">
<h1 className="text-4xl lg:text-6xl font-bold text-slate-900 dark:text-white leading-tight"> <h1 className="text-4xl lg:text-6xl font-bold text-slate-900 dark:text-white leading-tight">
Voice-Powered {t('landing.heroTitle')}
<span className="text-transparent bg-clip-text bg-gradient-to-r from-primary-600 to-secondary-600"> <span className="text-transparent bg-clip-text bg-gradient-to-r from-primary-600 to-secondary-600">
{" "}MenAssist {" "}MenAssist
</span> </span>
</h1> </h1>
<p className="text-xl text-slate-600 dark:text-slate-300 leading-relaxed"> <p className="text-xl text-slate-600 dark:text-slate-300 leading-relaxed">
Complete offline task and financial management with local AI voice processing. {t('landing.heroSubtitle')}
No internet required, complete privacy guaranteed.
</p> </p>
</div> </div>
@@ -85,8 +86,8 @@ export default function LandingPage() {
<div className="w-8 h-8 bg-primary-100 dark:bg-primary-900/50 rounded-lg flex items-center justify-center mb-3"> <div className="w-8 h-8 bg-primary-100 dark:bg-primary-900/50 rounded-lg flex items-center justify-center mb-3">
<Calendar className="w-5 h-5 text-primary-600 dark:text-primary-400" /> <Calendar className="w-5 h-5 text-primary-600 dark:text-primary-400" />
</div> </div>
<h4 className="font-semibold text-slate-900 dark:text-white text-sm">Task Management</h4> <h4 className="font-semibold text-slate-900 dark:text-white text-sm">{t('landing.taskManagement')}</h4>
<p className="text-xs text-slate-600 dark:text-slate-400 mt-1">Voice-powered task creation</p> <p className="text-xs text-slate-600 dark:text-slate-400 mt-1">{t('landing.taskManagementDesc')}</p>
</CardContent> </CardContent>
</Card> </Card>
@@ -95,8 +96,8 @@ export default function LandingPage() {
<div className="w-8 h-8 bg-emerald-100 dark:bg-emerald-900/50 rounded-lg flex items-center justify-center mb-3"> <div className="w-8 h-8 bg-emerald-100 dark:bg-emerald-900/50 rounded-lg flex items-center justify-center mb-3">
<DollarSign className="w-5 h-5 text-emerald-600 dark:text-emerald-400" /> <DollarSign className="w-5 h-5 text-emerald-600 dark:text-emerald-400" />
</div> </div>
<h4 className="font-semibold text-slate-900 dark:text-white text-sm">Financial Tracking</h4> <h4 className="font-semibold text-slate-900 dark:text-white text-sm">{t('landing.financialTracking')}</h4>
<p className="text-xs text-slate-600 dark:text-slate-400 mt-1">Automated expense logging</p> <p className="text-xs text-slate-600 dark:text-slate-400 mt-1">{t('landing.financialTrackingDesc')}</p>
</CardContent> </CardContent>
</Card> </Card>
</div> </div>