bug #16146 [Security] sync translations and add a test for it (xabbuh)
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] sync translations and add a test for it
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15955
| License | MIT
| Doc PR |
Commits
-------
08333ec
[Security] sync translations and add a test for it
This commit is contained in:
commit
dd385402ec
@ -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>
|
||||
|
@ -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';
|
||||
}
|
||||
}
|
@ -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",
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user