feat: Complete Spanish, French, Portuguese, Chinese localization and add German/Italian support
Some checks failed
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled

- Updated all Spanish (es) translation files with comprehensive translations for tracking, AI, family, insights, children, and settings pages
- Updated French (fr), Portuguese (pt), and Chinese (zh) translations to match English structure
- Added German (de) and Italian (it) language support with complete translation files
- Fixed medicine tracker route from /track/medication to /track/medicine
- Updated i18n config to support 7 languages: en, es, fr, pt, zh, de, it
- All tracking pages now fully localized: sleep, feeding, diaper, medicine, activity
- AI assistant interface fully translated with thinking messages and suggested questions
- Family management and insights pages now support all languages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-03 15:03:02 +00:00
parent 41320638e5
commit 58c3a8d9d5
74 changed files with 5413 additions and 1735 deletions

View File

@@ -12,6 +12,8 @@ import enAuth from '@/locales/en/auth.json';
import enSettings from '@/locales/en/settings.json';
import enOnboarding from '@/locales/en/onboarding.json';
import enErrors from '@/locales/en/errors.json';
import enFamily from '@/locales/en/family.json';
import enInsights from '@/locales/en/insights.json';
import esCommon from '@/locales/es/common.json';
import esDashboard from '@/locales/es/dashboard.json';
@@ -22,6 +24,8 @@ import esAuth from '@/locales/es/auth.json';
import esSettings from '@/locales/es/settings.json';
import esOnboarding from '@/locales/es/onboarding.json';
import esErrors from '@/locales/es/errors.json';
import esFamily from '@/locales/es/family.json';
import esInsights from '@/locales/es/insights.json';
import frCommon from '@/locales/fr/common.json';
import frDashboard from '@/locales/fr/dashboard.json';
@@ -32,6 +36,8 @@ import frAuth from '@/locales/fr/auth.json';
import frSettings from '@/locales/fr/settings.json';
import frOnboarding from '@/locales/fr/onboarding.json';
import frErrors from '@/locales/fr/errors.json';
import frFamily from '@/locales/fr/family.json';
import frInsights from '@/locales/fr/insights.json';
import ptCommon from '@/locales/pt/common.json';
import ptDashboard from '@/locales/pt/dashboard.json';
@@ -42,6 +48,8 @@ import ptAuth from '@/locales/pt/auth.json';
import ptSettings from '@/locales/pt/settings.json';
import ptOnboarding from '@/locales/pt/onboarding.json';
import ptErrors from '@/locales/pt/errors.json';
import ptFamily from '@/locales/pt/family.json';
import ptInsights from '@/locales/pt/insights.json';
import zhCommon from '@/locales/zh/common.json';
import zhDashboard from '@/locales/zh/dashboard.json';
@@ -52,6 +60,32 @@ import zhAuth from '@/locales/zh/auth.json';
import zhSettings from '@/locales/zh/settings.json';
import zhOnboarding from '@/locales/zh/onboarding.json';
import zhErrors from '@/locales/zh/errors.json';
import zhFamily from '@/locales/zh/family.json';
import zhInsights from '@/locales/zh/insights.json';
import deCommon from '@/locales/de/common.json';
import deDashboard from '@/locales/de/dashboard.json';
import deTracking from '@/locales/de/tracking.json';
import deChildren from '@/locales/de/children.json';
import deAi from '@/locales/de/ai.json';
import deAuth from '@/locales/de/auth.json';
import deSettings from '@/locales/de/settings.json';
import deOnboarding from '@/locales/de/onboarding.json';
import deErrors from '@/locales/de/errors.json';
import deFamily from '@/locales/de/family.json';
import deInsights from '@/locales/de/insights.json';
import itCommon from '@/locales/it/common.json';
import itDashboard from '@/locales/it/dashboard.json';
import itTracking from '@/locales/it/tracking.json';
import itChildren from '@/locales/it/children.json';
import itAi from '@/locales/it/ai.json';
import itAuth from '@/locales/it/auth.json';
import itSettings from '@/locales/it/settings.json';
import itOnboarding from '@/locales/it/onboarding.json';
import itErrors from '@/locales/it/errors.json';
import itFamily from '@/locales/it/family.json';
import itInsights from '@/locales/it/insights.json';
export const resources = {
en: {
@@ -64,6 +98,8 @@ export const resources = {
settings: enSettings,
onboarding: enOnboarding,
errors: enErrors,
family: enFamily,
insights: enInsights,
},
es: {
common: esCommon,
@@ -75,6 +111,8 @@ export const resources = {
settings: esSettings,
onboarding: esOnboarding,
errors: esErrors,
family: esFamily,
insights: esInsights,
},
fr: {
common: frCommon,
@@ -86,6 +124,8 @@ export const resources = {
settings: frSettings,
onboarding: frOnboarding,
errors: frErrors,
family: frFamily,
insights: frInsights,
},
pt: {
common: ptCommon,
@@ -97,6 +137,8 @@ export const resources = {
settings: ptSettings,
onboarding: ptOnboarding,
errors: ptErrors,
family: ptFamily,
insights: ptInsights,
},
zh: {
common: zhCommon,
@@ -108,6 +150,34 @@ export const resources = {
settings: zhSettings,
onboarding: zhOnboarding,
errors: zhErrors,
family: zhFamily,
insights: zhInsights,
},
de: {
common: deCommon,
dashboard: deDashboard,
tracking: deTracking,
children: deChildren,
ai: deAi,
auth: deAuth,
settings: deSettings,
onboarding: deOnboarding,
errors: deErrors,
family: deFamily,
insights: deInsights,
},
it: {
common: itCommon,
dashboard: itDashboard,
tracking: itTracking,
children: itChildren,
ai: itAi,
auth: itAuth,
settings: itSettings,
onboarding: itOnboarding,
errors: itErrors,
family: itFamily,
insights: itInsights,
},
} as const;
@@ -119,6 +189,8 @@ export const supportedLanguages = [
{ code: 'fr', name: 'French', nativeName: 'Français' },
{ code: 'pt', name: 'Portuguese', nativeName: 'Português' },
{ code: 'zh', name: 'Chinese', nativeName: '中文' },
{ code: 'de', name: 'German', nativeName: 'Deutsch' },
{ code: 'it', name: 'Italian', nativeName: 'Italiano' },
] as const;
i18n
@@ -128,7 +200,7 @@ i18n
resources,
defaultNS,
fallbackLng: 'en',
supportedLngs: ['en', 'es', 'fr', 'pt', 'zh'],
supportedLngs: ['en', 'es', 'fr', 'pt', 'zh', 'de', 'it'],
interpolation: {
escapeValue: false, // React already escapes values
},