feat: Complete comprehensive localization of all tracking and management pages
Some checks failed
CI/CD Pipeline / Build Application (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled

- Feeding page: 47+ strings localized with validation, success/error messages
- Medicine page: 44 strings localized with unit conversion support
- Sleep page: Already localized (verified)
- Diaper page: Already localized (verified)
- Activity page: Already localized (verified)
- AI Assistant: 51 strings localized including chat interface and suggested questions
- Children page: 38 strings fully localized with gender labels
- Family page: 42 strings localized with role management
- Insights page: 41 strings localized including charts and analytics

Added translation files:
- locales/en/ai.json (44 keys)
- locales/en/family.json (42 keys)
- locales/en/insights.json (41 keys)

Updated translation files:
- locales/en/tracking.json (added feeding, health/medicine sections)
- locales/en/children.json (verified complete)

All pages now use useTranslation hook with proper namespaces.
All user-facing text externalized and ready for multi-language support.
This commit is contained in:
2025-10-03 13:57:47 +00:00
parent 5fea603922
commit 41320638e5
10 changed files with 434 additions and 204 deletions

View File

@@ -58,5 +58,50 @@
"safety": "Safety",
"nutrition": "Nutrition",
"general": "General"
},
"interface": {
"assistantTitle": "AI Parenting Assistant",
"assistantSubtitle": "Ask me anything about parenting and childcare",
"greeting": "Hi {{name}}! How can I help you today?",
"inputPlaceholder": "Ask me anything...",
"closeDrawer": "Close drawer",
"moreOptions": "More options",
"deleteConversation": "Delete conversation",
"chatCount": "{{count}} chat",
"chatCount_plural": "{{count}} chats",
"ungrouped": "Ungrouped",
"errorMessage": "Sorry, I encountered an error. Please try again.",
"disclaimerFooter": "This AI assistant provides general information. Always consult healthcare professionals for medical advice.",
"deleteDialogTitle": "Delete Conversation",
"deleteDialogMessage": "Are you sure you want to delete this conversation? This action cannot be undone.",
"cancel": "Cancel",
"delete": "Delete",
"moveToGroup": "Move to Group",
"createNewGroup": "Create New Group",
"groupNameLabel": "Group Name",
"create": "Create",
"suggestedQuestion1": "How much should my baby sleep at 3 months?",
"suggestedQuestion2": "What are normal feeding patterns?",
"suggestedQuestion3": "When should I introduce solid foods?",
"suggestedQuestion4": "Tips for better sleep routine",
"thinking1": "Gathering baby wisdom...",
"thinking2": "Consulting the baby books...",
"thinking3": "Mixing up the perfect answer...",
"thinking4": "Warming up some advice...",
"thinking5": "Preparing your bottle of knowledge...",
"thinking6": "Counting tiny fingers and toes...",
"thinking7": "Connecting the building blocks...",
"thinking8": "Peeking into the toy box...",
"thinking9": "Arranging the puzzle pieces...",
"thinking10": "Stirring the baby food jar...",
"thinking11": "Polishing the pacifier of wisdom...",
"thinking12": "Tiptoeing through naptime...",
"thinking13": "Organizing the diaper bag...",
"thinking14": "Wrapping up your answer with love...",
"thinking15": "Brewing a warm cup of guidance...",
"thinking16": "Knitting together some thoughts...",
"thinking17": "Tucking in the details...",
"thinking18": "Sprinkling some magic dust...",
"thinking19": "Humming a lullaby while I think..."
}
}

View File

@@ -0,0 +1,43 @@
{
"pageTitle": "Family",
"pageSubtitle": "Manage your family members and share access",
"buttons": {
"joinFamily": "Join Family",
"inviteMember": "Invite Member",
"copyCode": "Copy Code",
"inviteFirstMember": "Invite First Member"
},
"shareCode": {
"title": "Family Share Code",
"description": "Share this code with family members to give them access to your family's data"
},
"members": {
"title": "Family Members ({{count}})",
"noMembers": "No family members yet",
"noMembersDescription": "Invite family members to collaborate on child care",
"youLabel": "You",
"removeAriaLabel": "Remove {{name}} from family"
},
"roles": {
"parent": "Parent",
"caregiver": "Caregiver",
"viewer": "Viewer"
},
"messages": {
"shareCodeCopied": "Share code copied to clipboard!",
"shareCodeCopyFailed": "Failed to copy share code",
"invitationSent": "Invitation sent successfully!",
"joinedFamily": "Successfully joined family!",
"memberRemoved": "Member removed successfully",
"noFamilyFound": "No family found. Please complete onboarding first.",
"failedToLoad": "Failed to load family information",
"noFamilyId": "No family ID found",
"failedToInvite": "Failed to send invitation",
"failedToJoin": "Failed to join family",
"failedToRemove": "Failed to remove member"
},
"placeholders": {
"unknownUser": "Unknown User",
"noEmail": "No email"
}
}

View File

