diff --git a/apps/web/src/features/billing/PlanUpgradePrompt.tsx b/apps/web/src/features/billing/PlanUpgradePrompt.tsx
index 8d8eb52..db6c0b9 100644
--- a/apps/web/src/features/billing/PlanUpgradePrompt.tsx
+++ b/apps/web/src/features/billing/PlanUpgradePrompt.tsx
@@ -2,6 +2,7 @@ import { useNavigate } from '@tanstack/react-router'
import { Sparkles } from 'lucide-react'
import { Button, Modal } from '../../components/ui'
import { dismissPlanPrompt, usePlanPrompt } from './plan-prompt'
+import { useTranslation } from 'react-i18next'
/**
* Aviso de "esto es de Pro". Lo dispara cualquier 402 de plan (ver el
@@ -10,19 +11,20 @@ import { dismissPlanPrompt, usePlanPrompt } from './plan-prompt'
*/
export function PlanUpgradePrompt() {
const detail = usePlanPrompt()
+ const { t } = useTranslation(['billing', 'common'])
const navigate = useNavigate()
return (
diff --git a/apps/web/src/features/billing/SubscribeForm.tsx b/apps/web/src/features/billing/SubscribeForm.tsx
index 9b1fcfd..34515c9 100644
--- a/apps/web/src/features/billing/SubscribeForm.tsx
+++ b/apps/web/src/features/billing/SubscribeForm.tsx
@@ -3,6 +3,7 @@ import { Loader2 } from 'lucide-react'
import { type FormEvent, useState } from 'react'
import { Button, Input, Label } from '../../components/ui'
import { BILLING_PROVIDER_NAMES } from './copy'
+import { useTranslation } from 'react-i18next'
type SubscribeFormProps = {
provider: BillingProviderId
@@ -26,11 +27,12 @@ export function SubscribeForm({
defaultEmail,
isPending,
error,
- submitLabel = `Ir a ${BILLING_PROVIDER_NAMES[provider]}`,
+ submitLabel,
onSubmit,
onCancel,
}: SubscribeFormProps) {
const [email, setEmail] = useState(defaultEmail)
+ const { t } = useTranslation(['billing', 'common'])
const asksEmail = provider === 'MERCADO_PAGO'
const handleSubmit = (event: FormEvent) => {
@@ -42,7 +44,7 @@ export function SubscribeForm({
diff --git a/apps/web/src/features/billing/SubscribeModal.tsx b/apps/web/src/features/billing/SubscribeModal.tsx
index bab0b58..0de769b 100644
--- a/apps/web/src/features/billing/SubscribeModal.tsx
+++ b/apps/web/src/features/billing/SubscribeModal.tsx
@@ -4,9 +4,11 @@ import { useBilling } from './BillingProvider'
import { subscribeDescription } from './copy'
import { SubscribeForm } from './SubscribeForm'
import { useStartSubscription } from './useStartSubscription'
+import { useTranslation } from 'react-i18next'
export function SubscribeModal() {
const { user } = useAuth()
+ const { t } = useTranslation(['billing', 'common'])
const { isSubscribeOpen, closeSubscribe, statusQuery } = useBilling()
const subscription = useStartSubscription()
const provider = statusQuery.data?.provider ?? 'MERCADO_PAGO'
@@ -15,7 +17,7 @@ export function SubscribeModal() {
diff --git a/apps/web/src/features/billing/copy.ts b/apps/web/src/features/billing/copy.ts
index 9dd1b1f..017019f 100644
--- a/apps/web/src/features/billing/copy.ts
+++ b/apps/web/src/features/billing/copy.ts
@@ -7,6 +7,7 @@ import type {
SubscriptionStatus,
} from '@gruperly/shared'
import type { BadgeVariant } from '../../components/ui'
+import { i18n } from '../../i18n/instance'
/* Copy del plan de Gruperly en un solo lugar: Ajustes, la pantalla del plan, el
paso del onboarding y los avisos tienen que decir lo mismo. Funciones puras,
@@ -14,8 +15,9 @@ import type { BadgeVariant } from '../../components/ui'
export const PLAN_NAMES: Record = { FREE: 'Free', PRO: 'Pro' }
-export const SUBSCRIBE_ERROR_MESSAGE =
- 'No pudimos abrir la página de pago. Revisá tu conexión e intentá de nuevo.'
+export function subscribeErrorMessage(): string {
+ return i18n.t('billing:subscribeError')
+}
/* Quién cobra Pro: Mercado Pago en Argentina, Stripe en el resto. Es solo la
suscripción a Gruperly; los cobros a alumnos siguen siendo con Mercado Pago. */
@@ -26,9 +28,7 @@ export const BILLING_PROVIDER_NAMES: Record = {
/** Qué pasa al tocar "Pasar a Pro", según quién cobra. */
export function subscribeDescription(provider: BillingProviderId): string {
- return provider === 'STRIPE'
- ? 'Te llevamos a Stripe para cargar tu tarjeta. El cobro es mensual y podés cancelarlo cuando quieras.'
- : 'Te llevamos a Mercado Pago para autorizar el débito mensual. Podés cancelarlo cuando quieras.'
+ return i18n.t(`billing:subscribeDescription.${provider}`)
}
/** Lo que incluye cada plan, como lista para las tarjetas de comparación. */
@@ -37,25 +37,25 @@ export function planFeatureList(limits: PlanLimits): { label: string; included:
{
label:
limits.maxGroups === null
- ? 'Grupos ilimitados'
- : `${limits.maxGroups} ${limits.maxGroups === 1 ? 'grupo' : 'grupos'}`,
+ ? i18n.t('billing:features.unlimitedGroups')
+ : i18n.t('billing:features.groups', { count: limits.maxGroups }),
included: true,
},
{
label:
limits.maxAttendees === null
- ? 'Alumnos ilimitados'
- : `Hasta ${limits.maxAttendees} alumnos activos`,
+ ? i18n.t('billing:features.unlimitedStudents')
+ : i18n.t('billing:features.students', { count: limits.maxAttendees }),
included: true,
},
- { label: 'Cobros con Mercado Pago', included: limits.mpCharges },
- { label: 'Mensajes automáticos por WhatsApp', included: limits.whatsappAutomations },
+ { label: i18n.t('billing:features.mpCharges'), included: limits.mpCharges },
+ { label: i18n.t('billing:features.whatsapp'), included: limits.whatsappAutomations },
]
}
-export const PLAN_FEATURE_REQUIRED_MESSAGES: Record = {
- mpCharges: 'Cobrar con Mercado Pago está disponible en el plan Pro.',
- whatsappAutomations: 'Los mensajes automáticos de WhatsApp están disponibles en el plan Pro.',
+/** The same copy as the backend's `plan_feature_required` problem. */
+export function planFeatureRequiredMessage(feature: PlanFeature): string {
+ return i18n.t(`errors:codes.plan_feature_required_${feature}`)
}
/**
@@ -69,15 +69,12 @@ export function hasPlanFeature(status: BillingStatusDto | undefined, feature: Pl
export function subscriptionStatusLabel(status: SubscriptionStatus | null): string {
switch (status) {
case 'AUTHORIZED':
- return 'Activa'
case 'PENDING':
- return 'Pendiente de pago'
case 'PAUSED':
- return 'Pausada'
case 'CANCELLED':
- return 'Cancelada'
+ return i18n.t(`billing:subscriptionStatus.${status}`)
default:
- return 'Sin suscripción'
+ return i18n.t('billing:subscriptionStatus.NONE')
}
}
@@ -91,14 +88,14 @@ export function formatBillingDate(iso: string | null): string | null {
if (!iso) return null
const date = new Date(iso)
if (Number.isNaN(date.getTime())) return null
- return new Intl.DateTimeFormat('es', { day: 'numeric', month: 'short', year: 'numeric' }).format(
+ return new Intl.DateTimeFormat(i18n.language, { day: 'numeric', month: 'short', year: 'numeric' }).format(
date,
)
}
/** "3 de 15": el uso contra el límite, o solo el uso cuando no hay límite. */
export function formatUsage(used: number, limit: number | null): string {
- return limit === null ? `${used}` : `${used} de ${limit}`
+ return limit === null ? `${used}` : i18n.t('billing:usage', { used, limit })
}
const PLAN_PROBLEM_CODES = ['plan_limit_reached', 'plan_feature_required', 'plan_read_only']
@@ -124,7 +121,7 @@ export function planNoticeMessage(status: BillingStatusDto): { tone: 'danger' |
if (status.readOnly) {
return {
tone: 'danger',
- text: 'Tu cuenta está en solo lectura: superás los límites del plan Free. Pasate a Pro o reducí tus alumnos para volver a editar.',
+ text: i18n.t('billing:notice.readOnly'),
}
}
const graceUntil = formatBillingDate(status.graceUntil)
@@ -133,8 +130,11 @@ export function planNoticeMessage(status: BillingStatusDto): { tone: 'danger' |
tone: 'warning',
text:
status.status === 'CANCELLED'
- ? `Cancelaste Pro: lo seguís teniendo hasta el ${graceUntil}.`
- : `No pudimos cobrar tu suscripción a Pro. Revisá tu medio de pago en ${BILLING_PROVIDER_NAMES[status.provider]} antes del ${graceUntil}.`,
+ ? i18n.t('billing:notice.cancelled', { date: graceUntil })
+ : i18n.t('billing:notice.paymentFailed', {
+ provider: BILLING_PROVIDER_NAMES[status.provider],
+ date: graceUntil,
+ }),
}
}
return null
diff --git a/apps/web/src/features/billing/index.ts b/apps/web/src/features/billing/index.ts
index 597f058..2615296 100644
--- a/apps/web/src/features/billing/index.ts
+++ b/apps/web/src/features/billing/index.ts
@@ -4,7 +4,7 @@ export {
formatUsage,
hasPlanFeature,
isPlanProblem,
- PLAN_FEATURE_REQUIRED_MESSAGES,
+ planFeatureRequiredMessage,
PLAN_NAMES,
planFeatureList,
planNoticeMessage,
diff --git a/apps/web/src/features/billing/useStartSubscription.ts b/apps/web/src/features/billing/useStartSubscription.ts
index 216a92b..b1ab9eb 100644
--- a/apps/web/src/features/billing/useStartSubscription.ts
+++ b/apps/web/src/features/billing/useStartSubscription.ts
@@ -1,7 +1,8 @@
import type { BillingReturnTo } from '@gruperly/shared'
import { useState } from 'react'
-import { ApiError, subscribeToPro } from '../../lib/api'
-import { SUBSCRIBE_ERROR_MESSAGE } from './copy'
+import { subscribeToPro } from '../../lib/api'
+import { errorMessage } from '../../i18n'
+import { subscribeErrorMessage } from './copy'
/**
* Empieza la suscripción a Pro. Como la vinculación de Mercado Pago, no se
@@ -19,7 +20,7 @@ export function useStartSubscription() {
const { checkoutUrl } = await subscribeToPro({ payerEmail, returnTo })
window.location.assign(checkoutUrl)
} catch (caught) {
- setError(caught instanceof ApiError && caught.problem?.detail ? caught.problem.detail : SUBSCRIBE_ERROR_MESSAGE)
+ setError(errorMessage(caught, subscribeErrorMessage()))
setIsStarting(false)
}
}
diff --git a/apps/web/src/features/groups/detail/GroupDetailView.tsx b/apps/web/src/features/groups/detail/GroupDetailView.tsx
index 8f433e6..6ac3772 100644
--- a/apps/web/src/features/groups/detail/GroupDetailView.tsx
+++ b/apps/web/src/features/groups/detail/GroupDetailView.tsx
@@ -5,7 +5,7 @@ import { useState } from 'react'
import { Button } from '../../../components/ui'
import {
hasPlanFeature,
- PLAN_FEATURE_REQUIRED_MESSAGES,
+ planFeatureRequiredMessage,
showPlanPrompt,
useBillingStatus,
} from '../../billing'
@@ -41,7 +41,7 @@ export function GroupDetailView() {
const billingQuery = useBillingStatus({ enabled: isGroupOwner })
const handleCharge = () => {
if (isGroupOwner && !hasPlanFeature(billingQuery.data, 'mpCharges')) {
- showPlanPrompt(PLAN_FEATURE_REQUIRED_MESSAGES.mpCharges)
+ showPlanPrompt(planFeatureRequiredMessage('mpCharges'))
return
}
setIsChargeModalOpen(true)
diff --git a/apps/web/src/i18n/i18next.d.ts b/apps/web/src/i18n/i18next.d.ts
index a121342..27ef5e9 100644
--- a/apps/web/src/i18n/i18next.d.ts
+++ b/apps/web/src/i18n/i18next.d.ts
@@ -14,6 +14,7 @@ import type attention from './locales/es-AR/attention.json'
import type attendeeDetail from './locales/es-AR/attendeeDetail.json'
import type classAttendance from './locales/es-AR/classAttendance.json'
import type payments from './locales/es-AR/payments.json'
+import type billing from './locales/es-AR/billing.json'
import type validation from './locales/es-AR/validation.json'
// es-AR es la fuente: una clave que no exista ahí rompe el typecheck.
@@ -28,6 +29,7 @@ declare module 'i18next' {
pwa: typeof pwa
settings: typeof settings
validation: typeof validation
+ 'billing': typeof billing
'payments': typeof payments
'classAttendance': typeof classAttendance
'attendeeDetail': typeof attendeeDetail
diff --git a/apps/web/src/i18n/locales/en/billing.json b/apps/web/src/i18n/locales/en/billing.json
new file mode 100644
index 0000000..e9a5784
--- /dev/null
+++ b/apps/web/src/i18n/locales/en/billing.json
@@ -0,0 +1,91 @@
+{
+ "subscribeError": "We couldn't open the payment page. Check your connection and try again.",
+ "subscribeDescription": {
+ "STRIPE": "We'll take you to Stripe to add your card. You're billed monthly and can cancel anytime.",
+ "MERCADO_PAGO": "We'll take you to Mercado Pago to authorize the monthly charge. You can cancel anytime."
+ },
+ "features": {
+ "unlimitedGroups": "Unlimited groups",
+ "groups_one": "{{count}} group",
+ "groups_other": "{{count}} groups",
+ "unlimitedStudents": "Unlimited students",
+ "students": "Up to {{count}} active students",
+ "mpCharges": "Payments with Mercado Pago",
+ "whatsapp": "Automatic WhatsApp messages"
+ },
+ "subscriptionStatus": {
+ "AUTHORIZED": "Active",
+ "PENDING": "Payment pending",
+ "PAUSED": "Paused",
+ "CANCELLED": "Cancelled",
+ "NONE": "No subscription"
+ },
+ "usage": "{{used}} of {{limit}}",
+ "notice": {
+ "readOnly": "Your account is read-only: you're over the Free plan's limits. Upgrade to Pro or reduce your students to edit again.",
+ "cancelled": "You cancelled Pro: you keep it until {{date}}.",
+ "paymentFailed": "We couldn't charge your Pro subscription. Check your payment method in {{provider}} before {{date}}.",
+ "seePlan": "See plan"
+ },
+ "settings": {
+ "title": "Plan",
+ "description": "Your Gruperly plan and payments",
+ "readOnly": "Read-only"
+ },
+ "subscribe": {
+ "title": "Upgrade to Pro",
+ "goTo": "Go to {{provider}}",
+ "payerEmail": "Your Mercado Pago account email",
+ "payerEmailHint": "You need to sign in to Mercado Pago with this same email to authorize the monthly charge.",
+ "opening": "Opening…"
+ },
+ "upgrade": {
+ "title": "Available on Pro",
+ "later": "Not now",
+ "seePlans": "See plans"
+ },
+ "cancel": {
+ "title": "Cancel Pro",
+ "descriptionUntil": "We won't charge you again. You keep Pro until {{date}}; then your account moves to Free.",
+ "description": "We won't charge you again and your account moves to Free.",
+ "back": "Back",
+ "confirm": "Cancel subscription",
+ "done": "You cancelled your subscription. You keep Pro until the end of the paid period.",
+ "error": "We couldn't cancel the subscription.",
+ "welcome": "All set! You now have Gruperly Pro."
+ },
+ "option": {
+ "yourPlan": "Your plan",
+ "free": "Free"
+ },
+ "charges": {
+ "title": "Payment history",
+ "approved": "Paid",
+ "rejected": "Declined",
+ "pending": "Pending",
+ "in_process": "Processing",
+ "cancelled": "Cancelled",
+ "refunded": "Refunded",
+ "prev": "Previous",
+ "next": "Next"
+ },
+ "view": {
+ "back": "Settings",
+ "title": "Your plan",
+ "subtitle": "Choose how you use Gruperly.",
+ "perMonth": "{{price}} / month",
+ "retry": "Retry payment",
+ "upgrade": "Upgrade to Pro",
+ "unavailable": "Not available in your country yet."
+ },
+ "summary": {
+ "loading": "Checking your plan…",
+ "plan": "{{plan}} plan",
+ "next": "Next charge: {{amount}} on {{date}}",
+ "pending": "We're waiting for {{provider}} to confirm your subscription.",
+ "paidThrough": "Paid through {{date}}.",
+ "notEnforced": "For now, every feature is enabled for every account.",
+ "groups": "Groups",
+ "students": "Active students"
+ }
+}
diff --git a/apps/web/src/i18n/locales/es-419/billing.json b/apps/web/src/i18n/locales/es-419/billing.json
new file mode 100644
index 0000000..b3af52d
--- /dev/null
+++ b/apps/web/src/i18n/locales/es-419/billing.json
@@ -0,0 +1,91 @@
+{
+ "subscribeError": "No pudimos abrir la página de pago. Revisa tu conexión e inténtalo de nuevo.",
+ "subscribeDescription": {
+ "STRIPE": "Te llevamos a Stripe para registrar tu tarjeta. El cobro es mensual y puedes cancelarlo cuando quieras.",
+ "MERCADO_PAGO": "Te llevamos a Mercado Pago para autorizar el débito mensual. Puedes cancelarlo cuando quieras."
+ },
+ "features": {
+ "unlimitedGroups": "Grupos ilimitados",
+ "groups_one": "{{count}} grupo",
+ "groups_other": "{{count}} grupos",
+ "unlimitedStudents": "Alumnos ilimitados",
+ "students": "Hasta {{count}} alumnos activos",
+ "mpCharges": "Cobros con Mercado Pago",
+ "whatsapp": "Mensajes automáticos por WhatsApp"
+ },
+ "subscriptionStatus": {
+ "AUTHORIZED": "Activa",
+ "PENDING": "Pendiente de pago",
+ "PAUSED": "Pausada",
+ "CANCELLED": "Cancelada",
+ "NONE": "Sin suscripción"
+ },
+ "usage": "{{used}} de {{limit}}",
+ "notice": {
+ "readOnly": "Tu cuenta está en solo lectura: superas los límites del plan Free. Cámbiate a Pro o reduce tus alumnos para volver a editar.",
+ "cancelled": "Cancelaste Pro: lo sigues teniendo hasta el {{date}}.",
+ "paymentFailed": "No pudimos cobrar tu suscripción a Pro. Revisa tu medio de pago en {{provider}} antes del {{date}}.",
+ "seePlan": "Ver plan"
+ },
+ "settings": {
+ "title": "Plan",
+ "description": "Tu plan de Gruperly y tus pagos",
+ "readOnly": "Solo lectura"
+ },
+ "subscribe": {
+ "title": "Cámbiate a Pro",
+ "goTo": "Ir a {{provider}}",
+ "payerEmail": "Email de tu cuenta de Mercado Pago",
+ "payerEmailHint": "Tienes que entrar a Mercado Pago con este mismo email para autorizar el débito mensual.",
+ "opening": "Abriendo…"
+ },
+ "upgrade": {
+ "title": "Disponible en Pro",
+ "later": "Ahora no",
+ "seePlans": "Ver planes"
+ },
+ "cancel": {
+ "title": "Cancelar Pro",
+ "descriptionUntil": "No te cobraremos más. Sigues con Pro hasta el {{date}}; después tu cuenta pasa a Free.",
+ "description": "No te cobraremos más y tu cuenta pasa a Free.",
+ "back": "Volver",
+ "confirm": "Cancelar suscripción",
+ "done": "Cancelaste tu suscripción. Sigues con Pro hasta el fin del período pagado.",
+ "error": "No pudimos cancelar la suscripción.",
+ "welcome": "¡Listo! Ya tienes Gruperly Pro."
+ },
+ "option": {
+ "yourPlan": "Tu plan",
+ "free": "Gratis"
+ },
+ "charges": {
+ "title": "Historial de pagos",
+ "approved": "Pagado",
+ "rejected": "Rechazado",
+ "pending": "Pendiente",
+ "in_process": "En proceso",
+ "cancelled": "Cancelado",
+ "refunded": "Devuelto",
+ "prev": "Anteriores",
+ "next": "Siguientes"
+ },
+ "view": {
+ "back": "Ajustes",
+ "title": "Tu plan",
+ "subtitle": "Elige cómo usar Gruperly.",
+ "perMonth": "{{price}} / mes",
+ "retry": "Reintentar el pago",
+ "upgrade": "Cambiarme a Pro",
+ "unavailable": "Todavía no está disponible en tu país."
+ },
+ "summary": {
+ "loading": "Consultando tu plan…",
+ "plan": "Plan {{plan}}",
+ "next": "Próximo cobro: {{amount}} el {{date}}",
+ "pending": "Estamos esperando que {{provider}} confirme tu suscripción.",
+ "paidThrough": "Pagado hasta el {{date}}.",
+ "notEnforced": "Por ahora todas las funciones están habilitadas para todas las cuentas.",
+ "groups": "Grupos",
+ "students": "Alumnos activos"
+ }
+}
diff --git a/apps/web/src/i18n/locales/es-AR/billing.json b/apps/web/src/i18n/locales/es-AR/billing.json
new file mode 100644
index 0000000..1aaf781
--- /dev/null
+++ b/apps/web/src/i18n/locales/es-AR/billing.json
@@ -0,0 +1,91 @@
+{
+ "subscribeError": "No pudimos abrir la página de pago. Revisá tu conexión e intentá de nuevo.",
+ "subscribeDescription": {
+ "STRIPE": "Te llevamos a Stripe para cargar tu tarjeta. El cobro es mensual y podés cancelarlo cuando quieras.",
+ "MERCADO_PAGO": "Te llevamos a Mercado Pago para autorizar el débito mensual. Podés cancelarlo cuando quieras."
+ },
+ "features": {
+ "unlimitedGroups": "Grupos ilimitados",
+ "groups_one": "{{count}} grupo",
+ "groups_other": "{{count}} grupos",
+ "unlimitedStudents": "Alumnos ilimitados",
+ "students": "Hasta {{count}} alumnos activos",
+ "mpCharges": "Cobros con Mercado Pago",
+ "whatsapp": "Mensajes automáticos por WhatsApp"
+ },
+ "subscriptionStatus": {
+ "AUTHORIZED": "Activa",
+ "PENDING": "Pendiente de pago",
+ "PAUSED": "Pausada",
+ "CANCELLED": "Cancelada",
+ "NONE": "Sin suscripción"
+ },
+ "usage": "{{used}} de {{limit}}",
+ "notice": {
+ "readOnly": "Tu cuenta está en solo lectura: superás los límites del plan Free. Pasate a Pro o reducí tus alumnos para volver a editar.",
+ "cancelled": "Cancelaste Pro: lo seguís teniendo hasta el {{date}}.",
+ "paymentFailed": "No pudimos cobrar tu suscripción a Pro. Revisá tu medio de pago en {{provider}} antes del {{date}}.",
+ "seePlan": "Ver plan"
+ },
+ "settings": {
+ "title": "Plan",
+ "description": "Tu plan de Gruperly y tus pagos",
+ "readOnly": "Solo lectura"
+ },
+ "subscribe": {
+ "title": "Pasate a Pro",
+ "goTo": "Ir a {{provider}}",
+ "payerEmail": "Email de tu cuenta de Mercado Pago",
+ "payerEmailHint": "Tenés que entrar a Mercado Pago con este mismo email para autorizar el débito mensual.",
+ "opening": "Abriendo…"
+ },
+ "upgrade": {
+ "title": "Disponible en Pro",
+ "later": "Ahora no",
+ "seePlans": "Ver planes"
+ },
+ "cancel": {
+ "title": "Cancelar Pro",
+ "descriptionUntil": "No te vamos a cobrar más. Seguís con Pro hasta el {{date}}; después tu cuenta pasa a Free.",
+ "description": "No te vamos a cobrar más y tu cuenta pasa a Free.",
+ "back": "Volver",
+ "confirm": "Cancelar suscripción",
+ "done": "Cancelaste tu suscripción. Seguís con Pro hasta el fin del período pago.",
+ "error": "No pudimos cancelar la suscripción.",
+ "welcome": "¡Listo! Ya tenés Gruperly Pro."
+ },
+ "option": {
+ "yourPlan": "Tu plan",
+ "free": "Gratis"
+ },
+ "charges": {
+ "title": "Historial de pagos",
+ "approved": "Pagado",
+ "rejected": "Rechazado",
+ "pending": "Pendiente",
+ "in_process": "En proceso",
+ "cancelled": "Cancelado",
+ "refunded": "Devuelto",
+ "prev": "Anteriores",
+ "next": "Siguientes"
+ },
+ "view": {
+ "back": "Ajustes",
+ "title": "Tu plan",
+ "subtitle": "Elegí cómo usar Gruperly.",
+ "perMonth": "{{price}} / mes",
+ "retry": "Reintentar el pago",
+ "upgrade": "Pasar a Pro",
+ "unavailable": "Todavía no está disponible en tu país."
+ },
+ "summary": {
+ "loading": "Consultando tu plan…",
+ "plan": "Plan {{plan}}",
+ "next": "Próximo cobro: {{amount}} el {{date}}",
+ "pending": "Estamos esperando que {{provider}} confirme tu suscripción.",
+ "paidThrough": "Pagado hasta el {{date}}.",
+ "notEnforced": "Por ahora todas las funciones están habilitadas para todas las cuentas.",
+ "groups": "Grupos",
+ "students": "Alumnos activos"
+ }
+}
diff --git a/apps/web/src/i18n/locales/pt-BR/billing.json b/apps/web/src/i18n/locales/pt-BR/billing.json
new file mode 100644
index 0000000..549bac0
--- /dev/null
+++ b/apps/web/src/i18n/locales/pt-BR/billing.json
@@ -0,0 +1,91 @@
+{
+ "subscribeError": "Não conseguimos abrir a página de pagamento. Verifique sua conexão e tente novamente.",
+ "subscribeDescription": {
+ "STRIPE": "Vamos te levar ao Stripe para cadastrar seu cartão. A cobrança é mensal e você pode cancelar quando quiser.",
+ "MERCADO_PAGO": "Vamos te levar ao Mercado Pago para autorizar o débito mensal. Você pode cancelar quando quiser."
+ },
+ "features": {
+ "unlimitedGroups": "Grupos ilimitados",
+ "groups_one": "{{count}} grupo",
+ "groups_other": "{{count}} grupos",
+ "unlimitedStudents": "Alunos ilimitados",
+ "students": "Até {{count}} alunos ativos",
+ "mpCharges": "Cobranças com Mercado Pago",
+ "whatsapp": "Mensagens automáticas pelo WhatsApp"
+ },
+ "subscriptionStatus": {
+ "AUTHORIZED": "Ativa",
+ "PENDING": "Pagamento pendente",
+ "PAUSED": "Pausada",
+ "CANCELLED": "Cancelada",
+ "NONE": "Sem assinatura"
+ },
+ "usage": "{{used}} de {{limit}}",
+ "notice": {
+ "readOnly": "Sua conta está somente leitura: você ultrapassa os limites do plano Free. Mude para o Pro ou reduza seus alunos para voltar a editar.",
+ "cancelled": "Você cancelou o Pro: ele continua ativo até {{date}}.",
+ "paymentFailed": "Não conseguimos cobrar sua assinatura Pro. Verifique sua forma de pagamento em {{provider}} antes de {{date}}.",
+ "seePlan": "Ver plano"
+ },
+ "settings": {
+ "title": "Plano",
+ "description": "Seu plano do Gruperly e seus pagamentos",
+ "readOnly": "Somente leitura"
+ },
+ "subscribe": {
+ "title": "Mude para o Pro",
+ "goTo": "Ir para {{provider}}",
+ "payerEmail": "E-mail da sua conta do Mercado Pago",
+ "payerEmailHint": "Você precisa entrar no Mercado Pago com este mesmo e-mail para autorizar o débito mensal.",
+ "opening": "Abrindo…"
+ },
+ "upgrade": {
+ "title": "Disponível no Pro",
+ "later": "Agora não",
+ "seePlans": "Ver planos"
+ },
+ "cancel": {
+ "title": "Cancelar Pro",
+ "descriptionUntil": "Não vamos cobrar mais. Você continua com o Pro até {{date}}; depois sua conta passa para o Free.",
+ "description": "Não vamos cobrar mais e sua conta passa para o Free.",
+ "back": "Voltar",
+ "confirm": "Cancelar assinatura",
+ "done": "Você cancelou sua assinatura. O Pro continua até o fim do período pago.",
+ "error": "Não conseguimos cancelar a assinatura.",
+ "welcome": "Pronto! Agora você tem o Gruperly Pro."
+ },
+ "option": {
+ "yourPlan": "Seu plano",
+ "free": "Grátis"
+ },
+ "charges": {
+ "title": "Histórico de pagamentos",
+ "approved": "Pago",
+ "rejected": "Recusado",
+ "pending": "Pendente",
+ "in_process": "Em processamento",
+ "cancelled": "Cancelado",
+ "refunded": "Reembolsado",
+ "prev": "Anteriores",
+ "next": "Próximos"
+ },
+ "view": {
+ "back": "Ajustes",
+ "title": "Seu plano",
+ "subtitle": "Escolha como usar o Gruperly.",
+ "perMonth": "{{price}} / mês",
+ "retry": "Tentar o pagamento de novo",
+ "upgrade": "Mudar para o Pro",
+ "unavailable": "Ainda não está disponível no seu país."
+ },
+ "summary": {
+ "loading": "Consultando seu plano…",
+ "plan": "Plano {{plan}}",
+ "next": "Próxima cobrança: {{amount}} em {{date}}",
+ "pending": "Estamos aguardando o {{provider}} confirmar sua assinatura.",
+ "paidThrough": "Pago até {{date}}.",
+ "notEnforced": "Por enquanto todos os recursos estão liberados para todas as contas.",
+ "groups": "Grupos",
+ "students": "Alunos ativos"
+ }
+}