From 29f9aaae8c248649d8db1e344b8ee23e80848a34 Mon Sep 17 00:00:00 2001 From: EUForest Date: Sat, 10 Jan 2026 12:45:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Invalid=20redemption=20co?= =?UTF-8?q?de=20prompts=20system=20error=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/user/public/assets/locales/en-US/components.json | 1 + apps/user/public/assets/locales/zh-CN/components.json | 1 + packages/ui/src/lib/request.ts | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/apps/user/public/assets/locales/en-US/components.json b/apps/user/public/assets/locales/en-US/components.json index c473195..7afc77c 100644 --- a/apps/user/public/assets/locales/en-US/components.json +++ b/apps/user/public/assets/locales/en-US/components.json @@ -41,6 +41,7 @@ "50001": "Corresponding coupon information not found, please check and try again.", "50002": "The coupon has been used, cannot be used again.", "50003": "This coupon code is not supported by the current purchase plan.", + "50004": "Coupon has insufficient remaining uses.", "60001": "Subscription has expired, please renew before using.", "60002": "Unable to use the subscription at the moment, please try again later.", "60003": "An existing subscription is detected. Please cancel it before proceeding.", diff --git a/apps/user/public/assets/locales/zh-CN/components.json b/apps/user/public/assets/locales/zh-CN/components.json index 3c1b2be..41a7969 100644 --- a/apps/user/public/assets/locales/zh-CN/components.json +++ b/apps/user/public/assets/locales/zh-CN/components.json @@ -41,6 +41,7 @@ "50001": "找不到对应的优惠券信息,请检查后重试。", "50002": "该优惠券已被使用,无法再次使用。", "50003": "该优惠码不被当前购买套餐支持。", + "50004": "优惠券使用次数不足。", "60001": "订阅已过期,请续费后使用。", "60002": "暂时无法使用该订阅,请稍后再试。", "60003": "检测到现有订阅,请先取消后再继续。", diff --git a/packages/ui/src/lib/request.ts b/packages/ui/src/lib/request.ts index af2586d..0616b9c 100644 --- a/packages/ui/src/lib/request.ts +++ b/packages/ui/src/lib/request.ts @@ -123,6 +123,10 @@ function handleError(response: { "components:error.50003", "This coupon code is not supported by the current purchase plan." ), + 50004: t( + "components:error.50004", + "Coupon has insufficient remaining uses." + ), 60001: t( "components:error.60001", "Subscription has expired, please renew before using."