@@ -0,0 +1,73 @@
{
"title": "Insights & Analytics",
"subtitle": "Track patterns and get insights about your child's activities",
"filters": {
"child": "Child",
"dateRange": {
"7days": "7 Days",
"30days": "30 Days",
"3months": "3 Months"
}
},
"stats": {
"feedings": {
"title": "Feedings",
"subtitle": "Total count"
},
"sleep": {
"title": "Sleep",
"subtitle": "Average per day"
},
"diapers": {
"title": "Diapers",
"subtitle": "Total changes"
},
"topActivity": {
"title": "Top Activity",
"subtitle": "Most frequent"
}
},
"charts": {
"feedingFrequency": "Feeding Frequency",
"sleepDuration": "Sleep Duration (Hours)",
"diaperChangesByType": "Diaper Changes by Type",
"activityTimeline": "Activity Timeline",
"activityDistribution": "Activity Distribution",
"chartLabels": {
"feedings": "Feedings",
"diapers": "Diapers",
"sleepHours": "Sleep (hrs)"
}
},
"recentActivities": {
"title": "Recent Activities (Last 20)"
},
"emptyStates": {
"noChildren": {
"title": "No Children Added",
"message": "Add a child to view insights and analytics",
"action": "Add Child"
},
"noActivities": "No activities found for the selected date range. Start tracking activities to see insights!"
},
"errors": {
"loadChildren": "Failed to load children",
"loadActivities": "Failed to load activities"
},
"activityTypes": {
"feeding": "Feeding",
"sleep": "Sleep",
"diaper": "Diaper",
"medication": "Medication",
"milestone": "Milestone",
"note": "Note",
"none": "None"
},
"diaperTypes": {
"wet": "Wet",
"dirty": "Dirty",
"both": "Both",
"dry": "Dry",
"unknown": "Unknown"
}
}

View File

@@ -26,17 +26,41 @@
},
"amount": "Amount",
"duration": "Duration",
"startTime": "Start Time",
"endTime": "End Time",
"startTime": "Start Timer",
"endTime": "Stop Timer",
"reset": "Reset",
"notes": "Notes",
"bottleType": "Bottle Type",
"bottleTypes": {
"formula": "Formula",
"breastmilk": "Breast Milk",
"other": "Other"
},
"foodDescription": "Food Description",
"amountDescription": "Amount Description",
"placeholders": {
"amount": "Enter amount",
"notes": "Add any notes about this feeding..."
"notes": "Add any notes about this feeding...",
"duration": "Or enter duration manually",
"foodDescription": "e.g., Rice cereal, Banana puree",
"amountDescription": "e.g., 1/4 cup, 2 spoonfuls"
},
"units": {
"ml": "ml",
"oz": "oz",
"minutes": "minutes"
},
"validation": {
"durationRequired": "Please enter duration or use the timer",
"amountRequired": "Please enter amount",
"foodRequired": "Please enter food description"
},
"success": "Feeding logged successfully!",
"deleted": "Feeding deleted successfully",
"recentFeedings": "Recent Feedings",
"error": {
"saveFailed": "Failed to save feeding",
"deleteFailed": "Failed to delete feeding"
}
},
"sleep": {
@@ -148,7 +172,35 @@
},
"temperature": "Temperature",
"medication": "Medication",
"dosage": "Dosage",
"medicineInfo": "Medicine Information",
"medicineName": {
"label": "Medicine Name",
"placeholder": "e.g., Acetaminophen, Ibuprofen",
"required": "Please enter medicine name"
},
"dosage": {
"label": "Dosage",
"placeholder": "e.g., 5, 2.5",
"required": "Please enter dosage"
},
"unit": "Unit",
"route": {
"label": "Route",
"oral": "Oral",
"topical": "Topical",
"injection": "Injection",
"other": "Other"
},
"reason": {
"label": "Reason (optional)",
"placeholder": "e.g., Fever, Pain, Allergy"
},
"logMedicine": "Log Medicine",
"recentMedicines": "Recent Medicines",
"success": "Medicine logged successfully!",
"error": "Failed to save medicine",
"deleted": "Medicine deleted successfully",
"deleteError": "Failed to delete medicine",
"symptom": "Symptom",
"severity": "Severity",
"severities": {
@@ -164,6 +216,12 @@
"notes": "Add any notes..."
},
"units": {
"ml": "ml",
"mg": "mg",
"tsp": "tsp",
"tbsp": "tbsp",
"drops": "drops",
"tablet": "tablet(s)",
"celsius": "°C",
"fahrenheit": "°F"
}
@@ -202,7 +260,10 @@
"noChildrenAdded": "No Children Added",
"noChildrenMessage": "You need to add a child before you can track activities",
"addChild": "Add Child",
"recentActivities": "Recent Activities"
"recentActivities": "Recent Activities",
"error": {
"loadChildrenFailed": "Failed to load children"
}
},
"quickLog": "Quick Log",
"viewHistory": "View History",