From 32d3126dc935f00ffaaa514c3ad798894e0423db Mon Sep 17 00:00:00 2001
From: paul-nothaft <40865108-paul-nothaft@users.noreply.replit.com>
Date: Thu, 23 Oct 2025 20:56:05 +0000
Subject: [PATCH] Add support for multiple languages in the application
interface
Integrates `react-i18next` to enable language translations for UI elements across the BottomNavigation, TaskCreationModal, and TaskList components.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ceced2fc-aa46-458d-ba87-ddd4b7bb1518
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/659922a9-0087-461c-90dd-6d9a58b81d4d/ceced2fc-aa46-458d-ba87-ddd4b7bb1518/un1X8jl
---
client/src/components/BottomNavigation.tsx | 10 ++++---
client/src/components/TaskCreationModal.tsx | 26 +++++++++---------
client/src/components/TaskList.tsx | 30 +++++++++++----------
3 files changed, 36 insertions(+), 30 deletions(-)
diff --git a/client/src/components/BottomNavigation.tsx b/client/src/components/BottomNavigation.tsx
index c95f1ab..c6a672a 100644
--- a/client/src/components/BottomNavigation.tsx
+++ b/client/src/components/BottomNavigation.tsx
@@ -1,3 +1,4 @@
+import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { Home, Calendar, LayoutGrid, Plus, Settings } from 'lucide-react';
@@ -10,14 +11,15 @@ interface BottomNavigationProps {
}
export default function BottomNavigation({ onTabChange, onCreateTask, activeTab = 'tasks' }: BottomNavigationProps) {
+ const { t } = useTranslation();
const [currentTab, setCurrentTab] = useState(activeTab);
const tabs = [
- { id: 'tasks', label: 'Tasks', icon: Home },
- { id: 'calendar', label: 'Calendar', icon: Calendar },
+ { id: 'tasks', label: t('navigation.tasks'), icon: Home },
+ { id: 'calendar', label: t('navigation.calendar'), icon: Calendar },
{ id: 'create', label: 'Create', icon: Plus, isCreate: true },
- { id: 'kanban', label: 'Board', icon: LayoutGrid },
- { id: 'settings', label: 'Settings', icon: Settings }
+ { id: 'kanban', label: t('navigation.kanban'), icon: LayoutGrid },
+ { id: 'settings', label: t('navigation.settings'), icon: Settings }
];
const handleTabClick = (tabId: string, isCreate?: boolean) => {
diff --git a/client/src/components/TaskCreationModal.tsx b/client/src/components/TaskCreationModal.tsx
index afe3b74..6cd4ad2 100644
--- a/client/src/components/TaskCreationModal.tsx
+++ b/client/src/components/TaskCreationModal.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -17,6 +18,7 @@ interface TaskCreationModalProps {
}
export default function TaskCreationModal({ isOpen, onClose, onSave }: TaskCreationModalProps) {
+ const { t } = useTranslation();
const [title, setTitle] = useState('');
const [description, setDescription] = useState('');
const [priority, setPriority] = useState<'low' | 'medium' | 'high'>('medium');
@@ -77,14 +79,14 @@ export default function TaskCreationModal({ isOpen, onClose, onSave }: TaskCreat
{searchQuery || filterBy !== 'all' - ? 'No tasks match your filters' - : 'No tasks yet. Create your first task!' + ? t('taskList.noMatchingTasks') + : t('taskList.noTasks') }