From 70bde7b7427b914c2483b6475fa32c95621029bb Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Mon, 5 Dec 2022 19:45:02 +0800 Subject: [PATCH] update: fix register limit language --- app/Http/Controllers/Passport/AuthController.php | 4 +++- resources/lang/en-US.json | 2 +- resources/lang/zh-CN.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Passport/AuthController.php b/app/Http/Controllers/Passport/AuthController.php index 2f89f295..7df442b7 100644 --- a/app/Http/Controllers/Passport/AuthController.php +++ b/app/Http/Controllers/Passport/AuthController.php @@ -77,7 +77,9 @@ class AuthController extends Controller if ((int)config('v2board.register_limit_by_ip_enable', 0)) { $registerCountByIP = Cache::get(CacheKey::get('REGISTER_IP_RATE_LIMIT', $request->ip())) ?? 0; if ((int)$registerCountByIP >= (int)config('v2board.register_limit_count', 3)) { - abort(500, __('Register frequently, please try again after 1 hour')); + abort(500, __('Register frequently, please try again after :minute minute', [ + 'minute' => config('v2board.register_limit_expire', 60) + ])); } } if ((int)config('v2board.recaptcha_enable', 0)) { diff --git a/resources/lang/en-US.json b/resources/lang/en-US.json index 38d275f6..3de90f08 100644 --- a/resources/lang/en-US.json +++ b/resources/lang/en-US.json @@ -88,7 +88,7 @@ "The coupon can only be used :limit_use_with_user per person": "The coupon can only be used :limit_use_with_user per person", "The coupon code cannot be used for this period": "The coupon code cannot be used for this period", "Request failed, please try again later": "Request failed, please try again later", - "Register frequently, please try again after 1 hour": "Register frequently, please try again after 1 hour", + "Register frequently, please try again after :minute minute": "Register frequently, please try again after :minute minute", "Uh-oh, we've had some problems, we're working on it.": "Uh-oh, we've had some problems, we're working on it", "This subscription reset package does not apply to your subscription": "This subscription reset package does not apply to your subscription", "Login to :name": "Login to :name", diff --git a/resources/lang/zh-CN.json b/resources/lang/zh-CN.json index a9e4c50c..ac75657a 100644 --- a/resources/lang/zh-CN.json +++ b/resources/lang/zh-CN.json @@ -88,7 +88,7 @@ "The coupon can only be used :limit_use_with_user per person": "该优惠券每人只能用 :limit_use_with_user 次", "The coupon code cannot be used for this period": "此优惠券无法用于该付款周期", "Request failed, please try again later": "请求失败,请稍后再试", - "Register frequently, please try again after 1 hour": "注册频繁,请等待1小时后再次尝试", + "Register frequently, please try again after :minute minute": "注册频繁,请等待 :minute 分钟后再次尝试", "Uh-oh, we've had some problems, we're working on it.": "遇到了些问题,我们正在进行处理", "This subscription reset package does not apply to your subscription": "该订阅重置包不适用于你的订阅", "Login to :name": "登入到 :name",