add es and fix translations
This commit is contained in:
parent
7e7a15c52b
commit
842bde481f
@ -54,7 +54,7 @@
|
|||||||
"subscription_status": "Subscription Status",
|
"subscription_status": "Subscription Status",
|
||||||
"subscription_status_value": {
|
"subscription_status_value": {
|
||||||
"ACTIVE": "Active",
|
"ACTIVE": "Active",
|
||||||
"CANCELLED": "Cancels on <date>"
|
"CANCELLED": "Cancels on {date}"
|
||||||
},
|
},
|
||||||
"billing_period": "Billing Period",
|
"billing_period": "Billing Period",
|
||||||
"billing_period_value": {
|
"billing_period_value": {
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
"subscription_status": "Subscription Status",
|
"subscription_status": "Subscription Status",
|
||||||
"subscription_status_value": {
|
"subscription_status_value": {
|
||||||
"ACTIVE": "Active",
|
"ACTIVE": "Active",
|
||||||
"CANCELLED": "Cancels on <date>",
|
"CANCELLED": "Cancels on {date}",
|
||||||
"PAST_DUE": "Past due"
|
"PAST_DUE": "Past due"
|
||||||
},
|
},
|
||||||
"billing_period": "Billing Period",
|
"billing_period": "Billing Period",
|
||||||
|
|||||||
217
messages/es.json
Normal file
217
messages/es.json
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
{
|
||||||
|
"HomePage": {
|
||||||
|
"title": "¡Hola mundo!",
|
||||||
|
"about": "Ir a la página acerca de"
|
||||||
|
},
|
||||||
|
"Profile": {
|
||||||
|
"profile_information": {
|
||||||
|
"title": "Información del Perfil",
|
||||||
|
"description": "Para actualizar tu dirección de correo electrónico, por favor contacta al soporte.",
|
||||||
|
"email_placeholder": "Correo electrónico",
|
||||||
|
"name_placeholder": "Nombre"
|
||||||
|
},
|
||||||
|
"billing": {
|
||||||
|
"title": "Facturación",
|
||||||
|
"description": "Para acceder a la información de tu suscripción, por favor inicia sesión en tu cuenta de facturación.",
|
||||||
|
"subscription_type": "Tipo de Suscripción:",
|
||||||
|
"billing_button": "Facturación",
|
||||||
|
"credits": {
|
||||||
|
"title": "Te quedan {credits} créditos",
|
||||||
|
"description": "Puedes usarlos para chatear con cualquier Experto en la plataforma."
|
||||||
|
},
|
||||||
|
"any_questions": "¿Alguna pregunta? <link>{linkText}</link>",
|
||||||
|
"any_questions_link": "Contáctanos",
|
||||||
|
"subscription_update": "<bold>{subscriptionUpdateBold}</bold><br></br>Si acabas de comprar o cambiar de plan, el estado de tu suscripción cambiará en unas horas.",
|
||||||
|
"subscription_update_bold": "La información de la suscripción se actualiza cada pocas horas."
|
||||||
|
},
|
||||||
|
"log_out": {
|
||||||
|
"title": "Cerrar sesión",
|
||||||
|
"log_out_button": "Cerrar sesión",
|
||||||
|
"modal": {
|
||||||
|
"title": "¿Estás seguro de que quieres cerrar sesión?",
|
||||||
|
"description": "¿Estás seguro de que quieres cerrar sesión?",
|
||||||
|
"stay_button": "Quedarse",
|
||||||
|
"log_out_button": "Cerrar sesión"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Subscriptions": {
|
||||||
|
"title": "Gestionar mis suscripciones",
|
||||||
|
"success_cancel_message": "Tu suscripción ha sido cancelada exitosamente",
|
||||||
|
"modal": {
|
||||||
|
"title": "¿Estás seguro de que quieres cancelar tu suscripción?",
|
||||||
|
"description": "¿Estás seguro de que quieres cancelar tu suscripción?",
|
||||||
|
"cancel_button": "Cancelar suscripción",
|
||||||
|
"stay_button": "Quedarse"
|
||||||
|
},
|
||||||
|
"table": {
|
||||||
|
"subscription_type": "Tipo de Suscripción",
|
||||||
|
"subscription_type_value": {
|
||||||
|
"DAY": "Suscripción Diaria",
|
||||||
|
"WEEK": "Suscripción Semanal",
|
||||||
|
"MONTH": "Suscripción Mensual",
|
||||||
|
"YEAR": "Suscripción Anual"
|
||||||
|
},
|
||||||
|
"subscription_status": "Estado de la Suscripción",
|
||||||
|
"subscription_status_value": {
|
||||||
|
"ACTIVE": "Activa",
|
||||||
|
"CANCELLED": "Se cancela el {date}",
|
||||||
|
"PAST_DUE": "Vencida"
|
||||||
|
},
|
||||||
|
"billing_period": "Período de Facturación",
|
||||||
|
"billing_period_value": {
|
||||||
|
"DAY": "Día",
|
||||||
|
"WEEK": "Semana",
|
||||||
|
"MONTH": "Mes",
|
||||||
|
"YEAR": "Año"
|
||||||
|
},
|
||||||
|
"last_payment_on": "Último Pago el",
|
||||||
|
"renewal_date": "Fecha de Renovación",
|
||||||
|
"renewal_amount": "Monto de Renovación",
|
||||||
|
"cancel_subscription": "Cancelar Suscripción"
|
||||||
|
},
|
||||||
|
"no_subscriptions": "No tienes ninguna suscripción",
|
||||||
|
"error": "Algo salió mal. Por favor, inténtalo de nuevo más tarde.",
|
||||||
|
"try_again": "Intentar de nuevo"
|
||||||
|
},
|
||||||
|
"CancelSubscription": {
|
||||||
|
"title": "Lamentamos que te vayas…",
|
||||||
|
"description": "Muchos se van justo en el momento en que el astrólogo comienza a ver el punto de inflexión en su historia.<br></br><br></br>Permítenos hacer un par de preguntas para mejorar nuestro servicio - y tal vez ofrecer una solución que se adapte mejor a ti.",
|
||||||
|
"stay_button": "Quedarse y reducir mi plan en 50%",
|
||||||
|
"cancel_button": "Cancelar",
|
||||||
|
"error_message": "Algo salió mal. Por favor, inténtalo de nuevo más tarde."
|
||||||
|
},
|
||||||
|
"Stay50Done": {
|
||||||
|
"title": "¡Valoramos tu elección!",
|
||||||
|
"descriptions": {
|
||||||
|
"1": "Plan cambiado exitosamente"
|
||||||
|
},
|
||||||
|
"button": "Listo"
|
||||||
|
},
|
||||||
|
"AppreciateChoice": {
|
||||||
|
"title": "¡Valoramos tu elección!",
|
||||||
|
"descriptions": {
|
||||||
|
"1": "Seleccionando la solución óptima...",
|
||||||
|
"2": "Creando encuesta personalizada...",
|
||||||
|
"3": "Formando oferta ventajosa..."
|
||||||
|
},
|
||||||
|
"button": "Siguiente"
|
||||||
|
},
|
||||||
|
"WhatReason": {
|
||||||
|
"title": "¿Cuál fue la razón?",
|
||||||
|
"answers": {
|
||||||
|
"no_promised_result": "No obtuve el resultado prometido",
|
||||||
|
"too_expensive": "Muy caro",
|
||||||
|
"no_time": "No tengo tiempo",
|
||||||
|
"technical_issues": "Problemas técnicos",
|
||||||
|
"dislike_app": "No me gustó la aplicación",
|
||||||
|
"hard_to_navigate": "Es difícil navegar en la aplicación",
|
||||||
|
"other": "Otro"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payment": {
|
||||||
|
"Success": {
|
||||||
|
"title": "Pago exitoso",
|
||||||
|
"button": "Listo"
|
||||||
|
},
|
||||||
|
"Error": {
|
||||||
|
"title": "Pago fallido",
|
||||||
|
"button": "Intentar de nuevo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SecondChance": {
|
||||||
|
"title": "Danos una segunda oportunidad y obtén el mejor plan GRATIS",
|
||||||
|
"offers": {
|
||||||
|
"1": {
|
||||||
|
"title": "Plan gratuito por<br></br>1 mes",
|
||||||
|
"description": "Usa todo el potencial de AURA y aún más.",
|
||||||
|
"old-price": "1900",
|
||||||
|
"new-price": "0"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"title": "Plan premium gratuito",
|
||||||
|
"description": "Consulta gratuita de 30 min con un Asesor premium",
|
||||||
|
"old-price": "4900",
|
||||||
|
"new-price": "0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get_offer": "Obtener plan gratuito",
|
||||||
|
"cancel": "Cancelar",
|
||||||
|
"error_message": "Algo salió mal. Por favor, inténtalo de nuevo más tarde."
|
||||||
|
},
|
||||||
|
"ChangeMind": {
|
||||||
|
"title": "¿Qué podría cambiar tu opinión?",
|
||||||
|
"answers": {
|
||||||
|
"more_chat_time": "Más tiempo de chat",
|
||||||
|
"more_personal_reports": "Más reportes personalizados",
|
||||||
|
"individual_plan": "Plan individual",
|
||||||
|
"other": "Otro"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"StopFor30Days": {
|
||||||
|
"title": "Pausa la suscripción por treinta días. Sin cargos.",
|
||||||
|
"stop": "Pausar",
|
||||||
|
"cancel": "Cancelar",
|
||||||
|
"error_message": "Algo salió mal. Por favor, inténtalo de nuevo más tarde."
|
||||||
|
},
|
||||||
|
"CancellationOfSubscription": {
|
||||||
|
"title": "¡La suscripción será cancelada!",
|
||||||
|
"description": "Para cancelar la suscripción, presiona \"Confirmo mis acciones\"",
|
||||||
|
"offer": {
|
||||||
|
"title": "Plan gratuito de 2 meses",
|
||||||
|
"old-price": "9900",
|
||||||
|
"new-price": "0"
|
||||||
|
},
|
||||||
|
"offer_button": "Aplicar",
|
||||||
|
"cancel_button": "Confirmo mis acciones",
|
||||||
|
"error_message": "Algo salió mal. Por favor, inténtalo de nuevo más tarde.",
|
||||||
|
"toast_message": "¡Tu suscripción será cancelada!"
|
||||||
|
},
|
||||||
|
"PlanCancelled": {
|
||||||
|
"title": "¡Plan Estándar Cancelado!",
|
||||||
|
"icon": "🥳",
|
||||||
|
"description": "Transición completada al plan gratuito de treinta días",
|
||||||
|
"button": "Listo"
|
||||||
|
},
|
||||||
|
"SubscriptionStopped": {
|
||||||
|
"title": "¡Suscripción pausada exitosamente!",
|
||||||
|
"icon": "🎉"
|
||||||
|
},
|
||||||
|
"DatePicker": {
|
||||||
|
"year": "AAAA",
|
||||||
|
"month": "MM",
|
||||||
|
"day": "DD"
|
||||||
|
},
|
||||||
|
"TimePicker": {
|
||||||
|
"hour": "HH",
|
||||||
|
"minute": "MM",
|
||||||
|
"period": "AM/PM"
|
||||||
|
},
|
||||||
|
"Compatibility": {
|
||||||
|
"title": "Tu Tipo de Personalidad",
|
||||||
|
"description": "Por favor ingresa tus datos para crear el reporte.",
|
||||||
|
"button": "Continuar",
|
||||||
|
"error": "Algo salió mal. Por favor, inténtalo de nuevo más tarde."
|
||||||
|
},
|
||||||
|
"CompatibilityResult": {
|
||||||
|
"title": "Tu Tipo de Personalidad",
|
||||||
|
"error": "Algo salió mal. Por favor, inténtalo de nuevo más tarde."
|
||||||
|
},
|
||||||
|
"PalmistryResult": {
|
||||||
|
"title": "Tu Tipo de Personalidad",
|
||||||
|
"error": "Algo salió mal. Por favor, inténtalo de nuevo más tarde."
|
||||||
|
},
|
||||||
|
"Meditation": {
|
||||||
|
"title": "Para y respira para ayudarte a relajar y enfocarte en lo que realmente importa.",
|
||||||
|
"subtitle": "La práctica de respiración ayudará a mejorar tu aura. Inhala la energía positiva, exhala la negativa...",
|
||||||
|
"button": "COMENZAR"
|
||||||
|
},
|
||||||
|
"MeditationResult": {
|
||||||
|
"breath_relax": "Respira y Relájate",
|
||||||
|
"breath_in": "Inhalar",
|
||||||
|
"breath_out": "Exhalar"
|
||||||
|
},
|
||||||
|
"ActionFieldsForm": {
|
||||||
|
"required_field": "Este campo es obligatorio"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ReactNode, useMemo } from "react";
|
import { ReactNode, useCallback, useMemo } from "react";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
import { Button, Typography } from "@/components/ui";
|
import { Button, Typography } from "@/components/ui";
|
||||||
@ -22,6 +22,24 @@ export default function SubscriptionTable({ subscription }: ITableProps) {
|
|||||||
const t = useTranslations("Subscriptions");
|
const t = useTranslations("Subscriptions");
|
||||||
const { open } = useCancelSubscriptionModal();
|
const { open } = useCancelSubscriptionModal();
|
||||||
|
|
||||||
|
const getSubscriptionStatusText = useCallback(() => {
|
||||||
|
if (subscription.subscriptionStatus === "CANCELLED") {
|
||||||
|
if (subscription.cancellationDate) {
|
||||||
|
const formattedDate = formatDate(subscription.cancellationDate);
|
||||||
|
if (formattedDate) {
|
||||||
|
return t(
|
||||||
|
`table.subscription_status_value.${subscription.subscriptionStatus}`,
|
||||||
|
{
|
||||||
|
date: formattedDate,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "Cancelled";
|
||||||
|
}
|
||||||
|
return t(`table.subscription_status_value.${subscription.subscriptionStatus}`);
|
||||||
|
}, [subscription.subscriptionStatus, subscription.cancellationDate, t]);
|
||||||
|
|
||||||
const tableData: ReactNode[][] = useMemo(() => {
|
const tableData: ReactNode[][] = useMemo(() => {
|
||||||
const data: ReactNode[][] = [
|
const data: ReactNode[][] = [
|
||||||
[
|
[
|
||||||
@ -30,16 +48,7 @@ export default function SubscriptionTable({ subscription }: ITableProps) {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
t("table.subscription_status"),
|
t("table.subscription_status"),
|
||||||
subscription.subscriptionStatus === "CANCELLED" && subscription.cancellationDate
|
getSubscriptionStatusText(),
|
||||||
? t(
|
|
||||||
`table.subscription_status_value.${subscription.subscriptionStatus}`,
|
|
||||||
{
|
|
||||||
date: formatDate(subscription.cancellationDate) as string,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
: subscription.subscriptionStatus === "CANCELLED"
|
|
||||||
? "Cancelled"
|
|
||||||
: t(`table.subscription_status_value.${subscription.subscriptionStatus}`),
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
t("table.billing_period"),
|
t("table.billing_period"),
|
||||||
@ -71,7 +80,7 @@ export default function SubscriptionTable({ subscription }: ITableProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}, [subscription, t, open]);
|
}, [subscription, t, open, getSubscriptionStatusText]);
|
||||||
|
|
||||||
return <Table data={tableData} />;
|
return <Table data={tableData} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { defineRouting } from "next-intl/routing";
|
|||||||
|
|
||||||
export const routing = defineRouting({
|
export const routing = defineRouting({
|
||||||
// A list of all locales that are supported
|
// A list of all locales that are supported
|
||||||
locales: ["en", "de"],
|
locales: ["en", "de", "es"],
|
||||||
|
|
||||||
// Used when no locale matches
|
// Used when no locale matches
|
||||||
defaultLocale: "en",
|
defaultLocale: "en",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user