From 1ed07a09d89318ec46c7d4c335ccfa0fbe61af3f Mon Sep 17 00:00:00 2001 From: "maxime.steinhausser" Date: Tue, 6 Oct 2015 11:27:38 +0200 Subject: [PATCH] [FrameworkBundle] [Security] Remove trans from the security/core in 2.3 & dir loading --- .../FrameworkExtension.php | 14 ++-- .../Resources/translations/security.az.xlf | 71 ------------------- .../Resources/translations/security.he.xlf | 71 ------------------- 3 files changed, 6 insertions(+), 150 deletions(-) delete mode 100644 src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf delete mode 100644 src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index ba4ac6b949..76264b3c0e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -553,16 +553,14 @@ class FrameworkExtension extends Extension if (class_exists('Symfony\Component\Security\Core\Exception\AuthenticationException')) { $r = new \ReflectionClass('Symfony\Component\Security\Core\Exception\AuthenticationException'); - // with Symfony 2.4, the Security component was split into several subpackages - // and the translations have been moved to the symfony/security-core package - $translationsDir = dirname($r->getFilename()).'/../Resources/translations'; - - if (!file_exists($translationsDir) && file_exists($dir = dirname($r->getFilename()).'/../../Resources/translations')) { + if (file_exists(dirname($r->getFilename()).'/../composer.json')) { + // with Symfony 2.4, the Security component was split into several subpackages + // and the translations have been moved to the symfony/security-core package + $dirs[] = dirname($r->getFilename()).'/../Resources/translations'; + } else { // in Symfony 2.3, translations are located in the symfony/security package - $translationsDir = $dir; + $dirs[] = dirname($r->getFilename()).'/../../Resources/translations'; } - - $dirs[] = $translationsDir; } $overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations'; foreach ($container->getParameter('kernel.bundles') as $bundle => $class) { diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf deleted file mode 100644 index a974ed0f02..0000000000 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - An authentication exception occurred. - Doğrulama istisnası baş verdi. - - - Authentication credentials could not be found. - Doğrulama məlumatları tapılmadı. - - - Authentication request could not be processed due to a system problem. - Sistem xətası səbəbilə doğrulama istəyi emal edilə bilmədi. - - - Invalid credentials. - Yanlış məlumat. - - - Cookie has already been used by someone else. - Kuki başqası tərəfindən istifadə edilib. - - - Not privileged to request the resource. - Resurs istəyi üçün imtiyaz yoxdur. - - - Invalid CSRF token. - Yanlış CSRF nişanı. - - - Digest nonce has expired. - Dərləmə istifadə müddəti bitib. - - - No authentication provider found to support the authentication token. - Doğrulama nişanını dəstəkləyəcək provayder tapılmadı. - - - No session available, it either timed out or cookies are not enabled. - Uyğun seans yoxdur, vaxtı keçib və ya kuki aktiv deyil. - - - No token could be found. - Nişan tapılmadı. - - - Username could not be found. - İstifadəçi adı tapılmadı. - - - Account has expired. - Hesabın istifadə müddəti bitib. - - - Credentials have expired. - Məlumatların istifadə müddəti bitib. - - - Account is disabled. - Hesab qeyri-aktiv edilib. - - - Account is locked. - Hesab kilitlənib. - - - - diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf deleted file mode 100644 index 3640698ce9..0000000000 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - An authentication exception occurred. - An authentication exception occurred. - - - Authentication credentials could not be found. - Authentication credentials could not be found. - - - Authentication request could not be processed due to a system problem. - Authentication request could not be processed due to a system problem. - - - Invalid credentials. - Invalid credentials. - - - Cookie has already been used by someone else. - Cookie has already been used by someone else. - - - Not privileged to request the resource. - Not privileged to request the resource. - - - Invalid CSRF token. - Invalid CSRF token. - - - Digest nonce has expired. - Digest nonce has expired. - - - No authentication provider found to support the authentication token. - No authentication provider found to support the authentication token. - - - No session available, it either timed out or cookies are not enabled. - No session available, it either timed out or cookies are not enabled. - - - No token could be found. - No token could be found. - - - Username could not be found. - Username could not be found. - - - Account has expired. - Account has expired. - - - Credentials have expired. - Credentials have expired. - - - Account is disabled. - Account is disabled. - - - Account is locked. - Account is locked. - - - -