feat(i18n): traducir la toma de asistencia

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-11-03 12:30:52 -03:00
parent 8a5768e0c0
commit 13723d5bb9
9 changed files with 116 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
import { Check, X } from 'lucide-react'
import { cn } from '../../lib/utils'
import type { AttendanceChoice } from './utils'
import { useTranslation } from 'react-i18next'
export function AttendanceToggle({
choice,
@@ -14,13 +15,14 @@ export function AttendanceToggle({
fullName: string
}) {
const isPresent = choice === 'PRESENT'
const { t } = useTranslation('classAttendance')
return (
<button
type="button"
role="switch"
aria-checked={isPresent}
aria-label={`${isPresent ? 'Presente' : 'Ausente'}: ${fullName}`}
aria-label={t(`toggle.${choice}`, { name: fullName })}
disabled={disabled}
onClick={onToggle}
className={cn(