Merge branch '3.4' into 4.2

* 3.4:
  Fix Twig 1.x compatibility
  [Translator] Improve farsi(persian) translations for Form
  Improve fa translations
  Added tests to cover the possibility of having scalars as services.
  fixed tests on old PHP versions
  [FrameworkBundle] Inform the user when save_path will be ignored
  fixed CS
  [Translator] Load plurals from po files properly
  [EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
  [Console] Update to inherit and add licence
  [Intl] Remove --dev from intl compile autoloader
  [Intl] Init compile tmp volume
  PHP 5 compat
  Add test case
  Update Request.php
  Don't assume port 0 for X-Forwarded-Port
  Load plurals from mo files properly
This commit is contained in:
Nicolas Grekas 2019-07-10 20:39:05 +02:00
commit 68d36d50ad
30 changed files with 268 additions and 134 deletions

View File

@ -479,6 +479,12 @@ class Configuration implements ConfigurationInterface
$rootNode
->children()
->arrayNode('session')
->validate()
->ifTrue(function ($v) {
return empty($v['handler_id']) && !empty($v['save_path']);
})
->thenInvalid('Session save path is ignored without a handler service')
->end()
->info('session configuration')
->canBeEnabled()
->children()
@ -504,7 +510,7 @@ class Configuration implements ConfigurationInterface
->scalarNode('gc_divisor')->end()
->scalarNode('gc_probability')->defaultValue(1)->end()
->scalarNode('gc_maxlifetime')->end()
->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end()
->scalarNode('save_path')->end()
->integerNode('metadata_update_threshold')
->defaultValue(0)
->info('seconds to wait between 2 session metadata updates')

View File

@ -809,6 +809,11 @@ class FrameworkExtension extends Extension
// session handler (the internal callback registered with PHP session management)
if (null === $config['handler_id']) {
// If the user set a save_path without using a non-default \SessionHandler, it will silently be ignored
if (isset($config['save_path'])) {
throw new LogicException('Session save path is ignored without a handler service');
}
// Set the handler class to be null
$container->getDefinition('session.storage.native')->replaceArgument(1, null);
$container->getDefinition('session.storage.php_bridge')->replaceArgument(0, null);
@ -816,6 +821,10 @@ class FrameworkExtension extends Extension
$container->setAlias('session.handler', $config['handler_id'])->setPrivate(true);
}
if (!isset($config['save_path'])) {
$config['save_path'] = ini_get('session.save_path');
}
$container->setParameter('session.save_path', $config['save_path']);
$container->setParameter('session.metadata.update_threshold', $config['metadata_update_threshold']);

View File

@ -9,6 +9,7 @@
<service id="debug.event_dispatcher" class="Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher" decorates="event_dispatcher">
<tag name="monolog.logger" channel="event" />
<tag name="kernel.reset" method="reset" />
<argument type="service" id="debug.event_dispatcher.inner" />
<argument type="service" id="debug.stopwatch" />
<argument type="service" id="logger" on-invalid="null" />

View File

@ -265,7 +265,6 @@ class ConfigurationTest extends TestCase
'cookie_httponly' => true,
'cookie_samesite' => null,
'gc_probability' => 1,
'save_path' => '%kernel.cache_dir%/sessions',
'metadata_update_threshold' => 0,
],
'request' => [

View File

@ -0,0 +1,8 @@
<?php
$container->loadFromExtension('framework', [
'session' => [
'handler_id' => null,
'save_path' => '/some/path',
],
]);

View File

@ -0,0 +1,12 @@
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
<framework:config>
<framework:session handler-id="null" save-path="/some/path"/>
</framework:config>
</container>

View File

@ -0,0 +1,4 @@
framework:
session:
handler_id: null
save_path: /some/path

View File

@ -24,6 +24,7 @@ use Symfony\Component\Cache\Adapter\DoctrineAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\ProxyAdapter;
use Symfony\Component\Cache\Adapter\RedisAdapter;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass;
@ -510,6 +511,14 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertEquals($expected, array_keys($container->getDefinition('session_listener')->getArgument(0)->getValues()));
}
/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
*/
public function testNullSessionHandlerWithSavePath()
{
$this->createContainerFromFile('session_savepath');
}
public function testRequest()
{
$container = $this->createContainerFromFile('full');

View File

@ -60,7 +60,7 @@ class ExceptionController
$exception = $this->profiler->loadProfile($token)->getCollector('exception')->getException();
$template = $this->getTemplate();
if (!$this->twig->getLoader()->exists($template)) {
if (!$this->templateExists($template)) {
$handler = new ExceptionHandler($this->debug, $this->twig->getCharset(), $this->fileLinkFormat);
return new Response($handler->getContent($exception), 200, ['Content-Type' => 'text/html']);

View File

@ -1,5 +1,14 @@
<?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\Console\CommandLoader;
use Symfony\Component\Console\Command\Command;

View File

@ -1,5 +1,14 @@
<?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\Console\CommandLoader;
use Psr\Container\ContainerInterface;

View File

@ -75,11 +75,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
* Sets style foreground color.
*
* @param string|null $color The color name
*
* @throws InvalidArgumentException When the color name isn't defined
* {@inheritdoc}
*/
public function setForeground($color = null)
{
@ -97,11 +93,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
* Sets style background color.
*
* @param string|null $color The color name
*
* @throws InvalidArgumentException When the color name isn't defined
* {@inheritdoc}
*/
public function setBackground($color = null)
{
@ -119,11 +111,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
* Sets some specific style option.
*
* @param string $option The option name
*
* @throws InvalidArgumentException When the option name isn't defined
* {@inheritdoc}
*/
public function setOption($option)
{
@ -137,11 +125,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
* Unsets some specific style option.
*
* @param string $option The option name
*
* @throws InvalidArgumentException When the option name isn't defined
* {@inheritdoc}
*/
public function unsetOption($option)
{
@ -168,11 +152,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
* Applies the style to a given text.
*
* @param string $text The text to style
*
* @return string
* {@inheritdoc}
*/
public function apply($text)
{

View File

@ -21,7 +21,7 @@ interface OutputFormatterStyleInterface
/**
* Sets style foreground color.
*
* @param string $color The color name
* @param string|null $color The color name
*/
public function setForeground($color = null);

View File

@ -38,6 +38,7 @@ use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
use Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory;
use Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy;
use Symfony\Component\DependencyInjection\TypedReference;
use Symfony\Component\ExpressionLanguage\Expression;
@ -1567,6 +1568,20 @@ class ContainerBuilderTest extends TestCase
$this->assertSame(['service_container'], array_keys($container->getDefinitions()));
}
public function testScalarService()
{
$c = new ContainerBuilder();
$c->register('foo', 'string')
->setPublic(true)
->setFactory([ScalarFactory::class, 'getSomeValue'])
;
$c->compile();
$this->assertTrue($c->has('foo'));
$this->assertSame('some value', $c->get('foo'));
}
}
class FooClass

View File

@ -295,6 +295,16 @@ class ContainerTest extends TestCase
$this->assertTrue($sc->has('foo.baz'), '->has() returns true if a get*Method() is defined');
}
public function testScalarService()
{
$c = new Container();
$c->set('foo', 'some value');
$this->assertTrue($c->has('foo'));
$this->assertSame('some value', $c->get('foo'));
}
public function testInitialized()
{
$sc = new ProjectServiceContainer();

View File

@ -31,6 +31,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
use Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory;
use Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator;
use Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber;
use Symfony\Component\DependencyInjection\TypedReference;
@ -1136,6 +1137,25 @@ class PhpDumperTest extends TestCase
$container->set('foo5', $foo5 = new \stdClass());
$this->assertSame($foo5, $locator->get('foo5'));
}
public function testScalarService()
{
$container = new ContainerBuilder();
$container->register('foo', 'string')
->setPublic(true)
->setFactory([ScalarFactory::class, 'getSomeValue'])
;
$container->compile();
$dumper = new PhpDumper($container);
eval('?>'.$dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Scalar_Service']));
$container = new \Symfony_DI_PhpDumper_Test_Scalar_Service();
$this->assertTrue($container->has('foo'));
$this->assertSame('some value', $container->get('foo'));
}
}
class Rot13EnvVarProcessor implements EnvVarProcessorInterface

View File

@ -0,0 +1,14 @@
<?php
namespace Symfony\Component\DependencyInjection\Tests\Fixtures;
final class ScalarFactory
{
/**
* @return string
*/
public static function getSomeValue()
{
return 'some value';
}
}

View File

@ -4,15 +4,15 @@
<body>
<trans-unit id="28">
<source>This form should not contain extra fields.</source>
<target>این فرم نباید فیلد اضافی داشته باشد.</target>
<target>این فرم نباید شامل فیلد اضافه ای باشد.</target>
</trans-unit>
<trans-unit id="29">
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
<target>فایل بارگذاری شده بسیار بزرگ است. لطفا فایل کوچکتری را بارگزاری کنید.</target>
<target>فایل بارگذاری شده بسیار بزرگ می باشد. لطفا فایل کوچکتری را بارگذاری نمایید.</target>
</trans-unit>
<trans-unit id="30">
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
<target>مقدار CSRF نامعتبر است. لطفا فرم را مجددا ارسال فرمایید..</target>
<target>توکن CSRF نامعتبر می باشد. لطفا فرم را مجددا ارسال نمایید.</target>
</trans-unit>
</body>
</file>

View File

@ -913,8 +913,8 @@ class Request
$pos = strrpos($host, ':');
}
if (false !== $pos) {
return (int) substr($host, $pos + 1);
if (false !== $pos && $port = substr($host, $pos + 1)) {
return (int) $port;
}
return 'https' === $this->getScheme() ? 443 : 80;

View File

@ -2303,6 +2303,18 @@ class RequestTest extends TestCase
$this->assertSame(443, $request->getPort());
}
public function testTrustedPortDoesNotDefaultToZero()
{
Request::setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_ALL);
$request = Request::create('/');
$request->server->set('REMOTE_ADDR', '1.1.1.1');
$request->headers->set('X-Forwarded-Host', 'test.example.com');
$request->headers->set('X-Forwarded-Port', '');
$this->assertSame(80, $request->getPort());
}
}
class RequestContentProxy extends Request

View File

@ -12,7 +12,7 @@
$autoload = __DIR__.'/../../vendor/autoload.php';
if (!file_exists($autoload)) {
bailout('You should run "composer install --dev" in the component before running this script.');
bailout('You should run "composer install" in the component before running this script.');
}
require_once $autoload;

View File

@ -1,8 +1,7 @@
#!/usr/bin/env bash
if [[ $1 == force ]]; then
docker pull jakzal/php-intl
fi;
[[ $1 == force ]] && docker pull jakzal/php-intl
[[ ! -d /tmp/symfony/icu ]] && mkdir -p /tmp/symfony/icu
docker run \
-it --rm --name symfony-intl \

View File

@ -111,17 +111,12 @@ class MoFileLoader extends FileLoader
$ids = ['singular' => $singularId, 'plural' => $pluralId];
$item = compact('ids', 'translated');
if (\is_array($item['translated'])) {
$messages[$item['ids']['singular']] = stripcslashes($item['translated'][0]);
if (!empty($item['ids']['singular'])) {
$id = $item['ids']['singular'];
if (isset($item['ids']['plural'])) {
$plurals = [];
foreach ($item['translated'] as $plural => $translated) {
$plurals[] = sprintf('{%d} %s', $plural, $translated);
}
$messages[$item['ids']['plural']] = stripcslashes(implode('|', $plurals));
$id .= '|'.$item['ids']['plural'];
}
} elseif (!empty($item['ids']['singular'])) {
$messages[$item['ids']['singular']] = stripcslashes($item['translated']);
$messages[$id] = stripcslashes(implode('|', (array) $item['translated']));
}
}

View File

@ -126,23 +126,24 @@ class PoFileLoader extends FileLoader
*/
private function addMessage(array &$messages, array $item)
{
if (\is_array($item['translated'])) {
$messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]);
if (!empty($item['ids']['singular'])) {
$id = stripcslashes($item['ids']['singular']);
if (isset($item['ids']['plural'])) {
$plurals = $item['translated'];
// PO are by definition indexed so sort by index.
ksort($plurals);
// Make sure every index is filled.
end($plurals);
$count = key($plurals);
// Fill missing spots with '-'.
$empties = array_fill(0, $count + 1, '-');
$plurals += $empties;
ksort($plurals);
$messages[stripcslashes($item['ids']['plural'])] = stripcslashes(implode('|', $plurals));
$id .= '|'.stripcslashes($item['ids']['plural']);
}
} elseif (!empty($item['ids']['singular'])) {
$messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated']);
$translated = (array) $item['translated'];
// PO are by definition indexed so sort by index.
ksort($translated);
// Make sure every index is filled.
end($translated);
$count = key($translated);
// Fill missing spots with '-'.
$empties = array_fill(0, $count + 1, '-');
$translated += $empties;
ksort($translated);
$messages[$id] = stripcslashes(implode('|', $translated));
}
}
}

