feat(i18n): traducir la ficha del alumno
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import type { KeyboardEvent, RefObject } from 'react'
|
||||
import { Ellipsis, MoveRight, Pause, Pencil, UserMinus, UserPlus } from 'lucide-react'
|
||||
import { useToast } from '../../components/ui'
|
||||
import { useAttendeeDetail } from './AttendeeDetailProvider'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const ITEM_CLASS =
|
||||
'flex min-h-11 w-full items-center gap-2.5 rounded-lg px-3 text-left text-sm font-medium text-primary transition-colors hover:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent'
|
||||
@@ -17,6 +18,7 @@ export function AttendeeActionsMenu({
|
||||
}) {
|
||||
const { beginContactEdit, openRemoveDialog, openChangeGroupDialog, openAddToGroupDialog } = useAttendeeDetail()
|
||||
const toast = useToast()
|
||||
const { t } = useTranslation(['attendeeDetail', 'common'])
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const menuRef = useRef<HTMLDivElement>(null)
|
||||
const itemRef = useRef<HTMLButtonElement>(null)
|
||||
@@ -72,7 +74,7 @@ export function AttendeeActionsMenu({
|
||||
const showPendingPause = () => {
|
||||
close()
|
||||
// TODO(miembros): conectar la pausa cuando se defina su efecto sobre cupos y cobros.
|
||||
toast.info('Pausar la membresía estará disponible cuando se confirme su lógica de negocio.')
|
||||
toast.info(t('menu.pausePending'))
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -84,7 +86,7 @@ export function AttendeeActionsMenu({
|
||||
aria-haspopup="menu"
|
||||
aria-expanded={isOpen}
|
||||
aria-controls={isOpen ? menuId : undefined}
|
||||
aria-label="Más acciones"
|
||||
aria-label={t('menu.more')}
|
||||
className="inline-flex size-11 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"
|
||||
>
|
||||
<Ellipsis className="size-5" aria-hidden="true" />
|
||||
@@ -95,7 +97,7 @@ export function AttendeeActionsMenu({
|
||||
ref={menuRef}
|
||||
id={menuId}
|
||||
role="menu"
|
||||
aria-label="Acciones del miembro"
|
||||
aria-label={t('menu.label')}
|
||||
onKeyDown={handleKeyDown}
|
||||
className="absolute right-0 top-full z-40 mt-1 w-60 rounded-xl bg-primary-soft p-1.5 shadow-lg"
|
||||
>
|
||||
@@ -110,7 +112,7 @@ export function AttendeeActionsMenu({
|
||||
}}
|
||||
>
|
||||
<MoveRight className="size-4 shrink-0 text-secondary" aria-hidden="true" />
|
||||
Cambiar de grupo
|
||||
{t('menu.changeGroup')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -122,7 +124,7 @@ export function AttendeeActionsMenu({
|
||||
}}
|
||||
>
|
||||
<UserPlus className="size-4 shrink-0 text-secondary" aria-hidden="true" />
|
||||
Agregar a otro grupo
|
||||
{t('menu.addToGroup')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -137,7 +139,7 @@ export function AttendeeActionsMenu({
|
||||
}}
|
||||
>
|
||||
<Pencil className="size-4 shrink-0 text-secondary" aria-hidden="true" />
|
||||
Editar contacto
|
||||
{t('menu.editContact')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -146,7 +148,7 @@ export function AttendeeActionsMenu({
|
||||
onClick={showPendingPause}
|
||||
>
|
||||
<Pause className="size-4 shrink-0 text-secondary" aria-hidden="true" />
|
||||
Pausar membresía
|
||||
{t('menu.pause')}
|
||||
</button>
|
||||
<div className="my-1 border-t border-border/70" aria-hidden="true" />
|
||||
<button
|
||||
@@ -159,7 +161,7 @@ export function AttendeeActionsMenu({
|
||||
}}
|
||||
>
|
||||
<UserMinus className="size-4 shrink-0" aria-hidden="true" />
|
||||
Quitar del grupo
|
||||
{t('menu.remove')}
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user