feat: Apply localization to Track and Children pages (Phase 9 - Batch 2)
**Pages Localized:** - Track main page: Activity selection menu with all tracking options - Children page: Complete localization including age formatting with pluralization **Translation Files:** - Enhanced tracking.json: Added trackActivity, selectActivity, and activities keys - Created children.json for all 5 languages with comprehensive strings - Updated i18n config to include children namespace **Key Features:** - Localized age calculation with proper pluralization (year/years, month/months) - All error messages translated - Gender labels localized - Properly formatted age display for all languages **Languages Supported:** - English, Spanish, French, Portuguese, Chinese (Simplified) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,37 +5,39 @@ import { Restaurant, Hotel, BabyChangingStation, ChildCare, MedicalServices } fr
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { AppShell } from '@/components/layouts/AppShell/AppShell';
|
||||
import { ProtectedRoute } from '@/components/common/ProtectedRoute';
|
||||
import { useTranslation } from '@/hooks/useTranslation';
|
||||
|
||||
export default function TrackPage() {
|
||||
const { t } = useTranslation('tracking');
|
||||
const router = useRouter();
|
||||
|
||||
const trackingOptions = [
|
||||
{
|
||||
title: 'Feeding',
|
||||
title: t('activities.feeding'),
|
||||
icon: <Restaurant sx={{ fontSize: 48, color: 'primary.main' }} />,
|
||||
path: '/track/feeding',
|
||||
color: '#FFE4E1',
|
||||
},
|
||||
{
|
||||
title: 'Sleep',
|
||||
title: t('activities.sleep'),
|
||||
icon: <Hotel sx={{ fontSize: 48, color: 'info.main' }} />,
|
||||
path: '/track/sleep',
|
||||
color: '#E1F5FF',
|
||||
},
|
||||
{
|
||||
title: 'Diaper',
|
||||
title: t('activities.diaper'),
|
||||
icon: <BabyChangingStation sx={{ fontSize: 48, color: 'warning.main' }} />,
|
||||
path: '/track/diaper',
|
||||
color: '#FFF4E1',
|
||||
},
|
||||
{
|
||||
title: 'Medicine',
|
||||
title: t('activities.medicine'),
|
||||
icon: <MedicalServices sx={{ fontSize: 48, color: 'error.main' }} />,
|
||||
path: '/track/medicine',
|
||||
color: '#FFE8E8',
|
||||
},
|
||||
{
|
||||
title: 'Activity',
|
||||
title: t('activities.activity'),
|
||||
icon: <ChildCare sx={{ fontSize: 48, color: 'success.main' }} />,
|
||||
path: '/track/activity',
|
||||
color: '#E8F5E9',
|
||||
@@ -47,10 +49,10 @@ export default function TrackPage() {
|
||||
<AppShell>
|
||||
<Box>
|
||||
<Typography variant="h4" fontWeight="600" gutterBottom>
|
||||
Track Activity
|
||||
{t('trackActivity')}
|
||||
</Typography>
|
||||
<Typography variant="body1" color="text.secondary" sx={{ mb: 4 }}>
|
||||
Select an activity to track
|
||||
{t('selectActivity')}
|
||||
</Typography>
|
||||
|
||||
<Grid container spacing={3}>
|
||||
|
||||
Reference in New Issue
Block a user