Merge pull request #68 from pennyteenycat/develop

fix text
This commit is contained in:
pennyteenycat 2025-10-19 02:28:11 +02:00 committed by GitHub
commit ff5f022cf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 53 additions and 216 deletions

View File

@ -401,210 +401,6 @@
"pricing-summary-trial-description": "You will be charged only {totalToday} for your {trialDuration}-day trial. Subscription renews automatically until cancelled. You can cancel at any time before the end of the trial.",
"reserved-for": "Reserved for {time}"
}
},
"v2": {
"Landing": {
"header-timer": {
"title": "Reserved for {time}"
},
"header": {
"title": "Special Offer!",
"description": "Everything is free, trial period included!"
},
"hi-block": {
"title": "Hello, Sunshine 👋",
"description": "Your well-being and happiness are our top priority!",
"card": {
"title": "That's why we've decided to give you a personalised plan and access to a trial version of our app for FREE!",
"image-description": "soulmate portraits delivered today",
"count": "900+"
}
},
"what-get": {
"title": "What you will receive:",
"detailed-portrait": {
"header": {
"title": "A detailed portrait of your other half is ready"
}
},
"guide": {
"header": {
"title": "Guide “Finding the One”"
},
"list": {
"1": "Why love doesn't come - and how to open the way to it",
"2": "7 signs that you have met your soulmate",
"3": "The main secret of couples who stay together",
"4": "Mistakes that destroy even the strongest feelings",
"5": "5 habits that make relationships happy"
}
},
"individual-advice": {
"header": {
"title": "Personalized advice from a personal relationship psychologist"
},
"messages": {
"me": {
"text": "Why do I still doubt whether he loves me?",
"time": "16:38 AM"
},
"advisor": {
"text": "Because you feel that the connection is special. Fate was right—you are reflections of each other.",
"time": "16:39 AM"
}
},
"typing": "typing "
},
"search-compatible-partner": {
"header": {
"title": "Search for the most compatible partner"
},
"content": {
"partner-name": "Your significant other",
"percent": "97%",
"compatibility": "Compatibility",
"bars": {
"1": {
"percent": "92",
"text": "Love",
"colors": {
"path": "#FD4B4B",
"trail": "#FCE7F3"
}
},
"2": {
"percent": "88",
"text": "Sex",
"colors": {
"path": "#8B5CF6",
"trail": "#EDE9FE"
}
},
"3": {
"percent": "79",
"text": "Family",
"colors": {
"path": "#4F46E5",
"trail": "##EEF2FF"
}
}
}
}
}
},
"special-offer": {
"title": "Special price",
"prices": {
"old-price": {
"description": "Regular price"
},
"new-price": {
"description": "Today"
}
},
"trial-offer": {
"title": "DOUBLED!",
"description": "Full access to all materials"
}
},
"plan-also-includes": {
"title": "Your plan also includes:",
"list": {
"items": {
"1": {
"title": "Чат с экспертом",
"text": "Задай свой вопрос и получи первый совет уже сегодня."
},
"2": {
"title": "Анализ совместимости",
"text": "Пойми, почему вы притягиваетесь друг к другу - и какие различия могут мешать гармонии."
},
"3": {
"title": "Как говорить о чувствах и быть понятым",
"text": "Пошаговый гайд, который поможет восстановить близость и искреннее общение."
},
"4": {
"title": "Медитации и аффирмации для сердца",
"text": "Практики, которые открывают внутреннюю уверенность и притягивают любовь."
}
}
}
},
"reviews": {
"title": "What our users say:",
"items": {
"1": {
"username": "@anna.smith28",
"flag": "🇺🇸",
"text": "The drawing was made before we met, and it matched down to the smallest detail: the same gaze, the same mole. We simply couldn't believe it! Now the portrait hangs in our home as a sign of destiny.",
"answer": {
"title": "Response from the support team",
"text": "Anna, it's just the magic of fate! We are very happy that your portrait has become part of your love story. May it remind you how important it is to believe in the signs of the universe 🌹"
}
},
"2": {
"username": "@mike.andrews_89",
"flag": "🇺🇸",
"text": "I decided to check whether my wife was truly my other half. The portrait matched her down to the last detail—the same gaze, the same energy. We both felt as if fate had just confirmed our union.",
"answer": {
"title": "Response from the support team",
"text": "That's amazing! Stories like this prove that true love really does have an impact on an energetic level. May your portrait preserve the warmth of your connection for many years to come!"
}
},
"3": {
"username": "@emily.harris_ang...",
"flag": "🇬🇧",
"text": "The “Finding the One” guide changed my life! The portrait was 100% accurate, and I met my love in a museum, just as predicted! ✨",
"answer": {
"title": "Response from the support team",
"text": "Elena, your story inspires us! Thank you for sharing your success. May your love be strong and long-lasting!"
}
}
}
},
"statistics": {
"title": "899,247",
"description": "People have already found love",
"more-avatars": "+2K",
"period-statistics": {
"month": {
"title": "54K",
"text": "Per month"
},
"today": {
"title": "2K",
"text": "Today"
}
}
},
"real-time-activity": {
"title": "Real-time activity",
"text": "<bold>@elena_art</bold> received a portrait",
"time": "2 мин назад"
},
"money-back-guarantee": {
"title": "100% Money Back Guarantee",
"term": "30 DAYS",
"description": "We are confident that we can help you gain a deeper understanding of your partner and show you what they are really like. After receiving excellent customer reviews, <bold>we are ready to give you a 100% refund</bold> if this report and portrait are not useful to you.",
"footer": "Без вопросов. Без риска."
},
"guaranteed-security-payments": "Guaranteed security payments",
"button-continue": "CONTINUE"
},
"SpecialOffer": {
"title": "Special Offer!",
"start-trial": "Start your {days}-day trial",
"cancel-anytime": "No pressure. Cancel anytime",
"policy": "By continuing you agree that if you don't cancel prior to the end of the {days}-days trial, you will automatically be charged {price} every {billingPeriod} until you cancel in settings. Learn more about cancellation and <refundLink>Refund policy</refundLink> in <subscriptionLink>Subscription terms</subscriptionLink>",
"button-continue": "CONTINUE",
"pricing-summary-total-today": "Total today:",
"pricing-summary-code-applied": "Code applied!",
"pricing-summary-cost-after-trial": "Your cost per 2 weeks after trial",
"pricing-summary-trial-description": "You will be charged only {trialPrice} for your {trialPeriod} trial. Your plan will then cost {price} per {billingPeriod}. Subscription renews automatically until cancelled. You can cancel at any time before the end of the trial.",
"reserved-for": "Reserved for {time}",
"save-every-period": "Save {price} every period",
"cost-for-one-day": "Your cost for one day after the trial is {cost}"
}
}
},
"Soulmate": {
@ -718,20 +514,20 @@
"list": {
"items": {
"1": {
"title": "Чат с экспертом",
"text": "Задай свой вопрос и получи первый совет уже сегодня."
"title": "Chat with an expert",
"text": "Ask your question and get your first piece of advice today."
},
"2": {
"title": "Анализ совместимости",
"text": "Пойми, почему вы притягиваетесь друг к другу - и какие различия могут мешать гармонии."
"title": "Compatibility analysis",
"text": "Understand what draws you to each other — and which differences may affect your harmony."
},
"3": {
"title": "Как говорить о чувствах и быть понятым",
"text": "Пошаговый гайд, который поможет восстановить близость и искреннее общение."
"title": "How to talk about feelings and be understood",
"text": "A step-by-step guide to help you restore closeness and genuine communication."
},
"4": {
"title": "Медитации и аффирмации для сердца",
"text": "Практики, которые открывают внутреннюю уверенность и притягивают любовь."
"title": "Heart-centered meditations and affirmations",
"text": "Practices that unlock inner confidence and attract love."
}
}
}
@ -792,7 +588,7 @@
"title": "100% Money Back Guarantee",
"term": "30 DAYS",
"description": "We are confident that we can help you gain a deeper understanding of your partner and show you what they are really like. After receiving excellent customer reviews, <bold>we are ready to give you a 100% refund</bold> if this report and portrait are not useful to you.",
"footer": "Без вопросов. Без риска."
"footer": "No questions. No risk."
},
"guaranteed-security-payments": "Guaranteed security payments",
"button-continue": "CONTINUE"

