feat(i18n): traducir la toma de asistencia
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user