View File

@ -34,7 +34,10 @@ class MoFileLoaderTest extends TestCase
$resource = __DIR__.'/../fixtures/plurals.mo';
$catalogue = $loader->load($resource, 'en', 'domain1');
$this->assertEquals(['foo' => 'bar', 'foos' => '{0} bar|{1} bars'], $catalogue->all('domain1'));
$this->assertEquals([
'foo|foos' => 'bar|bars',
'{0} no foos|one foo|%count% foos' => '{0} no bars|one bar|%count% bars',
], $catalogue->all('domain1'));
$this->assertEquals('en', $catalogue->getLocale());
$this->assertEquals([new FileResource($resource)], $catalogue->getResources());
}

View File

@ -34,7 +34,10 @@ class PoFileLoaderTest extends TestCase
$resource = __DIR__.'/../fixtures/plurals.po';
$catalogue = $loader->load($resource, 'en', 'domain1');
$this->assertEquals(['foo' => 'bar', 'foos' => 'bar|bars'], $catalogue->all('domain1'));
$this->assertEquals([
'foo|foos' => 'bar|bars',
'{0} no foos|one foo|%count% foos' => '{0} no bars|one bar|%count% bars',
], $catalogue->all('domain1'));
$this->assertEquals('en', $catalogue->getLocale());
$this->assertEquals([new FileResource($resource)], $catalogue->getResources());
}
@ -89,10 +92,8 @@ class PoFileLoaderTest extends TestCase
$catalogue = $loader->load($resource, 'en', 'domain1');
$messages = $catalogue->all('domain1');
$this->assertArrayHasKey('escaped "foo"', $messages);
$this->assertArrayHasKey('escaped "foos"', $messages);
$this->assertEquals('escaped "bar"', $messages['escaped "foo"']);
$this->assertEquals('escaped "bar"|escaped "bars"', $messages['escaped "foos"']);
$this->assertArrayHasKey('escaped "foo"|escaped "foos"', $messages);
$this->assertEquals('escaped "bar"|escaped "bars"', $messages['escaped "foo"|escaped "foos"']);
}
public function testSkipFuzzyTranslations()
@ -106,4 +107,16 @@ class PoFileLoaderTest extends TestCase
$this->assertArrayNotHasKey('foo2', $messages);
$this->assertArrayHasKey('foo3', $messages);
}
public function testMissingPlurals()
{
$loader = new PoFileLoader();
$resource = __DIR__.'/../fixtures/missing-plurals.po';
$catalogue = $loader->load($resource, 'en', 'domain1');
$this->assertEquals([
'foo|foos' => '-|bar|-|bars',
], $catalogue->all('domain1'));
$this->assertEquals('en', $catalogue->getLocale());
}
}

