summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Core/Resources/translations/security.tr.xlf12
-rw-r--r--Tests/TranslationSyncStatusTest.php63
-rw-r--r--composer.json1
-rw-r--r--phpunit.xml.dist2
4 files changed, 72 insertions, 6 deletions
diff --git a/Core/Resources/translations/security.tr.xlf b/Core/Resources/translations/security.tr.xlf
index fbf9b26..68c4421 100644
--- a/Core/Resources/translations/security.tr.xlf
+++ b/Core/Resources/translations/security.tr.xlf
@@ -8,7 +8,7 @@
</trans-unit>
<trans-unit id="2">
<source>Authentication credentials could not be found.</source>
- <target>Yetkilendirme girdileri bulunamadı.</target>
+ <target>Kimlik bilgileri bulunamadı.</target>
</trans-unit>
<trans-unit id="3">
<source>Authentication request could not be processed due to a system problem.</source>
@@ -16,7 +16,7 @@
</trans-unit>
<trans-unit id="4">
<source>Invalid credentials.</source>
- <target>Geçersiz girdiler.</target>
+ <target>Geçersiz kimlik bilgileri.</target>
</trans-unit>
<trans-unit id="5">
<source>Cookie has already been used by someone else.</source>
@@ -32,7 +32,7 @@
</trans-unit>
<trans-unit id="8">
<source>Digest nonce has expired.</source>
- <target>Derleme zaman aşımı gerçekleşti.</target>
+ <target>Derleme zaman aşımına uğradı.</target>
</trans-unit>
<trans-unit id="9">
<source>No authentication provider found to support the authentication token.</source>
@@ -44,7 +44,7 @@
</trans-unit>
<trans-unit id="11">
<source>No token could be found.</source>
- <target>Bilet bulunamadı.</target>
+ <target>Fiş bulunamadı.</target>
</trans-unit>
<trans-unit id="12">
<source>Username could not be found.</source>
@@ -56,11 +56,11 @@
</trans-unit>
<trans-unit id="14">
<source>Credentials have expired.</source>
- <target>Girdiler zaman aşımına uğradı.</target>
+ <target>Kimlik bilgileri zaman aşımına uğradı.</target>
</trans-unit>
<trans-unit id="15">
<source>Account is disabled.</source>
- <target>Hesap devre dışı bırakılmış.</target>
+ <target>Hesap engellenmiş.</target>
</trans-unit>
<trans-unit id="16">
<source>Account is locked.</source>
diff --git a/Tests/TranslationSyncStatusTest.php b/Tests/TranslationSyncStatusTest.php
new file mode 100644
index 0000000..4b72d41
--- /dev/null
+++ b/Tests/TranslationSyncStatusTest.php
@@ -0,0 +1,63 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * 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/composer.json b/composer.json
index 1f05844..826dceb 100644
--- a/composer.json
+++ b/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/phpunit.xml.dist b/phpunit.xml.dist
index 7747b37..3e7ec38 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -12,6 +12,7 @@
<testsuites>
<testsuite name="Symfony Security Component Test Suite">
+ <directory>./Tests/</directory>
<directory>./Acl/Tests/</directory>
<directory>./Core/Tests/</directory>
<directory>./Http/Tests/</directory>
@@ -23,6 +24,7 @@
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
+ <directory>./Tests</directory>
<directory>./Acl/Tests</directory>
<directory>./Core/Tests</directory>
<directory>./Http/Tests</directory>