From 0ce74ea5fb7efad60bb78b56a0bf6518fecb88d8 Mon Sep 17 00:00:00 2001 From: Fringg Date: Sat, 7 Mar 2026 13:22:08 +0300 Subject: [PATCH] fix: rename duplicate 'purchases' i18n key to 'purchaseCount' The admin.landings namespace had two 'purchases' keys at the same level: a string for purchase count label and an object for purchases section. JSON last-key-wins caused the string to be overwritten by the object, producing "returned an object instead of string" error on landings list. --- src/locales/en.json | 2 +- src/locales/fa.json | 2 +- src/locales/ru.json | 2 +- src/locales/zh.json | 2 +- src/pages/AdminLandings.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index b24bf13..83e5890 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -3192,7 +3192,7 @@ "metaDesc": "Meta Description", "active": "Active", "inactive": "Inactive", - "purchases": "purchases", + "purchaseCount": "purchases", "copyUrl": "Copy URL", "urlCopied": "URL copied", "deleteConfirm": "Delete landing \"{{title}}\"?", diff --git a/src/locales/fa.json b/src/locales/fa.json index 3cda2af..f6c21df 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -2917,7 +2917,7 @@ "metaDesc": "توضیحات متا", "active": "فعال", "inactive": "غیرفعال", - "purchases": "خرید", + "purchaseCount": "خرید", "copyUrl": "کپی URL", "urlCopied": "URL کپی شد", "deleteConfirm": "حذف صفحه فرود «{{title}}»؟", diff --git a/src/locales/ru.json b/src/locales/ru.json index a899ce6..9fde123 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -3743,7 +3743,7 @@ "metaDesc": "Meta Description", "active": "Активен", "inactive": "Неактивен", - "purchases": "покупок", + "purchaseCount": "покупок", "copyUrl": "Скопировать URL", "urlCopied": "URL скопирован", "deleteConfirm": "Удалить лендинг «{{title}}»?", diff --git a/src/locales/zh.json b/src/locales/zh.json index d6560b1..1213972 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -2916,7 +2916,7 @@ "metaDesc": "Meta描述", "active": "已激活", "inactive": "未激活", - "purchases": "次购买", + "purchaseCount": "次购买", "copyUrl": "复制URL", "urlCopied": "URL已复制", "deleteConfirm": "删除落地页「{{title}}」?", diff --git a/src/pages/AdminLandings.tsx b/src/pages/AdminLandings.tsx index 578398d..568e9b7 100644 --- a/src/pages/AdminLandings.tsx +++ b/src/pages/AdminLandings.tsx @@ -180,7 +180,7 @@ function SortableLandingCard({
- {landing.purchase_stats.total} {t('admin.landings.purchases')} + {landing.purchase_stats.total} {t('admin.landings.purchaseCount')}