feat(i18n): traducir el onboarding (nombres de país desde Intl)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,14 +10,15 @@ import { FirstGroupStep } from './FirstGroupStep'
|
||||
import { useOnboarding } from './OnboardingProvider'
|
||||
import { PaymentStep } from './PaymentStep'
|
||||
import { PlanStep } from './PlanStep'
|
||||
import { STEP_LABELS } from './steps'
|
||||
import { Stepper } from './Stepper'
|
||||
import { WelcomeStep } from './WelcomeStep'
|
||||
import { WhatsappStep } from './WhatsappStep'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export function OnboardingView() {
|
||||
const { user, isPending: authPending } = useAuth()
|
||||
const navigate = useNavigate()
|
||||
const { t } = useTranslation(['onboarding', 'common', 'groups'])
|
||||
const {
|
||||
step,
|
||||
steps,
|
||||
@@ -52,16 +53,16 @@ export function OnboardingView() {
|
||||
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-accent-soft">
|
||||
<LogoIcon className="size-8" />
|
||||
</span>
|
||||
<h1 className="text-2xl font-bold text-primary">Tu cuenta, lista</h1>
|
||||
<h1 className="text-2xl font-bold text-primary">{t('signedOut.title')}</h1>
|
||||
<p className="text-sm text-foreground/60">
|
||||
Iniciá sesión para configurar tus cobros y crear tu primer grupo.
|
||||
{t('signedOut.description')}
|
||||
</p>
|
||||
<Button
|
||||
variant="primary"
|
||||
className="w-full"
|
||||
onClick={() => void navigate({ to: '/login' })}
|
||||
>
|
||||
Iniciar sesión
|
||||
{t('signedOut.action')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,7 +77,7 @@ export function OnboardingView() {
|
||||
)
|
||||
}
|
||||
|
||||
const firstName = user.name?.trim().split(/\s+/)[0] ?? 'profesor/a'
|
||||
const firstName = user.name?.trim().split(/\s+/)[0] ?? t('fallbackName')
|
||||
|
||||
return (
|
||||
<main className="mx-auto flex min-h-dvh w-full max-w-md flex-col px-4 pb-12 pt-8 sm:pt-12">
|
||||
@@ -87,7 +88,7 @@ export function OnboardingView() {
|
||||
{/* Con Free no se muestran Cobros ni WhatsApp: el stepper refleja solo
|
||||
los pasos que se van a recorrer. */}
|
||||
<Stepper
|
||||
steps={steps.map((id) => ({ label: STEP_LABELS[id] }))}
|
||||
steps={steps.map((id) => ({ label: t(`steps.${id}`) }))}
|
||||
current={steps.indexOf(step)}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user