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')} >