feat(i18n): traducir el backoffice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { Badge } from '../../components/ui'
|
||||
import { formatPrice } from '../../lib/format'
|
||||
import { formatBillingDate, subscriptionStatusLabel } from '../billing'
|
||||
import { countryLabel, planLabel, planVariant, subscriptionVariant } from './copy'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
/** Columnas de la grilla en `lg+`; el encabezado de `AdminAccountsView` usa las mismas. */
|
||||
export const ACCOUNT_GRID_COLUMNS =
|
||||
@@ -13,6 +14,7 @@ export const ACCOUNT_GRID_COLUMNS =
|
||||
/* Una cuenta de la lista: tarjeta en móvil, fila de la grilla en escritorio. */
|
||||
export function AdminAccountRow({ account }: { account: AdminAccountListItem }) {
|
||||
const subscription = account.subscription
|
||||
const { t } = useTranslation(['admin', 'common', 'billing'])
|
||||
const status = subscription?.status ?? null
|
||||
const paidThrough = formatBillingDate(subscription?.paidThrough ?? null)
|
||||
const planBadge = <Badge variant={planVariant(account.plan)}>{planLabel(account.plan)}</Badge>
|
||||
@@ -39,9 +41,8 @@ export function AdminAccountRow({ account }: { account: AdminAccountListItem })
|
||||
{statusBadge}
|
||||
</div>
|
||||
<p className="mt-2 text-xs text-foreground/60">
|
||||
{countryLabel(account.country)} · {account.groupsCount}{' '}
|
||||
{account.groupsCount === 1 ? 'grupo' : 'grupos'} · {account.attendeesCount}{' '}
|
||||
{account.attendeesCount === 1 ? 'alumno' : 'alumnos'}
|
||||
{countryLabel(account.country)} · {t('row.groups', { count: account.groupsCount })} ·{' '}
|
||||
{t('row.students', { count: account.attendeesCount })}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +59,7 @@ export function AdminAccountRow({ account }: { account: AdminAccountListItem })
|
||||
{subscription ? (
|
||||
<p className="mt-1 truncate text-xs text-foreground/50">
|
||||
{formatPrice(subscription.amount, subscription.currency)}
|
||||
{paidThrough ? ` · hasta ${paidThrough}` : ''}
|
||||
{paidThrough ? t('row.until', { date: paidThrough }) : ''}
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user