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:
@@ -5,10 +5,11 @@ import { ArrowRight, CheckCircle2, CreditCard, MessageCircle, Sparkles } from 'l
|
|||||||
import { Badge, Button } from '../../components/ui'
|
import { Badge, Button } from '../../components/ui'
|
||||||
import { useAuth } from '../../context/AuthProvider'
|
import { useAuth } from '../../context/AuthProvider'
|
||||||
import { PLAN_NAMES } from '../billing'
|
import { PLAN_NAMES } from '../billing'
|
||||||
import { MP_PROVIDER_NAME, useMpStatus } from '../mp'
|
import { useMpStatus } from '../mp'
|
||||||
import { useWhatsappStatus } from '../whatsapp'
|
import { useWhatsappStatus } from '../whatsapp'
|
||||||
import { billingTypeLabel, formatPrice, formatSchedule } from './constants'
|
import { billingTypeLabel, formatPrice, formatSchedule } from './constants'
|
||||||
import { useOnboarding } from './OnboardingProvider'
|
import { useOnboarding } from './OnboardingProvider'
|
||||||
|
import { Trans, useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
type ConfirmationStepProps = {
|
type ConfirmationStepProps = {
|
||||||
group: OnboardingGroupDto
|
group: OnboardingGroupDto
|
||||||
@@ -16,6 +17,7 @@ type ConfirmationStepProps = {
|
|||||||
|
|
||||||
export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'groups'])
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const { refresh } = useAuth()
|
const { refresh } = useAuth()
|
||||||
const statusQuery = useMpStatus()
|
const statusQuery = useMpStatus()
|
||||||
@@ -37,9 +39,9 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
|||||||
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-success-soft">
|
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-success-soft">
|
||||||
<CheckCircle2 className="size-7 text-success" />
|
<CheckCircle2 className="size-7 text-success" />
|
||||||
</span>
|
</span>
|
||||||
<h2 className="text-2xl font-bold text-primary">¡Todo listo!</h2>
|
<h2 className="text-2xl font-bold text-primary">{t('done.title')}</h2>
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Tu grupo se creó. Ya podés invitar miembros y pasar lista.
|
{t('done.description')}
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -51,24 +53,24 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
|||||||
{formatSchedule(group.days ?? [], group.time)}
|
{formatSchedule(group.days ?? [], group.time)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Badge variant="success">Activo</Badge>
|
<Badge variant="success">{t('done.active')}</Badge>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<dl className="mt-4 divide-y divide-border text-sm">
|
<dl className="mt-4 divide-y divide-border text-sm">
|
||||||
<div className="flex items-center justify-between py-2.5">
|
<div className="flex items-center justify-between py-2.5">
|
||||||
<dt className="text-foreground/60">Precio</dt>
|
<dt className="text-foreground/60">{t('done.price')}</dt>
|
||||||
<dd className="font-semibold text-primary">
|
<dd className="font-semibold text-primary">
|
||||||
{formatPrice(group.price)}
|
{formatPrice(group.price)}
|
||||||
{group.billingType ? ` · ${billingTypeLabel(group.billingType)}` : ''}
|
{group.billingType ? ` · ${billingTypeLabel(group.billingType)}` : ''}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between py-2.5">
|
<div className="flex items-center justify-between py-2.5">
|
||||||
<dt className="text-foreground/60">Cupo</dt>
|
<dt className="text-foreground/60">{t('done.capacity')}</dt>
|
||||||
<dd className="font-semibold text-primary">{group.capacity ?? '—'} miembros</dd>
|
<dd className="font-semibold text-primary">{group.capacity != null ? t('done.capacityValue', { count: group.capacity }) : '—'}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between py-2.5">
|
<div className="flex items-center justify-between py-2.5">
|
||||||
<dt className="text-foreground/60">Vencimiento</dt>
|
<dt className="text-foreground/60">{t('done.dueDay')}</dt>
|
||||||
<dd className="font-semibold text-primary">Día {group.dueDay ?? '—'} de cada mes</dd>
|
<dd className="font-semibold text-primary">{group.dueDay != null ? t('done.dueDayValue', { day: group.dueDay }) : '—'}</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,10 +79,8 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
|||||||
<div className="flex items-center gap-2 rounded-xl bg-primary-soft px-4 py-3">
|
<div className="flex items-center gap-2 rounded-xl bg-primary-soft px-4 py-3">
|
||||||
<Sparkles className="size-4 shrink-0 text-accent" />
|
<Sparkles className="size-4 shrink-0 text-accent" />
|
||||||
<p className="text-xs text-primary">
|
<p className="text-xs text-primary">
|
||||||
Estás en el plan <span className="font-semibold">{PLAN_NAMES[selectedPlan]}</span>.
|
<Trans t={t} i18nKey="done.plan" values={{ plan: PLAN_NAMES[selectedPlan] }} components={{ strong: <span className="font-semibold" /> }} />
|
||||||
{selectedPlan === 'FREE'
|
{selectedPlan === 'FREE' ? t('done.freeHint') : ''}
|
||||||
? ' Cuando quieras cobrar con Mercado Pago o automatizar WhatsApp, pasate a Pro desde Ajustes.'
|
|
||||||
: ''}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
@@ -92,17 +92,9 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
|||||||
<CreditCard className="size-4 shrink-0 text-accent" />
|
<CreditCard className="size-4 shrink-0 text-accent" />
|
||||||
<p className="text-xs text-primary">
|
<p className="text-xs text-primary">
|
||||||
{isMpConnected ? (
|
{isMpConnected ? (
|
||||||
<>
|
<Trans t={t} i18nKey="done.mpConnected" components={{ strong: <span className="font-semibold" /> }} />
|
||||||
Vas a cobrar con <span className="font-semibold">{MP_PROVIDER_NAME}</span>. Los
|
|
||||||
pagos entran directo en tu cuenta.
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<>
|
<Trans t={t} i18nKey="done.mpPending" components={{ strong: <span className="font-semibold" /> }} />
|
||||||
Cuando quieras cobrar, vinculá <span className="font-semibold">
|
|
||||||
{MP_PROVIDER_NAME}
|
|
||||||
</span>{' '}
|
|
||||||
desde Ajustes. Tu grupo ya quedó creado.
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -111,15 +103,9 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
|||||||
<MessageCircle className="size-4 shrink-0 text-accent" />
|
<MessageCircle className="size-4 shrink-0 text-accent" />
|
||||||
<p className="text-xs text-primary">
|
<p className="text-xs text-primary">
|
||||||
{isWhatsappConnected ? (
|
{isWhatsappConnected ? (
|
||||||
<>
|
t('done.waConnected')
|
||||||
Tu WhatsApp está vinculado. Activá los recordatorios de pago y el reenganche desde la
|
|
||||||
ficha del grupo.
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<>
|
<Trans t={t} i18nKey="done.waPending" components={{ strong: <span className="font-semibold" /> }} />
|
||||||
Para enviar recordatorios automáticos, vinculá{' '}
|
|
||||||
<span className="font-semibold">WhatsApp</span> desde Ajustes.
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,7 +113,7 @@ export function ConfirmationStep({ group }: ConfirmationStepProps) {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<Button variant="primary" className="w-full" onClick={goToDashboard}>
|
<Button variant="primary" className="w-full" onClick={goToDashboard}>
|
||||||
Ir a mi Panel
|
{t('done.goToPanel')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import type { CountryCode } from '@gruperly/shared'
|
import type { CountryCode } from '@gruperly/shared'
|
||||||
import { COUNTRY_CURRENCY, COUNTRY_LABELS } from '@gruperly/shared'
|
import { COUNTRY_CURRENCY } from '@gruperly/shared'
|
||||||
import { ArrowLeft, ArrowRight } from 'lucide-react'
|
import { ArrowLeft, ArrowRight } from 'lucide-react'
|
||||||
import { Button } from '../../components/ui'
|
import { Button } from '../../components/ui'
|
||||||
import { cn } from '../../lib/utils'
|
import { cn } from '../../lib/utils'
|
||||||
import { useOnboarding } from './OnboardingProvider'
|
import { useOnboarding } from './OnboardingProvider'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { countryName, useIntlLocale } from '../../i18n'
|
||||||
|
|
||||||
export const COUNTRY_OPTIONS: readonly CountryCode[] = [
|
export const COUNTRY_OPTIONS: readonly CountryCode[] = [
|
||||||
'AR',
|
'AR',
|
||||||
@@ -30,17 +32,19 @@ type CountryStepProps = {
|
|||||||
*/
|
*/
|
||||||
export function CountryStep({ onNext, onBack }: CountryStepProps) {
|
export function CountryStep({ onNext, onBack }: CountryStepProps) {
|
||||||
const { country, setCountry } = useOnboarding()
|
const { country, setCountry } = useOnboarding()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'groups'])
|
||||||
|
const locale = useIntlLocale()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="space-y-5">
|
<section className="space-y-5">
|
||||||
<header className="space-y-1">
|
<header className="space-y-1">
|
||||||
<h2 className="text-2xl font-bold text-primary">¿En qué país vas a cobrar?</h2>
|
<h2 className="text-2xl font-bold text-primary">{t('country.title')}</h2>
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Tus links se generan en la moneda de ese país.
|
{t('country.description')}
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div role="radiogroup" aria-label="País" className="space-y-2">
|
<div role="radiogroup" aria-label={t('country.label')} className="space-y-2">
|
||||||
{COUNTRY_OPTIONS.map((code) => {
|
{COUNTRY_OPTIONS.map((code) => {
|
||||||
const isSelected = code === country
|
const isSelected = code === country
|
||||||
return (
|
return (
|
||||||
@@ -60,7 +64,7 @@ export function CountryStep({ onNext, onBack }: CountryStepProps) {
|
|||||||
className="size-4 accent-accent"
|
className="size-4 accent-accent"
|
||||||
/>
|
/>
|
||||||
<span className="flex-1 text-sm font-medium text-primary">
|
<span className="flex-1 text-sm font-medium text-primary">
|
||||||
{COUNTRY_LABELS[code]}
|
{countryName(code, locale)}
|
||||||
</span>
|
</span>
|
||||||
<span className="text-sm text-foreground/50">{COUNTRY_CURRENCY[code]}</span>
|
<span className="text-sm text-foreground/50">{COUNTRY_CURRENCY[code]}</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -71,10 +75,10 @@ export function CountryStep({ onNext, onBack }: CountryStepProps) {
|
|||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Button variant="outline" onClick={onBack} className="hidden lg:inline-flex">
|
<Button variant="outline" onClick={onBack} className="hidden lg:inline-flex">
|
||||||
<ArrowLeft className="size-4" />
|
<ArrowLeft className="size-4" />
|
||||||
Volver
|
{t('common:actions.back')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="primary" className="flex-1 lg:flex-none" onClick={() => onNext()}>
|
<Button variant="primary" className="flex-1 lg:flex-none" onClick={() => onNext()}>
|
||||||
Continuar
|
{t('continue')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import type { CreateFirstGroup, OnboardingGroupDto } from '@gruperly/shared'
|
import type { CreateFirstGroup, OnboardingGroupDto } from '@gruperly/shared'
|
||||||
import { useMutation } from '@tanstack/react-query'
|
import { useMutation } from '@tanstack/react-query'
|
||||||
import { createFirstGroup } from '../../lib/api'
|
import { createFirstGroup } from '../../lib/api'
|
||||||
|
import { errorMessage } from '../../i18n'
|
||||||
import { GroupForm } from '../groups/GroupForm'
|
import { GroupForm } from '../groups/GroupForm'
|
||||||
import { useOnboarding } from './OnboardingProvider'
|
import { useOnboarding } from './OnboardingProvider'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
type FirstGroupStepProps = {
|
type FirstGroupStepProps = {
|
||||||
onBack: () => void
|
onBack: () => void
|
||||||
@@ -11,6 +13,7 @@ type FirstGroupStepProps = {
|
|||||||
|
|
||||||
export function FirstGroupStep({ onBack, onCompleted }: FirstGroupStepProps) {
|
export function FirstGroupStep({ onBack, onCompleted }: FirstGroupStepProps) {
|
||||||
const { country } = useOnboarding()
|
const { country } = useOnboarding()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'groups'])
|
||||||
const create = useMutation({
|
const create = useMutation({
|
||||||
mutationFn: (values: CreateFirstGroup) => createFirstGroup(values),
|
mutationFn: (values: CreateFirstGroup) => createFirstGroup(values),
|
||||||
onSuccess: (result) => onCompleted(result.group),
|
onSuccess: (result) => onCompleted(result.group),
|
||||||
@@ -18,13 +21,13 @@ export function FirstGroupStep({ onBack, onCompleted }: FirstGroupStepProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<GroupForm
|
<GroupForm
|
||||||
heading="Tu primer grupo"
|
heading={t('group.heading')}
|
||||||
description="Definí los datos de la clase que vas a cobrar. Después siempre podés editarlos."
|
description={t('groups:create.description')}
|
||||||
submitLabel="Crear grupo"
|
submitLabel={t('groups:create.submit')}
|
||||||
country={country}
|
country={country}
|
||||||
isSubmitting={create.isPending}
|
isSubmitting={create.isPending}
|
||||||
errorMessage={
|
errorMessage={
|
||||||
create.isError ? 'No pudimos crear el grupo. Revisá los datos e intentá de nuevo.' : null
|
create.isError ? errorMessage(create.error, t('groups:create.error')) : null
|
||||||
}
|
}
|
||||||
onSubmit={(values) => create.mutate(values)}
|
onSubmit={(values) => create.mutate(values)}
|
||||||
onBack={onBack}
|
onBack={onBack}
|
||||||
|
|||||||
@@ -10,14 +10,15 @@ import { FirstGroupStep } from './FirstGroupStep'
|
|||||||
import { useOnboarding } from './OnboardingProvider'
|
import { useOnboarding } from './OnboardingProvider'
|
||||||
import { PaymentStep } from './PaymentStep'
|
import { PaymentStep } from './PaymentStep'
|
||||||
import { PlanStep } from './PlanStep'
|
import { PlanStep } from './PlanStep'
|
||||||
import { STEP_LABELS } from './steps'
|
|
||||||
import { Stepper } from './Stepper'
|
import { Stepper } from './Stepper'
|
||||||
import { WelcomeStep } from './WelcomeStep'
|
import { WelcomeStep } from './WelcomeStep'
|
||||||
import { WhatsappStep } from './WhatsappStep'
|
import { WhatsappStep } from './WhatsappStep'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
export function OnboardingView() {
|
export function OnboardingView() {
|
||||||
const { user, isPending: authPending } = useAuth()
|
const { user, isPending: authPending } = useAuth()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'groups'])
|
||||||
const {
|
const {
|
||||||
step,
|
step,
|
||||||
steps,
|
steps,
|
||||||
@@ -52,16 +53,16 @@ export function OnboardingView() {
|
|||||||
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-accent-soft">
|
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-accent-soft">
|
||||||
<LogoIcon className="size-8" />
|
<LogoIcon className="size-8" />
|
||||||
</span>
|
</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">
|
<p className="text-sm text-foreground/60">
|
||||||
Iniciá sesión para configurar tus cobros y crear tu primer grupo.
|
{t('signedOut.description')}
|
||||||
</p>
|
</p>
|
||||||
<Button
|
<Button
|
||||||
variant="primary"
|
variant="primary"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={() => void navigate({ to: '/login' })}
|
onClick={() => void navigate({ to: '/login' })}
|
||||||
>
|
>
|
||||||
Iniciar sesión
|
{t('signedOut.action')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</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 (
|
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">
|
<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
|
{/* Con Free no se muestran Cobros ni WhatsApp: el stepper refleja solo
|
||||||
los pasos que se van a recorrer. */}
|
los pasos que se van a recorrer. */}
|
||||||
<Stepper
|
<Stepper
|
||||||
steps={steps.map((id) => ({ label: STEP_LABELS[id] }))}
|
steps={steps.map((id) => ({ label: t(`steps.${id}`) }))}
|
||||||
current={steps.indexOf(step)}
|
current={steps.indexOf(step)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import { Badge, Button } from '../../components/ui'
|
|||||||
import type { MpCallbackFeedback } from '../mp'
|
import type { MpCallbackFeedback } from '../mp'
|
||||||
import {
|
import {
|
||||||
formatMpConnectionDate,
|
formatMpConnectionDate,
|
||||||
MP_PROVIDER_NAME,
|
|
||||||
mpCallbackErrorMessage,
|
mpCallbackErrorMessage,
|
||||||
mpStatusBadgeVariant,
|
mpStatusBadgeVariant,
|
||||||
mpStatusLabel,
|
mpStatusLabel,
|
||||||
useMpStatus,
|
useMpStatus,
|
||||||
useStartMpAuthorization,
|
useStartMpAuthorization,
|
||||||
} from '../mp'
|
} from '../mp'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
type PaymentStepProps = {
|
type PaymentStepProps = {
|
||||||
/** Resultado de la vinculación, leído de `?mp=` al volver de Mercado Pago. */
|
/** Resultado de la vinculación, leído de `?mp=` al volver de Mercado Pago. */
|
||||||
@@ -27,6 +27,7 @@ type PaymentStepProps = {
|
|||||||
*/
|
*/
|
||||||
export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
||||||
const statusQuery = useMpStatus()
|
const statusQuery = useMpStatus()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'groups'])
|
||||||
const startAuthorization = useStartMpAuthorization()
|
const startAuthorization = useStartMpAuthorization()
|
||||||
|
|
||||||
const status = statusQuery.data?.status ?? 'none'
|
const status = statusQuery.data?.status ?? 'none'
|
||||||
@@ -36,16 +37,16 @@ export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
|||||||
return (
|
return (
|
||||||
<section className="space-y-5">
|
<section className="space-y-5">
|
||||||
<header className="space-y-1">
|
<header className="space-y-1">
|
||||||
<h2 className="text-2xl font-bold text-primary">Conectá tus cobros</h2>
|
<h2 className="text-2xl font-bold text-primary">{t('payment.title')}</h2>
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Vinculá tu cuenta de {MP_PROVIDER_NAME} y cobrale a tus miembros desde el grupo.
|
{t('payment.description')}
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{feedback?.kind === 'success' ? (
|
{feedback?.kind === 'success' ? (
|
||||||
<p className="flex items-start gap-2 rounded-xl bg-success-soft px-4 py-3 text-sm text-success">
|
<p className="flex items-start gap-2 rounded-xl bg-success-soft px-4 py-3 text-sm text-success">
|
||||||
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
||||||
Tu cuenta de {MP_PROVIDER_NAME} quedó vinculada.
|
{t('payment.linked')}
|
||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
|||||||
|
|
||||||
<div className="divide-y divide-border rounded-xl border border-border bg-surface">
|
<div className="divide-y divide-border rounded-xl border border-border bg-surface">
|
||||||
<div className="flex items-center justify-between gap-3 px-4 py-3">
|
<div className="flex items-center justify-between gap-3 px-4 py-3">
|
||||||
<p className="text-sm font-medium text-primary">{MP_PROVIDER_NAME}</p>
|
<p className="text-sm font-medium text-primary">Mercado Pago</p>
|
||||||
<Badge variant={mpStatusBadgeVariant(status)}>{mpStatusLabel(status)}</Badge>
|
<Badge variant={mpStatusBadgeVariant(status)}>{mpStatusLabel(status)}</Badge>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -65,17 +66,16 @@ export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
|||||||
{statusQuery.isPending ? (
|
{statusQuery.isPending ? (
|
||||||
<p className="flex items-center gap-2 text-sm text-foreground/50">
|
<p className="flex items-center gap-2 text-sm text-foreground/50">
|
||||||
<Loader2 className="size-4 animate-spin" />
|
<Loader2 className="size-4 animate-spin" />
|
||||||
Consultando tu cuenta…
|
{t('payment.loading')}
|
||||||
</p>
|
</p>
|
||||||
) : isConnected ? (
|
) : isConnected ? (
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
{connectedAt ? `Vinculada el ${connectedAt}. ` : ''}
|
{connectedAt ? `${t('payment.linkedOn', { date: connectedAt })} ` : ''}
|
||||||
Los pagos de tus grupos van a entrar a esta cuenta.
|
{t('payment.connectedHint')}
|
||||||
</p>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Te llevamos a {MP_PROVIDER_NAME} para autorizar los cobros. Los pagos entran
|
{t('payment.connectHint')}
|
||||||
directo en tu cuenta, sin intermediarios.
|
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -93,10 +93,10 @@ export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
|||||||
<BadgeCheck className="size-4" />
|
<BadgeCheck className="size-4" />
|
||||||
)}
|
)}
|
||||||
{startAuthorization.isStarting
|
{startAuthorization.isStarting
|
||||||
? 'Abriendo Mercado Pago…'
|
? t('payment.opening')
|
||||||
: isConnected
|
: isConnected
|
||||||
? 'Cambiar de cuenta'
|
? t('payment.change')
|
||||||
: 'Vincular cuenta'}
|
: t('payment.connect')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -110,10 +110,10 @@ export function PaymentStep({ feedback, onNext, onBack }: PaymentStepProps) {
|
|||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Button variant="outline" onClick={onBack} className="hidden lg:inline-flex">
|
<Button variant="outline" onClick={onBack} className="hidden lg:inline-flex">
|
||||||
<ArrowLeft className="size-4" />
|
<ArrowLeft className="size-4" />
|
||||||
Volver
|
{t('common:actions.back')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" className="flex-1 lg:flex-none" onClick={onNext}>
|
<Button variant="outline" className="flex-1 lg:flex-none" onClick={onNext}>
|
||||||
{isConnected ? 'Continuar' : 'Lo hago después'}
|
{isConnected ? t('continue') : t('later')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ import {
|
|||||||
useSubscriptionReturnPolling,
|
useSubscriptionReturnPolling,
|
||||||
} from '../billing'
|
} from '../billing'
|
||||||
import { useOnboarding } from './OnboardingProvider'
|
import { useOnboarding } from './OnboardingProvider'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { errorMessage } from '../../i18n'
|
||||||
|
|
||||||
const SELECT_PLAN_ERROR_MESSAGE = 'No pudimos guardar tu plan. Revisá tu conexión e intentá de nuevo.'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Paso "Plan" del onboarding (obligatorio). Free sigue directo al primer grupo
|
* Paso "Plan" del onboarding (obligatorio). Free sigue directo al primer grupo
|
||||||
@@ -26,6 +27,7 @@ const SELECT_PLAN_ERROR_MESSAGE = 'No pudimos guardar tu plan. Revisá tu conexi
|
|||||||
*/
|
*/
|
||||||
export function PlanStep() {
|
export function PlanStep() {
|
||||||
const { user } = useAuth()
|
const { user } = useAuth()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'billing'])
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const { country, selectedPlan, setSelectedPlan, returnedFromSubscription, goTo, goBack, statusQuery } =
|
const { country, selectedPlan, setSelectedPlan, returnedFromSubscription, goTo, goBack, statusQuery } =
|
||||||
useOnboarding()
|
useOnboarding()
|
||||||
@@ -65,7 +67,7 @@ export function PlanStep() {
|
|||||||
setProUnavailable(true)
|
setProUnavailable(true)
|
||||||
setIsEnteringEmail(false)
|
setIsEnteringEmail(false)
|
||||||
}
|
}
|
||||||
setError(caught instanceof ApiError && caught.problem?.detail ? caught.problem.detail : SELECT_PLAN_ERROR_MESSAGE)
|
setError(errorMessage(caught, t('plan.error')))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -80,17 +82,19 @@ export function PlanStep() {
|
|||||||
mutation.mutate({ plan: 'PRO', country, payerEmail })
|
mutation.mutate({ plan: 'PRO', country, payerEmail })
|
||||||
}
|
}
|
||||||
|
|
||||||
const proPrice = `${formatPrice(PRO_PRICE_BY_COUNTRY[country], COUNTRY_CURRENCY[country])} / mes`
|
const proPrice = t('billing:view.perMonth', {
|
||||||
|
price: formatPrice(PRO_PRICE_BY_COUNTRY[country], COUNTRY_CURRENCY[country]),
|
||||||
|
})
|
||||||
|
|
||||||
if (subscriptionStatus === 'AUTHORIZED') {
|
if (subscriptionStatus === 'AUTHORIZED') {
|
||||||
return (
|
return (
|
||||||
<StepShell>
|
<StepShell>
|
||||||
<p className="flex items-start gap-2 rounded-xl bg-success-soft px-4 py-3 text-sm text-success">
|
<p className="flex items-start gap-2 rounded-xl bg-success-soft px-4 py-3 text-sm text-success">
|
||||||
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
||||||
¡Listo! Tu suscripción a Pro quedó activa.
|
{t('plan.active')}
|
||||||
</p>
|
</p>
|
||||||
<Button variant="primary" className="w-full" onClick={() => goTo('payment')}>
|
<Button variant="primary" className="w-full" onClick={() => goTo('payment')}>
|
||||||
Continuar
|
{t('continue')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</StepShell>
|
</StepShell>
|
||||||
@@ -109,12 +113,12 @@ export function PlanStep() {
|
|||||||
)}
|
)}
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="text-sm font-medium text-primary">
|
<p className="text-sm font-medium text-primary">
|
||||||
{returnedFromSubscription ? 'Procesando tu pago…' : 'Tu suscripción a Pro quedó pendiente'}
|
{returnedFromSubscription ? t('plan.processing') : t('plan.pendingTitle')}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-xs text-foreground/50">
|
<p className="text-xs text-foreground/50">
|
||||||
{returnedFromSubscription
|
{returnedFromSubscription
|
||||||
? `${providerName} puede tardar unos minutos en confirmarlo. Podés seguir mientras tanto: te avisamos cuando quede activa.`
|
? t('plan.processingHint', { provider: providerName })
|
||||||
: `No terminaste de autorizar el pago en ${providerName}. Podés reintentarlo o seguir con Free.`}
|
: t('plan.pendingHint', { provider: providerName })}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,17 +128,17 @@ export function PlanStep() {
|
|||||||
<div className="flex flex-col gap-3 sm:flex-row">
|
<div className="flex flex-col gap-3 sm:flex-row">
|
||||||
{returnedFromSubscription ? (
|
{returnedFromSubscription ? (
|
||||||
<Button variant="primary" className="flex-1" onClick={() => goTo('payment')}>
|
<Button variant="primary" className="flex-1" onClick={() => goTo('payment')}>
|
||||||
Continuar
|
{t('continue')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button variant="primary" className="flex-1" onClick={() => setIsEnteringEmail(true)}>
|
<Button variant="primary" className="flex-1" onClick={() => setIsEnteringEmail(true)}>
|
||||||
<Sparkles className="size-4" />
|
<Sparkles className="size-4" />
|
||||||
Reintentar el pago
|
{t('plan.retry')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" className="flex-1" disabled={mutation.isPending} onClick={chooseFree}>
|
<Button variant="outline" className="flex-1" disabled={mutation.isPending} onClick={chooseFree}>
|
||||||
Seguir con Free
|
{t('plan.stayFree')}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -151,13 +155,13 @@ export function PlanStep() {
|
|||||||
{mutation.isPending && mutation.variables?.plan === 'FREE' ? (
|
{mutation.isPending && mutation.variables?.plan === 'FREE' ? (
|
||||||
<Loader2 className="size-4 animate-spin" />
|
<Loader2 className="size-4 animate-spin" />
|
||||||
) : null}
|
) : null}
|
||||||
Empezar gratis
|
{t('plan.startFree')}
|
||||||
</Button>
|
</Button>
|
||||||
</PlanOptionCard>
|
</PlanOptionCard>
|
||||||
|
|
||||||
<PlanOptionCard plan="PRO" limits={PLAN_LIMITS.PRO} price={proPrice} highlighted>
|
<PlanOptionCard plan="PRO" limits={PLAN_LIMITS.PRO} price={proPrice} highlighted>
|
||||||
{proUnavailable ? (
|
{proUnavailable ? (
|
||||||
<p className="text-xs text-foreground/50">Todavía no está disponible en tu país.</p>
|
<p className="text-xs text-foreground/50">{t('billing:view.unavailable')}</p>
|
||||||
) : isEnteringEmail ? (
|
) : isEnteringEmail ? (
|
||||||
<SubscribeForm
|
<SubscribeForm
|
||||||
provider={provider}
|
provider={provider}
|
||||||
@@ -170,7 +174,7 @@ export function PlanStep() {
|
|||||||
) : (
|
) : (
|
||||||
<Button variant="primary" className="w-full" onClick={() => setIsEnteringEmail(true)}>
|
<Button variant="primary" className="w-full" onClick={() => setIsEnteringEmail(true)}>
|
||||||
<Sparkles className="size-4" />
|
<Sparkles className="size-4" />
|
||||||
Elegir Pro
|
{t('plan.choosePro')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</PlanOptionCard>
|
</PlanOptionCard>
|
||||||
@@ -181,7 +185,7 @@ export function PlanStep() {
|
|||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Button variant="outline" onClick={goBack} className="hidden lg:inline-flex">
|
<Button variant="outline" onClick={goBack} className="hidden lg:inline-flex">
|
||||||
<ArrowLeft className="size-4" />
|
<ArrowLeft className="size-4" />
|
||||||
Volver
|
{t('common:actions.back')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</StepShell>
|
</StepShell>
|
||||||
@@ -190,12 +194,13 @@ export function PlanStep() {
|
|||||||
|
|
||||||
/** Encabezado común a los tres estados del paso. */
|
/** Encabezado común a los tres estados del paso. */
|
||||||
function StepShell({ children }: { children: ReactNode }) {
|
function StepShell({ children }: { children: ReactNode }) {
|
||||||
|
const { t } = useTranslation('onboarding')
|
||||||
return (
|
return (
|
||||||
<section className="space-y-5">
|
<section className="space-y-5">
|
||||||
<header className="space-y-1">
|
<header className="space-y-1">
|
||||||
<h2 className="text-2xl font-bold text-primary">Elegí tu plan</h2>
|
<h2 className="text-2xl font-bold text-primary">{t('plan.title')}</h2>
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Empezá gratis o pasate a Pro para cobrar con Mercado Pago y automatizar WhatsApp.
|
{t('plan.description')}
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Check } from 'lucide-react'
|
import { Check } from 'lucide-react'
|
||||||
import { cn } from '../../lib/utils'
|
import { cn } from '../../lib/utils'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
export type StepperProps = {
|
export type StepperProps = {
|
||||||
steps: readonly { label: string }[]
|
steps: readonly { label: string }[]
|
||||||
@@ -7,8 +8,9 @@ export type StepperProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function Stepper({ steps, current }: StepperProps) {
|
export function Stepper({ steps, current }: StepperProps) {
|
||||||
|
const { t } = useTranslation('onboarding')
|
||||||
return (
|
return (
|
||||||
<ol aria-label="Progreso del alta" className="flex items-center">
|
<ol aria-label={t('steps.progress')} className="flex items-center">
|
||||||
{steps.map((step, index) => {
|
{steps.map((step, index) => {
|
||||||
const isDone = index < current
|
const isDone = index < current
|
||||||
const isActive = index === current
|
const isActive = index === current
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { ArrowRight, Rocket, Users, Wallet } from 'lucide-react'
|
import { ArrowRight, Rocket, Users, Wallet } from 'lucide-react'
|
||||||
import { Button } from '../../components/ui'
|
import { Button } from '../../components/ui'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
type WelcomeStepProps = {
|
type WelcomeStepProps = {
|
||||||
name: string
|
name: string
|
||||||
@@ -9,31 +10,32 @@ type WelcomeStepProps = {
|
|||||||
const STEPS_TO_SETUP = [
|
const STEPS_TO_SETUP = [
|
||||||
{
|
{
|
||||||
icon: Wallet,
|
icon: Wallet,
|
||||||
title: 'Conectá tu cuenta de cobro',
|
title: 'welcome.step1Title',
|
||||||
description: 'Vinculá Mercado Pago y cobrale a tus miembros desde el grupo.',
|
description: 'welcome.step1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: Users,
|
icon: Users,
|
||||||
title: 'Creá tu primer grupo',
|
title: 'welcome.step2Title',
|
||||||
description: 'Días, horario, precio y cupo de tu clase.',
|
description: 'welcome.step2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: Rocket,
|
icon: Rocket,
|
||||||
title: 'Empezá a cobrar',
|
title: 'welcome.step3Title',
|
||||||
description: 'Todo listo para sumar miembros y cobrar al instante.',
|
description: 'welcome.step3',
|
||||||
},
|
},
|
||||||
]
|
] as const
|
||||||
|
|
||||||
export function WelcomeStep({ name, onNext }: WelcomeStepProps) {
|
export function WelcomeStep({ name, onNext }: WelcomeStepProps) {
|
||||||
|
const { t } = useTranslation('onboarding')
|
||||||
return (
|
return (
|
||||||
<section className="space-y-6">
|
<section className="space-y-6">
|
||||||
<header className="space-y-2 text-center">
|
<header className="space-y-2 text-center">
|
||||||
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-accent-soft">
|
<span className="mx-auto flex size-14 items-center justify-center rounded-2xl bg-accent-soft">
|
||||||
<Rocket className="size-7 text-accent" />
|
<Rocket className="size-7 text-accent" />
|
||||||
</span>
|
</span>
|
||||||
<h1 className="text-2xl font-bold text-primary">¡Hola, {name}!</h1>
|
<h1 className="text-2xl font-bold text-primary">{t('welcome.title', { name })}</h1>
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Vamos a configurar tu cuenta en 3 pasos. Vas a tardar menos de 5 minutos.
|
{t('welcome.description')}
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -47,15 +49,15 @@ export function WelcomeStep({ name, onNext }: WelcomeStepProps) {
|
|||||||
<Icon className="size-5 text-accent" />
|
<Icon className="size-5 text-accent" />
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm font-semibold text-primary">{title}</p>
|
<p className="text-sm font-semibold text-primary">{t(title)}</p>
|
||||||
<p className="text-xs text-foreground/60">{description}</p>
|
<p className="text-xs text-foreground/60">{t(description)}</p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<Button variant="primary" size="md" className="w-full" onClick={onNext}>
|
<Button variant="primary" size="md" className="w-full" onClick={onNext}>
|
||||||
Comenzar
|
{t('welcome.start')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
whatsappStatusErrorMessage,
|
whatsappStatusErrorMessage,
|
||||||
whatsappStatusLabel,
|
whatsappStatusLabel,
|
||||||
} from '../whatsapp'
|
} from '../whatsapp'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
type WhatsappStepProps = {
|
type WhatsappStepProps = {
|
||||||
/** Resultado de una vinculación por redirect, leído de `?wa=` al volver. */
|
/** Resultado de una vinculación por redirect, leído de `?wa=` al volver. */
|
||||||
@@ -29,6 +30,7 @@ type WhatsappStepProps = {
|
|||||||
*/
|
*/
|
||||||
export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
||||||
const statusQuery = useWhatsappStatus()
|
const statusQuery = useWhatsappStatus()
|
||||||
|
const { t } = useTranslation(['onboarding', 'common', 'whatsapp'])
|
||||||
const connection = useStartWhatsappConnection()
|
const connection = useStartWhatsappConnection()
|
||||||
|
|
||||||
const status = statusQuery.data?.status ?? 'none'
|
const status = statusQuery.data?.status ?? 'none'
|
||||||
@@ -38,18 +40,18 @@ export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
|||||||
return (
|
return (
|
||||||
<section className="space-y-5">
|
<section className="space-y-5">
|
||||||
<header className="space-y-1">
|
<header className="space-y-1">
|
||||||
<h2 className="text-2xl font-bold text-primary">Conectá tu WhatsApp</h2>
|
<h2 className="text-2xl font-bold text-primary">{t('whatsapp.title')}</h2>
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
Gruperly le recuerda los pagos a tus miembros y escribe a los que dejaron de venir, una
|
{t('whatsapp.description')}
|
||||||
vez por semana y desde tu número.
|
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{feedback?.kind === 'success' || (isConnected && !feedback) ? (
|
{feedback?.kind === 'success' || (isConnected && !feedback) ? (
|
||||||
<p className="flex items-start gap-2 rounded-xl bg-success-soft px-4 py-3 text-sm text-success">
|
<p className="flex items-start gap-2 rounded-xl bg-success-soft px-4 py-3 text-sm text-success">
|
||||||
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
<CheckCircle2 className="mt-0.5 size-4 shrink-0" />
|
||||||
Tu WhatsApp quedó vinculado
|
{statusQuery.data?.displayPhoneNumber
|
||||||
{statusQuery.data?.displayPhoneNumber ? ` (${statusQuery.data.displayPhoneNumber})` : ''}.
|
? t('whatsapp.linkedWith', { phone: statusQuery.data.displayPhoneNumber })
|
||||||
|
: t('whatsapp.linked')}
|
||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
@@ -69,7 +71,7 @@ export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
|||||||
{statusQuery.isPending ? (
|
{statusQuery.isPending ? (
|
||||||
<p className="flex items-center gap-2 text-sm text-foreground/50">
|
<p className="flex items-center gap-2 text-sm text-foreground/50">
|
||||||
<Loader2 className="size-4 animate-spin" />
|
<Loader2 className="size-4 animate-spin" />
|
||||||
Consultando tu WhatsApp…
|
{t('whatsapp:card.loading')}
|
||||||
</p>
|
</p>
|
||||||
) : statusQuery.isError ? (
|
) : statusQuery.isError ? (
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
@@ -80,9 +82,9 @@ export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
|||||||
) : (
|
) : (
|
||||||
<p className="text-sm text-foreground/60">
|
<p className="text-sm text-foreground/60">
|
||||||
{usesQr
|
{usesQr
|
||||||
? 'Lo vinculás con tu número de teléfono o escaneando un código QR, como WhatsApp Web.'
|
? t('whatsapp.qrHint')
|
||||||
: 'Te llevamos a Meta para conectar tu cuenta de WhatsApp Business.'}{' '}
|
: t('whatsapp.metaHint')}{' '}
|
||||||
Los envíos automáticos los prendés después en cada grupo.
|
{t('whatsapp.perGroup')}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +102,7 @@ export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
|||||||
) : (
|
) : (
|
||||||
<BadgeCheck className="size-4" />
|
<BadgeCheck className="size-4" />
|
||||||
)}
|
)}
|
||||||
{connection.isStarting ? 'Abriendo…' : 'Vincular WhatsApp'}
|
{connection.isStarting ? t('whatsapp.opening') : t('whatsapp.connect')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
@@ -119,10 +121,10 @@ export function WhatsappStep({ feedback, onNext, onBack }: WhatsappStepProps) {
|
|||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Button variant="outline" onClick={onBack} className="hidden lg:inline-flex">
|
<Button variant="outline" onClick={onBack} className="hidden lg:inline-flex">
|
||||||
<ArrowLeft className="size-4" />
|
<ArrowLeft className="size-4" />
|
||||||
Volver
|
{t('common:actions.back')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" className="flex-1 lg:flex-none" onClick={onNext}>
|
<Button variant="outline" className="flex-1 lg:flex-none" onClick={onNext}>
|
||||||
{isConnected ? 'Continuar' : 'Lo hago después'}
|
{isConnected ? t('continue') : t('later')}
|
||||||
<ArrowRight className="size-4" />
|
<ArrowRight className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,15 +12,7 @@ export type OnboardingStepId =
|
|||||||
| 'group'
|
| 'group'
|
||||||
| 'done'
|
| 'done'
|
||||||
|
|
||||||
export const STEP_LABELS: Record<OnboardingStepId, string> = {
|
/** Labels: `onboarding:steps.<id>`. */
|
||||||
welcome: 'Bienvenida',
|
|
||||||
country: 'País',
|
|
||||||
plan: 'Plan',
|
|
||||||
payment: 'Cobros',
|
|
||||||
whatsapp: 'WhatsApp',
|
|
||||||
group: 'Tu grupo',
|
|
||||||
done: 'Listo',
|
|
||||||
}
|
|
||||||
|
|
||||||
const ALL_STEPS: readonly OnboardingStepId[] = [
|
const ALL_STEPS: readonly OnboardingStepId[] = [
|
||||||
'welcome',
|
'welcome',
|
||||||
|
|||||||
14
apps/web/src/i18n/countries.ts
Normal file
14
apps/web/src/i18n/countries.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { i18n } from './instance'
|
||||||
|
|
||||||
|
const displayNames = new Map<string, Intl.DisplayNames>()
|
||||||
|
|
||||||
|
/** Nombre del país en el idioma de la UI ("Brasil", "Brazil"). Sale de `Intl`:
|
||||||
|
* no hace falta traducir la lista a mano. */
|
||||||
|
export function countryName(code: string, locale: string = i18n.language): string {
|
||||||
|
let names = displayNames.get(locale)
|
||||||
|
if (!names) {
|
||||||
|
names = new Intl.DisplayNames(locale, { type: 'region' })
|
||||||
|
displayNames.set(locale, names)
|
||||||
|
}
|
||||||
|
return names.of(code) ?? code
|
||||||
|
}
|
||||||
2
apps/web/src/i18n/i18next.d.ts
vendored
2
apps/web/src/i18n/i18next.d.ts
vendored
@@ -17,6 +17,7 @@ import type payments from './locales/es-AR/payments.json'
|
|||||||
import type billing from './locales/es-AR/billing.json'
|
import type billing from './locales/es-AR/billing.json'
|
||||||
import type mp from './locales/es-AR/mp.json'
|
import type mp from './locales/es-AR/mp.json'
|
||||||
import type whatsapp from './locales/es-AR/whatsapp.json'
|
import type whatsapp from './locales/es-AR/whatsapp.json'
|
||||||
|
import type onboarding from './locales/es-AR/onboarding.json'
|
||||||
import type validation from './locales/es-AR/validation.json'
|
import type validation from './locales/es-AR/validation.json'
|
||||||
|
|
||||||
// es-AR es la fuente: una clave que no exista ahí rompe el typecheck.
|
// es-AR es la fuente: una clave que no exista ahí rompe el typecheck.
|
||||||
@@ -31,6 +32,7 @@ declare module 'i18next' {
|
|||||||
pwa: typeof pwa
|
pwa: typeof pwa
|
||||||
settings: typeof settings
|
settings: typeof settings
|
||||||
validation: typeof validation
|
validation: typeof validation
|
||||||
|
'onboarding': typeof onboarding
|
||||||
'whatsapp': typeof whatsapp
|
'whatsapp': typeof whatsapp
|
||||||
'mp': typeof mp
|
'mp': typeof mp
|
||||||
'billing': typeof billing
|
'billing': typeof billing
|
||||||
|
|||||||
@@ -5,3 +5,4 @@ export { useIntlLocale } from './useIntlLocale'
|
|||||||
export { errorMessage } from './errors'
|
export { errorMessage } from './errors'
|
||||||
export { installZodErrorMap, validationMessage } from './validation'
|
export { installZodErrorMap, validationMessage } from './validation'
|
||||||
export type { LocalePreference } from './preference'
|
export type { LocalePreference } from './preference'
|
||||||
|
export { countryName } from './countries'
|
||||||
|
|||||||
93
apps/web/src/i18n/locales/en/onboarding.json
Normal file
93
apps/web/src/i18n/locales/en/onboarding.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"steps": {
|
||||||
|
"welcome": "Welcome",
|
||||||
|
"country": "Country",
|
||||||
|
"plan": "Plan",
|
||||||
|
"payment": "Payments",
|
||||||
|
"whatsapp": "WhatsApp",
|
||||||
|
"group": "Your group",
|
||||||
|
"done": "Done",
|
||||||
|
"progress": "Setup progress"
|
||||||
|
},
|
||||||
|
"continue": "Continue",
|
||||||
|
"later": "I'll do it later",
|
||||||
|
"signedOut": {
|
||||||
|
"title": "Your account is ready",
|
||||||
|
"description": "Sign in to set up your payments and create your first group.",
|
||||||
|
"action": "Sign in"
|
||||||
|
},
|
||||||
|
"fallbackName": "there",
|
||||||
|
"welcome": {
|
||||||
|
"title": "Hi, {{name}}!",
|
||||||
|
"description": "Let's set up your account in 3 steps. It takes less than 5 minutes.",
|
||||||
|
"step1Title": "Connect your payment account",
|
||||||
|
"step1": "Link Mercado Pago and charge your members from the group.",
|
||||||
|
"step2Title": "Create your first group",
|
||||||
|
"step2": "Days, time, price and capacity of your class.",
|
||||||
|
"step3Title": "Start collecting",
|
||||||
|
"step3": "All set to add members and get paid right away.",
|
||||||
|
"start": "Get started"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"title": "Which country will you charge in?",
|
||||||
|
"description": "Your links are created in that country's currency.",
|
||||||
|
"label": "Country"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"title": "Choose your plan",
|
||||||
|
"description": "Start for free or upgrade to Pro to collect with Mercado Pago and automate WhatsApp.",
|
||||||
|
"error": "We couldn't save your plan. Check your connection and try again.",
|
||||||
|
"active": "All set! Your Pro subscription is active.",
|
||||||
|
"processing": "Processing your payment…",
|
||||||
|
"pendingTitle": "Your Pro subscription is pending",
|
||||||
|
"processingHint": "{{provider}} may take a few minutes to confirm it. You can keep going: we'll let you know when it's active.",
|
||||||
|
"pendingHint": "You didn't finish authorizing the payment in {{provider}}. You can retry or continue on Free.",
|
||||||
|
"retry": "Retry payment",
|
||||||
|
"stayFree": "Continue on Free",
|
||||||
|
"startFree": "Start for free",
|
||||||
|
"choosePro": "Choose Pro"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"title": "Connect your payments",
|
||||||
|
"description": "Link your Mercado Pago account and charge your members from the group.",
|
||||||
|
"linked": "Your Mercado Pago account is linked.",
|
||||||
|
"loading": "Checking your account…",
|
||||||
|
"linkedOn": "Linked on {{date}}.",
|
||||||
|
"connectedHint": "Your groups' payments will go into this account.",
|
||||||
|
"connectHint": "We'll take you to Mercado Pago to authorize payments. Money goes straight into your account, no middlemen.",
|
||||||
|
"opening": "Opening Mercado Pago…",
|
||||||
|
"change": "Change account",
|
||||||
|
"connect": "Link account"
|
||||||
|
},
|
||||||
|
"whatsapp": {
|
||||||
|
"title": "Connect your WhatsApp",
|
||||||
|
"description": "Gruperly reminds your members about payments and reaches out to those who stopped coming, once a week and from your number.",
|
||||||
|
"linked": "Your WhatsApp is linked.",
|
||||||
|
"linkedWith": "Your WhatsApp is linked ({{phone}}).",
|
||||||
|
"qrHint": "Link it with your phone number or by scanning a QR code, like WhatsApp Web.",
|
||||||
|
"metaHint": "We'll take you to Meta to connect your WhatsApp Business account.",
|
||||||
|
"perGroup": "You turn on automatic messages later in each group.",
|
||||||
|
"opening": "Opening…",
|
||||||
|
"connect": "Link WhatsApp"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"heading": "Your first group"
|
||||||
|
},
|
||||||
|
"done": {
|
||||||
|
"title": "All set!",
|
||||||
|
"description": "Your group was created. You can now invite members and take attendance.",
|
||||||
|
"active": "Active",
|
||||||
|
"price": "Price",
|
||||||
|
"capacity": "Capacity",
|
||||||
|
"capacityValue": "{{count}} members",
|
||||||
|
"dueDay": "Due date",
|
||||||
|
"dueDayValue": "Day {{day}} of each month",
|
||||||
|
"plan": "You're on the <strong>{{plan}}</strong> plan.",
|
||||||
|
"freeHint": " When you want to collect with Mercado Pago or automate WhatsApp, upgrade to Pro from Settings.",
|
||||||
|
"mpConnected": "You'll collect with <strong>Mercado Pago</strong>. Payments go straight into your account.",
|
||||||
|
"mpPending": "When you're ready to collect, link <strong>Mercado Pago</strong> from Settings. Your group is already created.",
|
||||||
|
"waConnected": "Your WhatsApp is linked. Turn on payment reminders and re-engagement from the group's page.",
|
||||||
|
"waPending": "To send automatic reminders, link <strong>WhatsApp</strong> from Settings.",
|
||||||
|
"goToPanel": "Go to my dashboard"
|
||||||
|
}
|
||||||
|
}
|
||||||
93
apps/web/src/i18n/locales/es-419/onboarding.json
Normal file
93
apps/web/src/i18n/locales/es-419/onboarding.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"steps": {
|
||||||
|
"welcome": "Bienvenida",
|
||||||
|
"country": "País",
|
||||||
|
"plan": "Plan",
|
||||||
|
"payment": "Cobros",
|
||||||
|
"whatsapp": "WhatsApp",
|
||||||
|
"group": "Tu grupo",
|
||||||
|
"done": "Listo",
|
||||||
|
"progress": "Progreso del alta"
|
||||||
|
},
|
||||||
|
"continue": "Continuar",
|
||||||
|
"later": "Lo haré después",
|
||||||
|
"signedOut": {
|
||||||
|
"title": "Tu cuenta, lista",
|
||||||
|
"description": "Inicia sesión para configurar tus cobros y crear tu primer grupo.",
|
||||||
|
"action": "Iniciar sesión"
|
||||||
|
},
|
||||||
|
"fallbackName": "profe",
|
||||||
|
"welcome": {
|
||||||
|
"title": "¡Hola, {{name}}!",
|
||||||
|
"description": "Configuremos tu cuenta en 3 pasos. Te tomará menos de 5 minutos.",
|
||||||
|
"step1Title": "Conecta tu cuenta de cobro",
|
||||||
|
"step1": "Vincula Mercado Pago y cóbrales a tus miembros desde el grupo.",
|
||||||
|
"step2Title": "Crea tu primer grupo",
|
||||||
|
"step2": "Días, horario, precio y cupo de tu clase.",
|
||||||
|
"step3Title": "Empieza a cobrar",
|
||||||
|
"step3": "Todo listo para sumar miembros y cobrar al instante.",
|
||||||
|
"start": "Comenzar"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"title": "¿En qué país vas a cobrar?",
|
||||||
|
"description": "Tus links se generan en la moneda de ese país.",
|
||||||
|
"label": "País"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"title": "Elige tu plan",
|
||||||
|
"description": "Empieza gratis o cámbiate a Pro para cobrar con Mercado Pago y automatizar WhatsApp.",
|
||||||
|
"error": "No pudimos guardar tu plan. Revisa tu conexión e inténtalo de nuevo.",
|
||||||
|
"active": "¡Listo! Tu suscripción a Pro quedó activa.",
|
||||||
|
"processing": "Procesando tu pago…",
|
||||||
|
"pendingTitle": "Tu suscripción a Pro quedó pendiente",
|
||||||
|
"processingHint": "{{provider}} puede tardar unos minutos en confirmarlo. Puedes seguir mientras tanto: te avisaremos cuando quede activa.",
|
||||||
|
"pendingHint": "No terminaste de autorizar el pago en {{provider}}. Puedes reintentarlo o seguir con Free.",
|
||||||
|
"retry": "Reintentar el pago",
|
||||||
|
"stayFree": "Seguir con Free",
|
||||||
|
"startFree": "Empezar gratis",
|
||||||
|
"choosePro": "Elegir Pro"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"title": "Conecta tus cobros",
|
||||||
|
"description": "Vincula tu cuenta de Mercado Pago y cóbrales a tus miembros desde el grupo.",
|
||||||
|
"linked": "Tu cuenta de Mercado Pago quedó vinculada.",
|
||||||
|
"loading": "Consultando tu cuenta…",
|
||||||
|
"linkedOn": "Vinculada el {{date}}.",
|
||||||
|
"connectedHint": "Los pagos de tus grupos entrarán a esta cuenta.",
|
||||||
|
"connectHint": "Te llevamos a Mercado Pago para autorizar los cobros. Los pagos entran directo en tu cuenta, sin intermediarios.",
|
||||||
|
"opening": "Abriendo Mercado Pago…",
|
||||||
|
"change": "Cambiar de cuenta",
|
||||||
|
"connect": "Vincular cuenta"
|
||||||
|
},
|
||||||
|
"whatsapp": {
|
||||||
|
"title": "Conecta tu WhatsApp",
|
||||||
|
"description": "Gruperly le recuerda los pagos a tus miembros y escribe a los que dejaron de venir, una vez por semana y desde tu número.",
|
||||||
|
"linked": "Tu WhatsApp quedó vinculado.",
|
||||||
|
"linkedWith": "Tu WhatsApp quedó vinculado ({{phone}}).",
|
||||||
|
"qrHint": "Lo vinculas con tu número de teléfono o escaneando un código QR, como WhatsApp Web.",
|
||||||
|
"metaHint": "Te llevamos a Meta para conectar tu cuenta de WhatsApp Business.",
|
||||||
|
"perGroup": "Los envíos automáticos los activas después en cada grupo.",
|
||||||
|
"opening": "Abriendo…",
|
||||||
|
"connect": "Vincular WhatsApp"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"heading": "Tu primer grupo"
|
||||||
|
},
|
||||||
|
"done": {
|
||||||
|
"title": "¡Todo listo!",
|
||||||
|
"description": "Tu grupo se creó. Ya puedes invitar miembros y pasar lista.",
|
||||||
|
"active": "Activo",
|
||||||
|
"price": "Precio",
|
||||||
|
"capacity": "Cupo",
|
||||||
|
"capacityValue": "{{count}} miembros",
|
||||||
|
"dueDay": "Vencimiento",
|
||||||
|
"dueDayValue": "Día {{day}} de cada mes",
|
||||||
|
"plan": "Estás en el plan <strong>{{plan}}</strong>.",
|
||||||
|
"freeHint": " Cuando quieras cobrar con Mercado Pago o automatizar WhatsApp, cámbiate a Pro desde Ajustes.",
|
||||||
|
"mpConnected": "Cobrarás con <strong>Mercado Pago</strong>. Los pagos entran directo en tu cuenta.",
|
||||||
|
"mpPending": "Cuando quieras cobrar, vincula <strong>Mercado Pago</strong> desde Ajustes. Tu grupo ya quedó creado.",
|
||||||
|
"waConnected": "Tu WhatsApp está vinculado. Activa los recordatorios de pago y el reenganche desde la ficha del grupo.",
|
||||||
|
"waPending": "Para enviar recordatorios automáticos, vincula <strong>WhatsApp</strong> desde Ajustes.",
|
||||||
|
"goToPanel": "Ir a mi Panel"
|
||||||
|
}
|
||||||
|
}
|
||||||
93
apps/web/src/i18n/locales/es-AR/onboarding.json
Normal file
93
apps/web/src/i18n/locales/es-AR/onboarding.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"steps": {
|
||||||
|
"welcome": "Bienvenida",
|
||||||
|
"country": "País",
|
||||||
|
"plan": "Plan",
|
||||||
|
"payment": "Cobros",
|
||||||
|
"whatsapp": "WhatsApp",
|
||||||
|
"group": "Tu grupo",
|
||||||
|
"done": "Listo",
|
||||||
|
"progress": "Progreso del alta"
|
||||||
|
},
|
||||||
|
"continue": "Continuar",
|
||||||
|
"later": "Lo hago después",
|
||||||
|
"signedOut": {
|
||||||
|
"title": "Tu cuenta, lista",
|
||||||
|
"description": "Iniciá sesión para configurar tus cobros y crear tu primer grupo.",
|
||||||
|
"action": "Iniciar sesión"
|
||||||
|
},
|
||||||
|
"fallbackName": "profe",
|
||||||
|
"welcome": {
|
||||||
|
"title": "¡Hola, {{name}}!",
|
||||||
|
"description": "Vamos a configurar tu cuenta en 3 pasos. Vas a tardar menos de 5 minutos.",
|
||||||
|
"step1Title": "Conectá tu cuenta de cobro",
|
||||||
|
"step1": "Vinculá Mercado Pago y cobrale a tus miembros desde el grupo.",
|
||||||
|
"step2Title": "Creá tu primer grupo",
|
||||||
|
"step2": "Días, horario, precio y cupo de tu clase.",
|
||||||
|
"step3Title": "Empezá a cobrar",
|
||||||
|
"step3": "Todo listo para sumar miembros y cobrar al instante.",
|
||||||
|
"start": "Comenzar"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"title": "¿En qué país vas a cobrar?",
|
||||||
|
"description": "Tus links se generan en la moneda de ese país.",
|
||||||
|
"label": "País"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"title": "Elegí tu plan",
|
||||||
|
"description": "Empezá gratis o pasate a Pro para cobrar con Mercado Pago y automatizar WhatsApp.",
|
||||||
|
"error": "No pudimos guardar tu plan. Revisá tu conexión e intentá de nuevo.",
|
||||||
|
"active": "¡Listo! Tu suscripción a Pro quedó activa.",
|
||||||
|
"processing": "Procesando tu pago…",
|
||||||
|
"pendingTitle": "Tu suscripción a Pro quedó pendiente",
|
||||||
|
"processingHint": "{{provider}} puede tardar unos minutos en confirmarlo. Podés seguir mientras tanto: te avisamos cuando quede activa.",
|
||||||
|
"pendingHint": "No terminaste de autorizar el pago en {{provider}}. Podés reintentarlo o seguir con Free.",
|
||||||
|
"retry": "Reintentar el pago",
|
||||||
|
"stayFree": "Seguir con Free",
|
||||||
|
"startFree": "Empezar gratis",
|
||||||
|
"choosePro": "Elegir Pro"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"title": "Conectá tus cobros",
|
||||||
|
"description": "Vinculá tu cuenta de Mercado Pago y cobrale a tus miembros desde el grupo.",
|
||||||
|
"linked": "Tu cuenta de Mercado Pago quedó vinculada.",
|
||||||
|
"loading": "Consultando tu cuenta…",
|
||||||
|
"linkedOn": "Vinculada el {{date}}.",
|
||||||
|
"connectedHint": "Los pagos de tus grupos van a entrar a esta cuenta.",
|
||||||
|
"connectHint": "Te llevamos a Mercado Pago para autorizar los cobros. Los pagos entran directo en tu cuenta, sin intermediarios.",
|
||||||
|
"opening": "Abriendo Mercado Pago…",
|
||||||
|
"change": "Cambiar de cuenta",
|
||||||
|
"connect": "Vincular cuenta"
|
||||||
|
},
|
||||||
|
"whatsapp": {
|
||||||
|
"title": "Conectá tu WhatsApp",
|
||||||
|
"description": "Gruperly le recuerda los pagos a tus miembros y escribe a los que dejaron de venir, una vez por semana y desde tu número.",
|
||||||
|
"linked": "Tu WhatsApp quedó vinculado.",
|
||||||
|
"linkedWith": "Tu WhatsApp quedó vinculado ({{phone}}).",
|
||||||
|
"qrHint": "Lo vinculás con tu número de teléfono o escaneando un código QR, como WhatsApp Web.",
|
||||||
|
"metaHint": "Te llevamos a Meta para conectar tu cuenta de WhatsApp Business.",
|
||||||
|
"perGroup": "Los envíos automáticos los prendés después en cada grupo.",
|
||||||
|
"opening": "Abriendo…",
|
||||||
|
"connect": "Vincular WhatsApp"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"heading": "Tu primer grupo"
|
||||||
|
},
|
||||||
|
"done": {
|
||||||
|
"title": "¡Todo listo!",
|
||||||
|
"description": "Tu grupo se creó. Ya podés invitar miembros y pasar lista.",
|
||||||
|
"active": "Activo",
|
||||||
|
"price": "Precio",
|
||||||
|
"capacity": "Cupo",
|
||||||
|
"capacityValue": "{{count}} miembros",
|
||||||
|
"dueDay": "Vencimiento",
|
||||||
|
"dueDayValue": "Día {{day}} de cada mes",
|
||||||
|
"plan": "Estás en el plan <strong>{{plan}}</strong>.",
|
||||||
|
"freeHint": " Cuando quieras cobrar con Mercado Pago o automatizar WhatsApp, pasate a Pro desde Ajustes.",
|
||||||
|
"mpConnected": "Vas a cobrar con <strong>Mercado Pago</strong>. Los pagos entran directo en tu cuenta.",
|
||||||
|
"mpPending": "Cuando quieras cobrar, vinculá <strong>Mercado Pago</strong> desde Ajustes. Tu grupo ya quedó creado.",
|
||||||
|
"waConnected": "Tu WhatsApp está vinculado. Activá los recordatorios de pago y el reenganche desde la ficha del grupo.",
|
||||||
|
"waPending": "Para enviar recordatorios automáticos, vinculá <strong>WhatsApp</strong> desde Ajustes.",
|
||||||
|
"goToPanel": "Ir a mi Panel"
|
||||||
|
}
|
||||||
|
}
|
||||||
93
apps/web/src/i18n/locales/pt-BR/onboarding.json
Normal file
93
apps/web/src/i18n/locales/pt-BR/onboarding.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"steps": {
|
||||||
|
"welcome": "Boas-vindas",
|
||||||
|
"country": "País",
|
||||||
|
"plan": "Plano",
|
||||||
|
"payment": "Cobranças",
|
||||||
|
"whatsapp": "WhatsApp",
|
||||||
|
"group": "Seu grupo",
|
||||||
|
"done": "Pronto",
|
||||||
|
"progress": "Progresso do cadastro"
|
||||||
|
},
|
||||||
|
"continue": "Continuar",
|
||||||
|
"later": "Faço depois",
|
||||||
|
"signedOut": {
|
||||||
|
"title": "Sua conta, pronta",
|
||||||
|
"description": "Entre para configurar suas cobranças e criar seu primeiro grupo.",
|
||||||
|
"action": "Entrar"
|
||||||
|
},
|
||||||
|
"fallbackName": "professor",
|
||||||
|
"welcome": {
|
||||||
|
"title": "Olá, {{name}}!",
|
||||||
|
"description": "Vamos configurar sua conta em 3 passos. Leva menos de 5 minutos.",
|
||||||
|
"step1Title": "Conecte sua conta de recebimento",
|
||||||
|
"step1": "Vincule o Mercado Pago e cobre seus membros pelo grupo.",
|
||||||
|
"step2Title": "Crie seu primeiro grupo",
|
||||||
|
"step2": "Dias, horário, preço e vagas da sua aula.",
|
||||||
|
"step3Title": "Comece a cobrar",
|
||||||
|
"step3": "Tudo pronto para adicionar membros e cobrar na hora.",
|
||||||
|
"start": "Começar"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"title": "Em que país você vai cobrar?",
|
||||||
|
"description": "Seus links são gerados na moeda desse país.",
|
||||||
|
"label": "País"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"title": "Escolha seu plano",
|
||||||
|
"description": "Comece grátis ou mude para o Pro para cobrar com Mercado Pago e automatizar o WhatsApp.",
|
||||||
|
"error": "Não conseguimos salvar seu plano. Verifique sua conexão e tente novamente.",
|
||||||
|
"active": "Pronto! Sua assinatura Pro está ativa.",
|
||||||
|
"processing": "Processando seu pagamento…",
|
||||||
|
"pendingTitle": "Sua assinatura Pro ficou pendente",
|
||||||
|
"processingHint": "O {{provider}} pode levar alguns minutos para confirmar. Você pode continuar enquanto isso: avisamos quando ficar ativa.",
|
||||||
|
"pendingHint": "Você não terminou de autorizar o pagamento no {{provider}}. Pode tentar de novo ou continuar no Free.",
|
||||||
|
"retry": "Tentar o pagamento de novo",
|
||||||
|
"stayFree": "Continuar no Free",
|
||||||
|
"startFree": "Começar grátis",
|
||||||
|
"choosePro": "Escolher Pro"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"title": "Conecte suas cobranças",
|
||||||
|
"description": "Vincule sua conta do Mercado Pago e cobre seus membros pelo grupo.",
|
||||||
|
"linked": "Sua conta do Mercado Pago foi vinculada.",
|
||||||
|
"loading": "Consultando sua conta…",
|
||||||
|
"linkedOn": "Vinculada em {{date}}.",
|
||||||
|
"connectedHint": "Os pagamentos dos seus grupos vão entrar nesta conta.",
|
||||||
|
"connectHint": "Vamos te levar ao Mercado Pago para autorizar as cobranças. Os pagamentos entram direto na sua conta, sem intermediários.",
|
||||||
|
"opening": "Abrindo o Mercado Pago…",
|
||||||
|
"change": "Trocar de conta",
|
||||||
|
"connect": "Vincular conta"
|
||||||
|
},
|
||||||
|
"whatsapp": {
|
||||||
|
"title": "Conecte seu WhatsApp",
|
||||||
|
"description": "O Gruperly lembra seus membros dos pagamentos e escreve para quem parou de vir, uma vez por semana e pelo seu número.",
|
||||||
|
"linked": "Seu WhatsApp foi vinculado.",
|
||||||
|
"linkedWith": "Seu WhatsApp foi vinculado ({{phone}}).",
|
||||||
|
"qrHint": "Você vincula com seu número de telefone ou escaneando um QR code, como no WhatsApp Web.",
|
||||||
|
"metaHint": "Vamos te levar à Meta para conectar sua conta do WhatsApp Business.",
|
||||||
|
"perGroup": "Os envios automáticos você ativa depois em cada grupo.",
|
||||||
|
"opening": "Abrindo…",
|
||||||
|
"connect": "Vincular WhatsApp"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"heading": "Seu primeiro grupo"
|
||||||
|
},
|
||||||
|
"done": {
|
||||||
|
"title": "Tudo pronto!",
|
||||||
|
"description": "Seu grupo foi criado. Agora você pode convidar membros e fazer a chamada.",
|
||||||
|
"active": "Ativo",
|
||||||
|
"price": "Preço",
|
||||||
|
"capacity": "Vagas",
|
||||||
|
"capacityValue": "{{count}} membros",
|
||||||
|
"dueDay": "Vencimento",
|
||||||
|
"dueDayValue": "Todo dia {{day}}",
|
||||||
|
"plan": "Você está no plano <strong>{{plan}}</strong>.",
|
||||||
|
"freeHint": " Quando quiser cobrar com Mercado Pago ou automatizar o WhatsApp, mude para o Pro em Ajustes.",
|
||||||
|
"mpConnected": "Você vai cobrar com <strong>Mercado Pago</strong>. Os pagamentos entram direto na sua conta.",
|
||||||
|
"mpPending": "Quando quiser cobrar, vincule o <strong>Mercado Pago</strong> em Ajustes. Seu grupo já foi criado.",
|
||||||
|
"waConnected": "Seu WhatsApp está vinculado. Ative os lembretes de pagamento e o reengajamento na página do grupo.",
|
||||||
|
"waPending": "Para enviar lembretes automáticos, vincule o <strong>WhatsApp</strong> em Ajustes.",
|
||||||
|
"goToPanel": "Ir para o meu painel"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user