View File

@ -0,0 +1,4 @@
msgid "foo"
msgid_plural "foos"
msgstr[3] "bars"
msgstr[1] "bar"

View File

@ -3,3 +3,5 @@ msgid_plural "foos"
msgstr[0] "bar"
msgstr[1] "bars"
msgid "{0} no foos|one foo|%count% foos"
msgstr "{0} no bars|one bar|%count% bars"

View File

@ -16,19 +16,19 @@
</trans-unit>
<trans-unit id="4">
<source>This value should be blank.</source>
<target>این فیلد باید خالی باشد.</target>
<target>این مقدار باید خالی باشد.</target>
</trans-unit>
<trans-unit id="5">
<source>The value you selected is not a valid choice.</source>
<target>گزینه انتخابی معتبر نیست.</target>
<target>مقدار انتخاب شده شامل گزینه های معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="6">
<source>You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.</source>
<target>باید حداقل {{ limit }} گزینه انتخاب کنید.|باید حداقل {{ limit }} گزینه انتخاب کنید.</target>
<target>باید حداقل {{ limit }} گزینه انتخاب نمایید.|باید حداقل {{ limit }} گزینه انتخاب نمایید.</target>
</trans-unit>
<trans-unit id="7">
<source>You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.</source>
<target>حداکثر {{ limit }} گزینه می توانید انتخاب کنید.|حداکثر {{ limit }} گزینه می توانید انتخاب کنید.</target>
<target>حداکثر {{ limit }} گزینه می توانید انتخاب نمایید.|حداکثر {{ limit }} گزینه می توانید انتخاب نمایید.</target>
</trans-unit>
<trans-unit id="8">
<source>One or more of the given values is invalid.</source>
@ -44,87 +44,87 @@
</trans-unit>
<trans-unit id="11">
<source>This value is not a valid date.</source>
<target>این مقدار یک تاریخ معتبر نیست.</target>
<target>این مقدار یک تاریخ معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="12">
<source>This value is not a valid datetime.</source>
<target>این مقدار یک تاریخ و زمان معتبر نیست.</target>
<target>این مقدار یک تاریخ و زمان معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="13">
<source>This value is not a valid email address.</source>
<target>این یک رایانامه معتبر نیست.</target>
<target>این یک رایانامه معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="14">
<source>The file could not be found.</source>
<target>فایل پیدا نشد.</target>
<target>فایل یافت نشد.</target>
</trans-unit>
<trans-unit id="15">
<source>The file is not readable.</source>
<target>فایل قابلیت خواندن ندارد.</target>
<target>فایل قابلیت خوانده شدن ندارد.</target>
</trans-unit>
<trans-unit id="16">
<source>The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.</source>
<target>فایل بیش از اندازه بزرگ است({{ size }} {{ suffix }}). حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است.</target>
<target>فایل بیش از اندازه بزرگ است({{ size }} {{ suffix }}). حداکثر اندازه مجاز برابر با {{ limit }} {{ suffix }} می باشد.</target>
</trans-unit>
<trans-unit id="17">
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
<target>این نوع فایل مجاز نیست({{ type }}). نوع های مجاز {{ types }} هستند.</target>
<target>این نوع فایل مجاز نمی باشد({{ type }}). نوع های مجاز شامل {{ types }} می باشند.</target>
</trans-unit>
<trans-unit id="18">
<source>This value should be {{ limit }} or less.</source>
<target>این مقدار باید کوچکتر یا مساوی {{ limit }} باشد.</target>
<target>این مقدار باید کوچکتر و یا مساوی {{ limit }} باشد.</target>
</trans-unit>
<trans-unit id="19">
<source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source>
<target>بسیار طولانی است.حداکثر تعداد حروف مجاز برابر {{ limit }} است.|بسیار طولانی است.حداکثر تعداد حروف مجاز برابر {{ limit }} است.</target>
<target>بسیار طولانی است.حداکثر تعداد حروف مجاز برابر {{ limit }} می باشد.|بسیار طولانی است.حداکثر تعداد حروف مجاز برابر {{ limit }} می باشد.</target>
</trans-unit>
<trans-unit id="20">
<source>This value should be {{ limit }} or more.</source>
<target>این مقدار باید برابر و یا بیشتر از {{ limit }} باشد.</target>
<target>این مقدار باید بزرگتر و یا مساوی {{ limit }} باشد.</target>
</trans-unit>
<trans-unit id="21">
<source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source>
<target>بسیار کوتاه است.تعداد حروف باید حداقل {{ limit }} باشد.|بسیار کوتاه است.تعداد حروف باید حداقل {{ limit }} باشد.</target>
<target>مقدار وارد شده بسیار کوتاه است.تعداد حروف وارد شده، باید حداقل شامل {{ limit }} کاراکتر باشد.|مقدار وارد شده بسیار کوتاه است.تعداد حروف وارد شده، باید حداقل شامل {{ limit }} کاراکتر باشد.</target>
</trans-unit>
<trans-unit id="22">
<source>This value should not be blank.</source>
<target>این مقدار نباید تهی باشد.</target>
<target>این مقدار نباید خالی باشد.</target>
</trans-unit>
<trans-unit id="23">
<source>This value should not be null.</source>
<target>باید مقداری داشته باشد..</target>
<target>این مقدار باید شامل چیزی باشد.</target>
</trans-unit>
<trans-unit id="24">
<source>This value should be null.</source>
<target>نباید مقداری داشته باشد.</target>
<target>این مقدار باید شامل چیزی نباشد.</target>
</trans-unit>
<trans-unit id="25">
<source>This value is not valid.</source>
<target>این مقدار معتبر نیست.</target>
<target>این مقدار معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="26">
<source>This value is not a valid time.</source>
<target>این مقدار یک زمان صحیح نیست.</target>
<target>این مقدار یک زمان صحیح نمی باشد.</target>
</trans-unit>
<trans-unit id="27">
<source>This value is not a valid URL.</source>
<target>این یک URL معتبر نیست.</target>
<target>این مقدار شامل یک URL معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="31">
<source>The two values should be equal.</source>
<target>دو مقدار باید برابر باشند.</target>
<target>دو مقدار باید با یکدیگر برابر باشند.</target>
</trans-unit>
<trans-unit id="32">
<source>The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.</source>
<target>فایل بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر {{ limit }} {{ suffix }} است.</target>
<target>فایل بیش از اندازه بزرگ است. حداکثر اندازه مجاز برابر با {{ limit }} {{ suffix }} می باشد.</target>
</trans-unit>
<trans-unit id="33">
<source>The file is too large.</source>
<target>فایل بیش از اندازه بزرگ است.</target>
<target>فایل بیش از اندازه بزرگ می باشد.</target>
</trans-unit>
<trans-unit id="34">
<source>The file could not be uploaded.</source>
<target>بارگذاری فایل با شکست مواجه شد.</target>
<target>بارگذاری فایل با شکست مواجه گردید.</target>
</trans-unit>
<trans-unit id="35">
<source>This value should be a valid number.</source>
@ -132,23 +132,23 @@
</trans-unit>
<trans-unit id="36">
<source>This file is not a valid image.</source>
<target>این فایل یک تصویر نیست.</target>
<target>این فایل یک تصویر نمی باشد.</target>
</trans-unit>
<trans-unit id="37">
<source>This is not a valid IP address.</source>
<target>این مقدار یک IP معتبر نیست.</target>
<target>این مقدار یک IP معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="38">
<source>This value is not a valid language.</source>
<target>این مقدار یک زبان صحیح نیست.</target>
<target>این مقدار یک زبان صحیح نمی باشد.</target>
</trans-unit>
<trans-unit id="39">
<source>This value is not a valid locale.</source>
<target>این مقدار یک محل صحیح نیست.</target>
<target>این مقدار یک محل صحیح نمی باشد.</target>
</trans-unit>
<trans-unit id="40">
<source>This value is not a valid country.</source>
<target>این مقدار یک کشور صحیح نیست.</target>
<target>این مقدار یک کشور صحیح نمی باشد.</target>
</trans-unit>
<trans-unit id="41">
<source>This value is already used.</source>
@ -156,23 +156,23 @@
</trans-unit>
<trans-unit id="42">
<source>The size of the image could not be detected.</source>
<target>اندازه تصویر قابل شناسایی نیست.</target>
<target>اندازه تصویر قابل شناسایی نمی باشد.</target>
</trans-unit>
<trans-unit id="43">
<source>The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.</source>
<target>طول تصویر بسیار بزرگ است ({{ width }}px). بشینه طول مجاز {{ max_width }}px است.</target>
<target>طول تصویر بسیار بزرگ است ({{ width }}px). بشینه طول مجاز {{ max_width }}px می باشد.</target>
</trans-unit>
<trans-unit id="44">
<source>The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.</source>
<target>طول تصویر بسیار کوچک است ({{ width }}px). کمینه طول موردنظر {{ min_width }}px است.</target>
<target>طول تصویر بسیار کوچک است ({{ width }}px). کمینه طول موردنظر {{ min_width }}px می باشد.</target>
</trans-unit>
<trans-unit id="45">
<source>The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.</source>
<target>ارتفاع تصویر بسیار بزرگ است ({{ height }}px). بشینه ارتفاع مجاز {{ max_height }}px است.</target>
<target>ارتفاع تصویر بسیار بزرگ است ({{ height }}px). بشینه ارتفاع مجاز {{ max_height }}px می باشد.</target>
</trans-unit>
<trans-unit id="46">
<source>The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.</source>
<target>ارتفاع تصویر بسیار کوچک است ({{ height }}px). کمینه ارتفاع موردنظر {{ min_height }}px است.</target>
<target>ارتفاع تصویر بسیار کوچک است ({{ height }}px). کمینه ارتفاع موردنظر {{ min_height }}px می باشد.</target>
</trans-unit>
<trans-unit id="47">
<source>This value should be the user's current password.</source>
@ -184,67 +184,67 @@
</trans-unit>
<trans-unit id="49">
<source>The file was only partially uploaded.</source>
<target>فایل به صورت جزیی بارگذاری شده است.</target>
<target>پرونده به صورت جزیی بارگذاری گردیده است.</target>
</trans-unit>
<trans-unit id="50">
<source>No file was uploaded.</source>
<target>هیچ فایلی بارگذاری نشد.</target>
<target>هیچ پرونده ای بارگذاری نگردیده است.</target>
</trans-unit>
<trans-unit id="51">
<source>No temporary folder was configured in php.ini.</source>
<target>فولدر موقت در php.ini پیکربندی نشده است.</target>
<target>فولدر موقت در php.ini پیکربندی نگردیده است.</target>
</trans-unit>
<trans-unit id="52">
<source>Cannot write temporary file to disk.</source>
<target>فایل موقت را نمی توان در دیسک نوشت.</target>
<target>فایل موقتی را نمی توان در دیسک نوشت.</target>
</trans-unit>
<trans-unit id="53">
<source>A PHP extension caused the upload to fail.</source>
<target>اکستنشن PHP موجب شد که بارگذاری فایل با شکست مواجه شود.</target>
<target>یک اکستنشن PHP موجب شد که بارگذاری فایل با شکست مواجه گردد.</target>
</trans-unit>
<trans-unit id="54">
<source>This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.</source>
<target>این مجموعه می بایست دارای {{ limit }} عنصر یا بیشتر باشد.|این مجموعه می بایست دارای {{ limit }} عنصر یا بیشتر باشد.</target>
<target>این مجموعه می بایست دارای حداقل {{ limit }} عنصر یا بیشتر باشد.|این مجموعه می بایست دارای حداقل {{ limit }} عنصر یا بیشتر باشد.</target>
</trans-unit>
<trans-unit id="55">
<source>This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.</source>
<target>این مجموعه می بایست دارای حداقل {{ limit }} عنصر یا کمتر باشد.|این مجموعه می بایست دارای {{ limit }} عنصر یا کمتر باشد.</target>
<target>این مجموعه می بایست دارای حداکثر {{ limit }} عنصر یا کمتر باشد.|این مجموعه می بایست دارای حداکثر {{ limit }} عنصر یا کمتر باشد.</target>
</trans-unit>
<trans-unit id="56">
<source>This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.</source>
<target>این مجموعه می بایست به طور دقیق دارا {{ limit }} عنصر باشد.|این مجموعه می بایست به طور دقیق دارای {{ limit }} قلم باشد.</target>
<target>این مجموعه می بایست به طور دقیق دارای {{ limit }} عنصر باشد.|این مجموعه می بایست به طور دقیق دارای {{ limit }} عنصر باشد.</target>
</trans-unit>
<trans-unit id="57">
<source>Invalid card number.</source>
<target>شماره کارت نامعتبر است.</target>
<target>شماره کارت نامعتبر می باشد.</target>
</trans-unit>
<trans-unit id="58">
<source>Unsupported card type or invalid card number.</source>
<target>نوع کارت پشتیبانی نمی شود یا شماره کارت نامعتبر است.</target>
<target>نوع کارت پشتیبانی نمی شود و یا شماره کارت نامعتبر می باشد.</target>
</trans-unit>
<trans-unit id="59">
<source>This is not a valid International Bank Account Number (IBAN).</source>
<target>این یک شماره حساب بین المللی بانک (IBAN) درست نیست.</target>
<target>این یک شماره حساب بانک بین المللی معتبر نمی باشد (IBAN).</target>
</trans-unit>
<trans-unit id="60">
<source>This value is not a valid ISBN-10.</source>
<target>این مقدار یک ISBN-10 درست نیست.</target>
<target>این مقدار یک ISBN-10 معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="61">
<source>This value is not a valid ISBN-13.</source>
<target>این مقدار یک ISBN-13 درست نیست.</target>
<target>این مقدار یک ISBN-13 معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="62">
<source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source>
<target>این مقدار یک ISBN-10 درست یا ISBN-13 درست نیست.</target>
<target>این مقدار یک ISBN-10 صحیح و یا ISBN-13 معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="63">
<source>This value is not a valid ISSN.</source>
<target>این مقدار یک ISSN درست نیست.</target>
<target>این مقدار یک ISSN معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="64">
<source>This value is not a valid currency.</source>
<target>این مقدار یک یکای پول درست نیست.</target>
<target>این مقدار یک واحد پول معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="65">
<source>This value should be equal to {{ compared_value }}.</source>
@ -256,11 +256,11 @@
</trans-unit>
<trans-unit id="67">
<source>This value should be greater than or equal to {{ compared_value }}.</source>
<target>این مقدار باید بزرگتر یا مساوی با {{ compared_value }} باشد.</target>
<target>این مقدار باید بزرگتر و یا مساوی با {{ compared_value }} باشد.</target>
</trans-unit>
<trans-unit id="68">
<source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source>
<target>این مقدار باید با {{ compared_value_type }} {{ compared_value }} یکی باشد.</target>
<target>این مقدار باید با {{ compared_value_type }} {{ compared_value }} یکسان باشد.</target>
</trans-unit>
<trans-unit id="69">
<source>This value should be less than {{ compared_value }}.</source>
@ -268,7 +268,7 @@
</trans-unit>
<trans-unit id="70">
<source>This value should be less than or equal to {{ compared_value }}.</source>
<target>این مقدار باید کمتر یا مساوی با {{ compared_value }} باشد.</target>
<target>این مقدار باید کمتر و یا مساوی با {{ compared_value }} باشد.</target>
</trans-unit>
<trans-unit id="71">
<source>This value should not be equal to {{ compared_value }}.</source>
@ -276,43 +276,43 @@
</trans-unit>
<trans-unit id="72">
<source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source>
<target>این مقدار نباید {{ compared_value_type }} {{ compared_value }} یکی باشد.</target>
<target>این مقدار نباید با {{ compared_value_type }} {{ compared_value }} یکسان باشد.</target>
</trans-unit>
<trans-unit id="73">
<source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source>
<target>ابعاد {{ ratio }} عکس بیش از حد بزرگ است.حداکثر ابعاد مجاز {{ max_ratio }} است.</target>
<target>ابعاد {{ ratio }} عکس بیش از حد بزرگ است.حداکثر ابعاد مجاز {{ max_ratio }} می باشد.</target>
</trans-unit>
<trans-unit id="74">
<source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source>
<target>ابعاد {{ ratio }} عکس بیش از حد کوچک است.حداقل ابعاد مجاز {{ min_ratio }} است.</target>
<target>ابعاد {{ ratio }} عکس بیش از حد کوچک است.حداقل ابعاد مجاز {{ min_ratio }} می باشد.</target>
</trans-unit>
<trans-unit id="75">
<source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source>
<target>این عکس مربع width }}x{{ height }}px}} می باشد.عکس مربع مجاز نمی باشد.</target>
<target>این تصویر یک مربع width }}x{{ height }}px}} می باشد.تصویر مربع مجاز نمی باشد.</target>
</trans-unit>
<trans-unit id="76">
<source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source>
<target>این عکس افقی width }}x{{ height }}px}} می باشد.عکس افقی مجاز نمی باشد.</target>
<target>این تصویر افقی width }}x{{ height }}px}} می باشد.تصویر افقی مجاز نمی باشد.</target>
</trans-unit>
<trans-unit id="77">
<source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source>
<target>این عکس عمودی width }}x{{ height }}px}} می باشد.عکس عمودی مجاز نمی باشد.</target>
<target>این تصویر عمودی width }}x{{ height }}px}} می باشد.تصویر عمودی مجاز نمی باشد.</target>
</trans-unit>
<trans-unit id="78">
<source>An empty file is not allowed.</source>
<target>فایل خالی مجاز نمی باشد.</target>
<target>پرونده خالی مجاز نمی باشد.</target>
</trans-unit>
<trans-unit id="79">
<source>The host could not be resolved.</source>
<target>هاست قابل حل نیست.</target>
<target>میزبان قابل حل نمی باشد.</target>
</trans-unit>
<trans-unit id="80">
<source>This value does not match the expected {{ charset }} charset.</source>
<target>این مقدار مورد نظر نمی باشد. مقدار مورد نظر {{ charset }} می باشد.</target>
<target>این مقدار مطابق با مقدار مورد انتظار {{ charset }} نمی باشد.</target>
</trans-unit>
<trans-unit id="81">
<source>This is not a valid Business Identifier Code (BIC).</source>
<target>این مقدار یک BIC درست نیست.</target>
<target>این مقدار یک BIC معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="82">
<source>Error</source>
@ -320,7 +320,7 @@
</trans-unit>
<trans-unit id="83">
<source>This is not a valid UUID.</source>
<target>این مقدار یک UUID درست نیست.</target>
<target>این مقدار یک UUID معتبر نمی باشد.</target>
</trans-unit>
<trans-unit id="84">
<source>This value should be a multiple of {{ compared_value }}.</source>
@ -328,7 +328,7 @@
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>این BIC با IBAN ارتباط ندارد.</target>
<target>این BIC با IBAN ارتباطی ندارد.</target>
</trans-unit>
</body>
</file>