diff --git a/application/Espo/Core/Authentication/Authentication.php b/application/Espo/Core/Authentication/Authentication.php index eccda910bd..94ba6062eb 100644 --- a/application/Espo/Core/Authentication/Authentication.php +++ b/application/Espo/Core/Authentication/Authentication.php @@ -29,10 +29,9 @@ namespace Espo\Core\Authentication; - use Espo\Core\Exceptions\Forbidden; use Espo\Core\Exceptions\NotFound; -use Espo\Core\Utils\Language; +use Espo\Core\Utils\Language\LanguageProxy; use Espo\Repositories\UserData as UserDataRepository; use Espo\Entities\Portal; use Espo\Entities\User; @@ -89,7 +88,7 @@ class Authentication private LogoutFactory $logoutFactory, private MethodProvider $methodProvider, private Util $util, - private Language $language + private LanguageProxy $language ) {} /** diff --git a/application/Espo/Core/Utils/Language/LanguageProxy.php b/application/Espo/Core/Utils/Language/LanguageProxy.php new file mode 100644 index 0000000000..9861f8d125 --- /dev/null +++ b/application/Espo/Core/Utils/Language/LanguageProxy.php @@ -0,0 +1,55 @@ +container + ->getByClass(Language::class) + ->translateLabel($label, $category, $scope); + } +}