Skip to content

Commit

Permalink
Added localized strings for the description of each \Slim\Exception\H…
Browse files Browse the repository at this point in the history
…ttp*Exception class
  • Loading branch information
rotimi committed Feb 24, 2025
1 parent 6736c45 commit 0dec1a1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/languages/en_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@
'default_application_error_title_text' => "SlimPHP 4 Skeleton MVC App Error",
'default_application_error_title_description' => "A website error has occurred. Sorry for the temporary inconvenience.",
'default_application_error_title_detailed_description' => "The application could not run because of the following error",

\Slim\Exception\HttpBadRequestException::class . '_description' => "The server cannot or will not process the request due to an apparent client error.",
\Slim\Exception\HttpForbiddenException::class . '_description' => "You are not permitted to perform the requested operation.",
\Slim\Exception\HttpGoneException::class . '_description' => "The target resource is no longer available at the origin server.",
\Slim\Exception\HttpInternalServerErrorException::class . '_description' => "Unexpected condition encountered preventing server from fulfilling request.",
\Slim\Exception\HttpMethodNotAllowedException::class . '_description' => "The request method is not supported for the requested resource.",
\Slim\Exception\HttpNotFoundException::class . '_description' => "The requested resource could not be found. Please verify the URI and try again.",
\Slim\Exception\HttpNotImplementedException::class . '_description' => "The server does not support the functionality required to fulfill the request.",
\Slim\Exception\HttpTooManyRequestsException::class . '_description' => "The client application has surpassed its rate limit, or number of requests they can send in a given period of time.",
\Slim\Exception\HttpUnauthorizedException::class . '_description' => "The request requires valid user authentication.",
];
10 changes: 10 additions & 0 deletions config/languages/fr_CA.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@
'default_application_error_title_text' => "Erreur de l'application SlimPHP 4 Skeleton MVC",
'default_application_error_title_description' => "Une erreur du site Web s'est produite. Désolé pour le désagrément temporaire.",
'default_application_error_title_detailed_description' => "L'application n'a pas pu s'exécuter en raison de l'erreur suivante",

\Slim\Exception\HttpBadRequestException::class . '_description' => "Le serveur ne peut pas ou ne veut pas traiter la demande en raison d'une erreur client apparente.",
\Slim\Exception\HttpForbiddenException::class . '_description' => "Vous n'êtes pas autorisé à effectuer l'opération demandée.",
\Slim\Exception\HttpGoneException::class . '_description' => "La ressource cible n'est plus disponible sur le serveur d'origine.",
\Slim\Exception\HttpInternalServerErrorException::class . '_description' => "Une condition inattendue s'est produite empêchant le serveur de répondre à la demande.",
\Slim\Exception\HttpMethodNotAllowedException::class . '_description' => "La méthode de requête n'est pas prise en charge pour la ressource demandée.",
\Slim\Exception\HttpNotFoundException::class . '_description' => "La ressource demandée est introuvable. Veuillez vérifier l'URI et réessayer.",
\Slim\Exception\HttpNotImplementedException::class . '_description' => "Le serveur ne prend pas en charge les fonctionnalités requises pour répondre à la demande.",
\Slim\Exception\HttpTooManyRequestsException::class . '_description' => "L'application client a dépassé sa limite de débit, ou le nombre de requêtes qu'elle peut envoyer au cours d'une période de temps donnée.",
\Slim\Exception\HttpUnauthorizedException::class . '_description' => "La demande nécessite une authentification utilisateur valide.",
];

0 comments on commit 0dec1a1

Please sign in to comment.