Compare commits

...

2 Commits

Author SHA1 Message Date
Dhruwang 02e1f51678 fix: i18n strings 2026-05-20 18:51:28 +05:30
Dhruwang 4c538d3fca fix: render scheduled-plan-change description placeholders correctly
The pending plan change Alert was rendering literal "{plan}" and "{date}"
in the UI because the .replace() calls in pricing-table.tsx looked for
double-braced "{{plan}}" / "{{date}}" while the locale strings used
single braces.

Switch to idiomatic i18next interpolation: pass the values into t() and
update all 15 locale strings to use the {{plan}} / {{date}} placeholders
i18next expects. No more manual string surgery.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 18:37:51 +05:30
2 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -2429,7 +2429,7 @@
"most_popular": "Самый популярный",
"pending_change_removed": "Запланированное изменение тарифа отменено.",
"pending_plan_badge": "Запланирован",
"pending_plan_change_description": "Твой тариф сменится на {plan} {date}.",
"pending_plan_change_description": "Твой тариф сменится на {plan} на {date}.",
"pending_plan_change_title": "Запланированное изменение тарифа",
"pending_plan_cta": "Запланирован",
"per_month": "в месяц",
@@ -436,17 +436,15 @@ export const PricingTable = ({
<Alert variant="info" className="max-w-4xl">
<AlertTitle>{t("workspace.settings.billing.pending_plan_change_title")}</AlertTitle>
<AlertDescription>
{t("workspace.settings.billing.pending_plan_change_description")
.replace("{{plan}}", getCurrentCloudPlanLabel(pendingChange.targetPlan, t))
.replace(
"{{date}}",
formatDateForDisplay(new Date(pendingChange.effectiveAt), locale, {
year: "numeric",
month: "short",
day: "numeric",
timeZone: "UTC",
})
)}
{t("workspace.settings.billing.pending_plan_change_description", {
plan: getCurrentCloudPlanLabel(pendingChange.targetPlan, t),
date: formatDateForDisplay(new Date(pendingChange.effectiveAt), locale, {
year: "numeric",
month: "short",
day: "numeric",
timeZone: "UTC",
}),
})}
</AlertDescription>
{hasBillingRights && (
<AlertButton onClick={() => void undoPendingChange()} loading={isPlanActionPending === "undo"}>