feat: soporte multi idioma en la web (infraestructura)

i18next + react-i18next con es-AR (fuente), es-419, pt-BR y en; el idioma
sale del dispositivo (fallback a inglés) y se puede cambiar en Ajustes.
La elección se guarda en localStorage y, para el profe, en users.locale.
Las validaciones de shared pasan a claves y los errores de la API se
traducen por code (con params para límites de plan y cupo).
Migrados: layout, Ajustes, auth, PWA y lib/format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-11-03 12:14:59 -03:00
parent ff885bddfc
commit cb872eb8bc
102 changed files with 2332 additions and 290 deletions

View File

@@ -7,7 +7,7 @@ import { useAuth } from '../../context/AuthProvider'
import { PLAN_NAMES } from '../billing'
import { MP_PROVIDER_NAME, useMpStatus } from '../mp'
import { useWhatsappStatus } from '../whatsapp'
import { BILLING_LABELS, formatPrice, formatSchedule } from './constants'
import { billingTypeLabel, formatPrice, formatSchedule } from './constants'
import { useOnboarding } from './OnboardingProvider'
type ConfirmationStepProps = {
@@ -59,7 +59,7 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
<dt className="text-foreground/60">Precio</dt>
<dd className="font-semibold text-primary">
{formatPrice(group.price)}
{group.billingType ? ` · ${BILLING_LABELS[group.billingType]}` : ''}
{group.billingType ? ` · ${billingTypeLabel(group.billingType)}` : ''}
</dd>
</div>
<div className="flex items-center justify-between py-2.5">

View File

@@ -1,6 +1,6 @@
import type { BillingType, WeekDay } from '@gruperly/shared'
export { BILLING_LABELS, formatPrice, formatSchedule, WEEK_DAY_FULL_LABELS } from '../../lib/format'
export { billingTypeLabel, formatPrice, formatSchedule, weekDayLabel } from '../../lib/format'
export const WEEK_DAYS: readonly WeekDay[] = [
'MONDAY',