feat(i18n): traducir la ficha del alumno

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-11-03 12:30:11 -03:00
parent ecdbbbbca6
commit 8a5768e0c0
27 changed files with 856 additions and 164 deletions

View File

@@ -17,23 +17,25 @@ import { ConfirmRemoveAttendeeDialog } from './ConfirmRemoveAttendeeDialog'
import { formatMemberSince } from './attendance'
import { paymentPresentation } from './detail'
import { StudentAccessSection } from './StudentAccessSection'
import { useTranslation } from 'react-i18next'
export function AttendeeDetailView() {
const { groupId, groupName, attendee, attendeePending, attendeeFailed } = useAttendeeDetail()
const navigate = useNavigate()
const { t } = useTranslation(['attendeeDetail', 'common', 'groupDetail'])
const menuTriggerRef = useRef<HTMLButtonElement>(null)
const payment = attendee ? paymentPresentation(attendee.payment) : null
return (
<section className="mx-auto w-full max-w-md animate-fade-in lg:max-w-2xl">
<LargeTitle
title={attendee?.fullName ?? 'Miembro'}
barContext={groupName ?? 'Grupo'}
title={attendee?.fullName ?? t('fallbackName')}
barContext={groupName ?? t('groupDetail:fallbackTitle')}
leading={
<Link
to="/groups/$groupId"
params={{ groupId }}
aria-label="Volver al grupo"
aria-label={t('backToGroup')}
className="relative z-10 hidden size-11 shrink-0 lg:inline-flex items-center justify-center rounded-xl text-primary transition-colors hover:bg-primary-soft active:scale-[0.96] motion-reduce:active:scale-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"
>
<ArrowLeft className="size-5" aria-hidden="true" />
@@ -54,7 +56,7 @@ export function AttendeeDetailView() {
<Badge variant={payment.isDue ? 'warning' : 'success'} className="text-[11px]">
{payment.chipLabel}
</Badge>
<span>Desde {formatMemberSince(attendee.createdAt)}</span>
<span>{t('since', { date: formatMemberSince(attendee.createdAt) })}</span>
</div>
) : null}
</LargeTitle>
@@ -67,16 +69,16 @@ export function AttendeeDetailView() {
{attendeeFailed || (!attendeePending && !attendee) ? (
<div className="mt-6 rounded-2xl bg-danger-soft p-6">
<h2 className="text-lg font-bold text-danger-fg">Miembro no encontrado</h2>
<h2 className="text-lg font-bold text-danger-fg">{t('notFound.title')}</h2>
<p className="mt-2 text-sm text-primary">
No se pudo cargar la información de este miembro.
{t('notFound.description')}
</p>
<Button
variant="ghost"
className="mt-4 px-0 text-accent-fg hover:bg-transparent hover:text-primary"
onClick={() => void navigate({ to: '/groups/$groupId', params: { groupId } })}
>
Volver al grupo
{t('backToGroup')}
</Button>
</div>
) : null}