View File

@ -3,6 +3,7 @@ import clsx from "clsx";
import { Typography } from "@/components/ui";
import { translatePathEmailMarketingSoulmateV1 } from "@/shared/constants/translate";
import { calculatePricePerDay } from "@/shared/utils/period-conversion";
import { getPeriodTextServer } from "@/shared/utils/period-server";
import { getFormattedPrice } from "@/shared/utils/price";
import { Currency } from "@/types";
@ -51,7 +52,7 @@ export default async function PricingSummary({
</span>
<div className={styles.prices}>
<span className={styles.oldPrice}>
{getFormattedPrice(Number(trialPrice), currency)}
{getFormattedPrice(Number(price), currency)}
</span>
<span className={styles.price}>
{getFormattedPrice(Number(trialPrice), currency)}
@ -61,7 +62,10 @@ export default async function PricingSummary({
<Typography as="p" align="left" className={styles.description}>
{t("cost-for-one-day", {
cost: getFormattedPrice(price / billingInterval, currency),
cost: getFormattedPrice(
calculatePricePerDay(price, billingInterval, billingPeriod),
currency
),
})}
</Typography>
</div>

View File

@ -36,7 +36,7 @@ export default async function SpecialOffer({
{t("title")}
</Typography>
<Prices
oldPrice={1499}
oldPrice={variant.price}
newPrice={variant?.trialPrice || 0}
currency={currency}
/>

View File

@ -0,0 +1,37 @@
import { PeriodType } from "@/types/period";
/**
* Converts a period to total number of days
* @param interval - Number of periods (e.g., 2 weeks = interval 2)
* @param period - Type of period (DAY, WEEK, MONTH, YEAR)
* @returns Total number of days
*/
export function convertPeriodToDays(
interval: number,
period: PeriodType
): number {
const daysPerPeriod: Record<PeriodType, number> = {
DAY: 1,
WEEK: 7,
MONTH: 30, // Average month length
YEAR: 365,
};
return interval * daysPerPeriod[period];
}
/**
* Calculates price per day based on total price and billing period
* @param price - Total price for the period
* @param interval - Number of periods
* @param period - Type of period
* @returns Price per one day
*/
export function calculatePricePerDay(
price: number,
interval: number,
period: PeriodType
): number {
const totalDays = convertPeriodToDays(interval, period);
return price / totalDays;
}