diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf index fbf9b260b05c..68c44213d18c 100644 --- a/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf +++ b/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf @@ -8,7 +8,7 @@ Authentication credentials could not be found. - Yetkilendirme girdileri bulunamadı. + Kimlik bilgileri bulunamadı. Authentication request could not be processed due to a system problem. @@ -16,7 +16,7 @@ Invalid credentials. - Geçersiz girdiler. + Geçersiz kimlik bilgileri. Cookie has already been used by someone else. @@ -32,7 +32,7 @@ Digest nonce has expired. - Derleme zaman aşımı gerçekleşti. + Derleme zaman aşımına uğradı. No authentication provider found to support the authentication token. @@ -44,7 +44,7 @@ No token could be found. - Bilet bulunamadı. + Fiş bulunamadı. Username could not be found. @@ -56,11 +56,11 @@ Credentials have expired. - Girdiler zaman aşımına uğradı. + Kimlik bilgileri zaman aşımına uğradı. Account is disabled. - Hesap devre dışı bırakılmış. + Hesap engellenmiş. Account is locked. diff --git a/src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php b/src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php new file mode 100644 index 000000000000..4b72d41d5a5e --- /dev/null +++ b/src/Symfony/Component/Security/Tests/TranslationSyncStatusTest.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Tests; + +use Symfony\Component\Finder\Finder; + +class TranslationSyncStatusTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getTranslationDirectoriesData + */ + public function testTranslationFileIsNotMissingInCore($dir1, $dir2) + { + $finder = new Finder(); + $files = $finder->in($dir1)->files(); + + foreach ($files as $file) { + $this->assertFileExists($dir2.'/'.$file->getFilename(), 'Missing file '.$file->getFilename().' in directory '.$dir2); + } + } + + public function getTranslationDirectoriesData() + { + $legacyTranslationsDir = $this->getLegacyTranslationsDirectory(); + $coreTranslationsDir = $this->getCoreTranslationsDirectory(); + + return array( + 'file-not-missing-in-core' => array($legacyTranslationsDir, $coreTranslationsDir), + 'file-not-added-in-core' => array($coreTranslationsDir, $legacyTranslationsDir), + ); + } + + public function testFileContentsAreEqual() + { + $finder = new Finder(); + $files = $finder->in($this->getLegacyTranslationsDirectory())->files(); + + foreach ($files as $file) { + $coreFile = $this->getCoreTranslationsDirectory().'/'.$file->getFilename(); + + $this->assertFileEquals($file->getRealPath(), $coreFile, $file.' and '.$coreFile.' have equal content.'); + } + } + + private function getLegacyTranslationsDirectory() + { + return __DIR__.'/../Resources/translations'; + } + + private function getCoreTranslationsDirectory() + { + return __DIR__.'/../Core/Resources/translations'; + } +} diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json index 1f0584467ec4..826dcebb3778 100644 --- a/src/Symfony/Component/Security/composer.json +++ b/src/Symfony/Component/Security/composer.json @@ -28,6 +28,7 @@ "symfony/security-http": "self.version" }, "require-dev": { + "symfony/finder": "~2.3", "symfony/phpunit-bridge": "~2.7", "symfony/intl": "~2.3", "symfony/routing": "~2.2", diff --git a/src/Symfony/Component/Security/phpunit.xml.dist b/src/Symfony/Component/Security/phpunit.xml.dist index 7747b371c171..3e7ec385260e 100644 --- a/src/Symfony/Component/Security/phpunit.xml.dist +++ b/src/Symfony/Component/Security/phpunit.xml.dist @@ -12,6 +12,7 @@ + ./Tests/ ./Acl/Tests/ ./Core/Tests/ ./Http/Tests/ @@ -23,6 +24,7 @@ ./ ./vendor + ./Tests ./Acl/Tests ./Core/Tests ./Http/Tests