From 8a5768e0c038ab8f4a652a57b498e64d1f0a3751 Mon Sep 17 00:00:00 2001 From: Jose Selesan Date: Tue, 3 Nov 2026 12:30:11 -0300 Subject: [PATCH] feat(i18n): traducir la ficha del alumno Co-Authored-By: Claude Opus 5.5 --- .../attendee-detail/AbsenceLinkSection.tsx | 16 +- .../attendee-detail/AttendeeActionsMenu.tsx | 18 +- .../AttendeeAttendanceSection.tsx | 18 +- .../AttendeeContactActions.tsx | 14 +- .../attendee-detail/AttendeeContactForm.tsx | 17 +- .../AttendeeContactSection.tsx | 20 ++- .../AttendeeDetailProvider.tsx | 22 +-- .../attendee-detail/AttendeeDetailView.tsx | 16 +- .../attendee-detail/AttendeeNotesForm.tsx | 8 +- .../attendee-detail/AttendeeNotesSection.tsx | 10 +- .../AttendeePaymentsSection.tsx | 8 +- .../attendee-detail/AttendeePhoneLine.tsx | 6 +- .../attendee-detail/ChangeGroupDialog.tsx | 37 ++-- .../ConfirmRemoveAttendeeDialog.tsx | 31 ++-- .../attendee-detail/InviteToAppSheet.tsx | 20 ++- .../attendee-detail/OtherGroupsSection.tsx | 12 +- .../attendee-detail/StudentAccessSection.tsx | 16 +- .../features/attendee-detail/attendance.ts | 21 ++- .../src/features/attendee-detail/detail.ts | 32 ++-- .../features/attendee-detail/studentAccess.ts | 22 ++- apps/web/src/i18n/i18next.d.ts | 2 + .../src/i18n/locales/en/attendeeDetail.json | 162 ++++++++++++++++++ .../i18n/locales/es-419/attendeeDetail.json | 162 ++++++++++++++++++ .../i18n/locales/es-AR/attendeeDetail.json | 162 ++++++++++++++++++ .../i18n/locales/pt-BR/attendeeDetail.json | 162 ++++++++++++++++++ apps/web/test/attendee-attendance.test.ts | 4 +- apps/web/test/attendee-detail.test.ts | 2 +- 27 files changed, 856 insertions(+), 164 deletions(-) create mode 100644 apps/web/src/i18n/locales/en/attendeeDetail.json create mode 100644 apps/web/src/i18n/locales/es-419/attendeeDetail.json create mode 100644 apps/web/src/i18n/locales/es-AR/attendeeDetail.json create mode 100644 apps/web/src/i18n/locales/pt-BR/attendeeDetail.json diff --git a/apps/web/src/features/attendee-detail/AbsenceLinkSection.tsx b/apps/web/src/features/attendee-detail/AbsenceLinkSection.tsx index daef66f..4b9c803 100644 --- a/apps/web/src/features/attendee-detail/AbsenceLinkSection.tsx +++ b/apps/web/src/features/attendee-detail/AbsenceLinkSection.tsx @@ -5,10 +5,12 @@ import { useAttendeeDetail } from './AttendeeDetailProvider' import { ACTION_BUTTON_CLASS, PRIMARY_ACTION_CLASS } from './actionButton' import { Section } from './Section' import { useCopyToClipboard } from './useCopyToClipboard' +import { useTranslation } from 'react-i18next' export function AbsenceLinkSection() { const { attendee } = useAttendeeDetail() const { copied, copy } = useCopyToClipboard() + const { t } = useTranslation(['attendeeDetail', 'common']) const [isOpen, setIsOpen] = useState(false) const panelId = useId() @@ -19,14 +21,14 @@ export function AbsenceLinkSection() { const phoneDigits = attendee.phone?.replace(/\D/g, '') ?? '' const shareUrl = phoneDigits ? `https://wa.me/${phoneDigits}?text=${encodeURIComponent( - `Hola ${attendee.fullName.split(' ')[0]}, desde este link podés avisar tus ausencias en ${url}`, + t('absenceLink.message', { name: attendee.fullName.split(' ')[0], url }), )}` : null return (
setIsOpen((value) => !value) }} > {/* The panel stays in the DOM but hidden: `aria-controls` always resolves and @@ -43,18 +45,18 @@ export function AbsenceLinkSection() { className={cn(ACTION_BUTTON_CLASS, 'w-full')} >