From 10c7e2f55a495c01df605968499871b64a0eedc6 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 6 Jun 2024 22:13:59 +0530 Subject: [PATCH] Text change --- classes/controller/FrontController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index 47b0eb0b9..f89e481b9 100644 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -828,7 +828,7 @@ class FrontControllerCore extends Controller if ($minutesLeft > 1) { $this->errors[] = Tools::displayError(sprintf('You have reached the limit of login attempts, please try after %d minutes.', $minutesLeft)); } elseif ($minutesLeft == 1) { - $this->errors[] = Tools::displayError(sprintf('You have reached the limit of login attempts, please try after 1 minute.', $minutesLeft)); + $this->errors[] = Tools::displayError(sprintf('You have reached the limit of login attempts, please try after %d minute.', $minutesLeft)); } } } @@ -887,7 +887,11 @@ class FrontControllerCore extends Controller $this->errors[] = Tools::displayError(sprintf('%d attempt left.', ($maxAttempts - $attemptsCount - 1))); } } else { - $this->errors[] = Tools::displayError(sprintf('You have reached the limit of login attempts, please try after %d minutes.', MaintenanceAccess::LOGIN_ATTEMPTS_WINDOW)); + if (MaintenanceAccess::LOGIN_ATTEMPTS_WINDOW > 1) { + $this->errors[] = Tools::displayError(sprintf('You have reached the limit of login attempts, please try after %d minutes.', MaintenanceAccess::LOGIN_ATTEMPTS_WINDOW)); + } else { + $this->errors[] = Tools::displayError(sprintf('You have reached the limit of login attempts, please try after %d minute.', MaintenanceAccess::LOGIN_ATTEMPTS_WINDOW)); + } } } }