diff --git a/.travis.yml b/.travis.yml index e746bb7935..0be40d36e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ php: matrix: allow_failures: - - php: 5.6 - php: hhvm-nightly services: mongodb diff --git a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php index 59c99d0f1b..7f83dbc559 100644 --- a/src/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/src/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -11,6 +11,10 @@ namespace Symfony\Component\ClassLoader; +if (!defined('T_TRAIT')) { + define('T_TRAIT', 0); +} + /** * ClassMapGenerator * @@ -84,7 +88,6 @@ class ClassMapGenerator { $contents = file_get_contents($path); $tokens = token_get_all($contents); - $T_TRAIT = version_compare(PHP_VERSION, '5.4', '<') ? -1 : T_TRAIT; $classes = array(); @@ -111,7 +114,7 @@ class ClassMapGenerator break; case T_CLASS: case T_INTERFACE: - case $T_TRAIT: + case T_TRAIT: // Find the classname while (($t = $tokens[++$i]) && is_array($t)) { if (T_STRING === $t[0]) { diff --git a/src/Symfony/Component/Config/Util/XmlUtils.php b/src/Symfony/Component/Config/Util/XmlUtils.php index 6b3e5f7370..dd68634cc0 100644 --- a/src/Symfony/Component/Config/Util/XmlUtils.php +++ b/src/Symfony/Component/Config/Util/XmlUtils.php @@ -80,7 +80,8 @@ class XmlUtils $valid = false; } } elseif (!is_array($schemaOrCallable) && is_file((string) $schemaOrCallable)) { - $valid = @$dom->schemaValidate($schemaOrCallable); + $schemaSource = file_get_contents((string) $schemaOrCallable); + $valid = @$dom->schemaValidateSource($schemaSource); } else { libxml_use_internal_errors($internalErrors); diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php b/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php index 65ab287770..2231265942 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php @@ -24,6 +24,8 @@ interface ExtensionInterface /** * Returns node translators. * + * These callables will receive the node as first argument and the translator as second argument. + * * @return callable[] */ public function getNodeTranslators(); diff --git a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php index f86f2b9672..d71baaa96b 100644 --- a/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php +++ b/src/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php @@ -29,11 +29,6 @@ class NodeExtension extends AbstractExtension const ATTRIBUTE_NAME_IN_LOWER_CASE = 2; const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4; - /** - * @var Translator - */ - private $translator; - /** * @var int */ @@ -42,12 +37,10 @@ class NodeExtension extends AbstractExtension /** * Constructor. * - * @param Translator $translator - * @param int $flags + * @param int $flags */ - public function __construct(Translator $translator, $flags = 0) + public function __construct($flags = 0) { - $this->translator = $translator; $this->flags = $flags; } @@ -100,33 +93,36 @@ class NodeExtension extends AbstractExtension /** * @param Node\SelectorNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateSelector(Node\SelectorNode $node) + public function translateSelector(Node\SelectorNode $node, Translator $translator) { - return $this->translator->nodeToXPath($node->getTree()); + return $translator->nodeToXPath($node->getTree()); } /** * @param Node\CombinedSelectorNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateCombinedSelector(Node\CombinedSelectorNode $node) + public function translateCombinedSelector(Node\CombinedSelectorNode $node, Translator $translator) { - return $this->translator->addCombination($node->getCombinator(), $node->getSelector(), $node->getSubSelector()); + return $translator->addCombination($node->getCombinator(), $node->getSelector(), $node->getSubSelector()); } /** * @param Node\NegationNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateNegation(Node\NegationNode $node) + public function translateNegation(Node\NegationNode $node, Translator $translator) { - $xpath = $this->translator->nodeToXPath($node->getSelector()); - $subXpath = $this->translator->nodeToXPath($node->getSubSelector()); + $xpath = $translator->nodeToXPath($node->getSelector()); + $subXpath = $translator->nodeToXPath($node->getSubSelector()); $subXpath->addNameTest(); if ($subXpath->getCondition()) { @@ -138,34 +134,37 @@ class NodeExtension extends AbstractExtension /** * @param Node\FunctionNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateFunction(Node\FunctionNode $node) + public function translateFunction(Node\FunctionNode $node, Translator $translator) { - $xpath = $this->translator->nodeToXPath($node->getSelector()); + $xpath = $translator->nodeToXPath($node->getSelector()); - return $this->translator->addFunction($xpath, $node); + return $translator->addFunction($xpath, $node); } /** * @param Node\PseudoNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translatePseudo(Node\PseudoNode $node) + public function translatePseudo(Node\PseudoNode $node, Translator $translator) { - $xpath = $this->translator->nodeToXPath($node->getSelector()); + $xpath = $translator->nodeToXPath($node->getSelector()); - return $this->translator->addPseudoClass($xpath, $node->getIdentifier()); + return $translator->addPseudoClass($xpath, $node->getIdentifier()); } /** * @param Node\AttributeNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateAttribute(Node\AttributeNode $node) + public function translateAttribute(Node\AttributeNode $node, Translator $translator) { $name = $node->getAttribute(); $safe = $this->isSafeName($name); @@ -181,37 +180,39 @@ class NodeExtension extends AbstractExtension $attribute = $safe ? '@'.$name : sprintf('attribute::*[name() = %s]', Translator::getXpathLiteral($name)); $value = $node->getValue(); - $xpath = $this->translator->nodeToXPath($node->getSelector()); + $xpath = $translator->nodeToXPath($node->getSelector()); if ($this->hasFlag(self::ATTRIBUTE_VALUE_IN_LOWER_CASE)) { $value = strtolower($value); } - return $this->translator->addAttributeMatching($xpath, $node->getOperator(), $attribute, $value); + return $translator->addAttributeMatching($xpath, $node->getOperator(), $attribute, $value); } /** * @param Node\ClassNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateClass(Node\ClassNode $node) + public function translateClass(Node\ClassNode $node, Translator $translator) { - $xpath = $this->translator->nodeToXPath($node->getSelector()); + $xpath = $translator->nodeToXPath($node->getSelector()); - return $this->translator->addAttributeMatching($xpath, '~=', '@class', $node->getName()); + return $translator->addAttributeMatching($xpath, '~=', '@class', $node->getName()); } /** * @param Node\HashNode $node + * @param Translator $translator * * @return XPathExpr */ - public function translateHash(Node\HashNode $node) + public function translateHash(Node\HashNode $node, Translator $translator) { - $xpath = $this->translator->nodeToXPath($node->getSelector()); + $xpath = $translator->nodeToXPath($node->getSelector()); - return $this->translator->addAttributeMatching($xpath, '=', '@id', $node->getId()); + return $translator->addAttributeMatching($xpath, '=', '@id', $node->getId()); } /** diff --git a/src/Symfony/Component/CssSelector/XPath/Translator.php b/src/Symfony/Component/CssSelector/XPath/Translator.php index 5a8eb99017..4676677ea4 100644 --- a/src/Symfony/Component/CssSelector/XPath/Translator.php +++ b/src/Symfony/Component/CssSelector/XPath/Translator.php @@ -76,7 +76,7 @@ class Translator implements TranslatorInterface $this->mainParser = $parser ?: new Parser(); $this - ->registerExtension(new Extension\NodeExtension($this)) + ->registerExtension(new Extension\NodeExtension()) ->registerExtension(new Extension\CombinationExtension()) ->registerExtension(new Extension\FunctionExtension()) ->registerExtension(new Extension\PseudoClassExtension()) @@ -207,7 +207,7 @@ class Translator implements TranslatorInterface throw new ExpressionErrorException(sprintf('Node "%s" not supported.', $node->getNodeName())); } - return call_user_func($this->nodeTranslators[$node->getNodeName()], $node); + return call_user_func($this->nodeTranslators[$node->getNodeName()], $node, $this); } /** diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 54b5216ffb..0b7200ace4 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -674,8 +674,8 @@ class Crawler extends \SplObjectStorage { $translate = 'translate(@type, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'; $xpath = sprintf('descendant-or-self::input[((contains(%s, "submit") or contains(%s, "button")) and contains(concat(\' \', normalize-space(string(@value)), \' \'), %s)) ', $translate, $translate, static::xpathLiteral(' '.$value.' ')). - sprintf('or (contains(%s, "image") and contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)) or @id="%s" or @name="%s"] ', $translate, static::xpathLiteral(' '.$value.' '), $value, $value). - sprintf('| descendant-or-self::button[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) or @id="%s" or @name="%s"]', static::xpathLiteral(' '.$value.' '), $value, $value); + sprintf('or (contains(%s, "image") and contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)) or @id=%s or @name=%s] ', $translate, static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)). + sprintf('| descendant-or-self::button[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) or @id=%s or @name=%s]', static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)); return $this->filterRelativeXPath($xpath); } diff --git a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php index 15bcb7dde7..37b8d836f5 100644 --- a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -569,6 +569,48 @@ EOF $this->assertEquals(1, $crawler->selectButton('FooBarName')->count(), '->selectButton() selects buttons with form attribute too'); } + public function testSelectButtonWithSingleQuotesInNameAttribute() + { + $html = << + + +
+ Login +
+
+ +
+ + +HTML; + + $crawler = new Crawler($html); + + $this->assertCount(1, $crawler->selectButton('Click \'Here\'')); + } + + public function testSelectButtonWithDoubleQuotesInNameAttribute() + { + $html = << + + +
+ Login +
+
+ +
+ + +HTML; + + $crawler = new Crawler($html); + + $this->assertCount(1, $crawler->selectButton('Click "Here"')); + } + public function testLink() { $crawler = $this->createTestCrawler('http://example.com/bar/')->selectLink('Foo'); diff --git a/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php b/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php index b25380aea7..cf5d63d90e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/HttpFoundationRequestHandlerTest.php @@ -14,6 +14,7 @@ namespace Symfony\Component\Form\Tests\Extension\HttpFoundation; use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; use Symfony\Component\Form\Tests\AbstractRequestHandlerTest; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\File\UploadedFile; /** * @author Bernhard Schussek @@ -47,8 +48,6 @@ class HttpFoundationRequestHandlerTest extends AbstractRequestHandlerTest protected function getMockFile() { - return $this->getMockBuilder('Symfony\Component\HttpFoundation\File\UploadedFile') - ->setConstructorArgs(array(__DIR__.'/../../Fixtures/foo', 'foo')) - ->getMock(); + return new UploadedFile(__DIR__.'/../../Fixtures/foo', 'foo'); } } diff --git a/src/Symfony/Component/HttpFoundation/Resources/stubs/FakeFile.php b/src/Symfony/Component/HttpFoundation/Resources/stubs/FakeFile.php new file mode 100644 index 0000000000..0aecc20b08 --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/Resources/stubs/FakeFile.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Resources\stubs; + +use Symfony\Component\HttpFoundation\File\File as OrigFile; + +class FakeFile extends OrigFile +{ + private $realpath; + + public function __construct($realpath, $path) + { + $this->realpath = $realpath; + parent::__construct($path, false); + } + + public function isReadable() + { + return true; + } + + public function getRealpath() + { + return $this->realpath; + } + + public function getSize() + { + return 42; + } + + public function getMTime() + { + return time(); + } +} diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index d7d1b03c3c..397192b885 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -14,6 +14,7 @@ namespace Symfony\Component\HttpFoundation\Tests; use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\HttpFoundation\Resources\stubs\FakeFile; class BinaryFileResponseTest extends ResponseTestCase { @@ -179,18 +180,7 @@ class BinaryFileResponseTest extends ResponseTestCase $request->headers->set('X-Sendfile-Type', 'X-Accel-Redirect'); $request->headers->set('X-Accel-Mapping', $mapping); - $file = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\File') - ->setConstructorArgs(array(__DIR__.'/File/Fixtures/test')) - ->getMock(); - $file->expects($this->any()) - ->method('getRealPath') - ->will($this->returnValue($realpath)); - $file->expects($this->any()) - ->method('isReadable') - ->will($this->returnValue(true)); - $file->expects($this->any()) - ->method('getMTime') - ->will($this->returnValue(time())); + $file = new FakeFile($realpath, __DIR__.'/File/Fixtures/test'); BinaryFileResponse::trustXSendFileTypeHeader(); $response = new BinaryFileResponse($file); diff --git a/src/Symfony/Component/Process/ExecutableFinder.php b/src/Symfony/Component/Process/ExecutableFinder.php index 5cc99c7692..44f1605fa9 100644 --- a/src/Symfony/Component/Process/ExecutableFinder.php +++ b/src/Symfony/Component/Process/ExecutableFinder.php @@ -53,7 +53,7 @@ class ExecutableFinder public function find($name, $default = null, array $extraDirs = array()) { if (ini_get('open_basedir')) { - $searchPath = explode(PATH_SEPARATOR, getenv('open_basedir')); + $searchPath = explode(PATH_SEPARATOR, ini_get('open_basedir')); $dirs = array(); foreach ($searchPath as $path) { if (is_dir($path)) { diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php new file mode 100644 index 0000000000..abaa47d8dd --- /dev/null +++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Tests; + +use Symfony\Component\Process\ExecutableFinder; + +/** + * @author Chris Smith + */ +class ExecutableFinderTest extends \PHPUnit_Framework_TestCase +{ + private $path; + + public function tearDown() + { + if ($this->path) { + // Restore path if it was changed. + putenv('PATH='.$this->path); + } + } + + private function setPath($path) + { + $this->path = getenv('PATH'); + putenv('PATH='.$path); + } + + public function testFind() + { + if (!defined('PHP_BINARY')) { + $this->markTestSkipped('Requires the PHP_BINARY constant'); + } + + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->setPath(dirname(PHP_BINARY)); + + $finder = new ExecutableFinder; + $result = $finder->find(basename(PHP_BINARY)); + + $this->assertEquals($result, PHP_BINARY); + } + + public function testFindWithDefault() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $expected = 'defaultValue'; + + $this->setPath(''); + + $finder = new ExecutableFinder; + $result = $finder->find('foo', $expected); + + $this->assertEquals($expected, $result); + } + + public function testFindWithExtraDirs() + { + if (!defined('PHP_BINARY')) { + $this->markTestSkipped('Requires the PHP_BINARY constant'); + } + + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->setPath(''); + + $extraDirs = array(dirname(PHP_BINARY)); + + $finder = new ExecutableFinder; + $result = $finder->find(basename(PHP_BINARY), null, $extraDirs); + + $this->assertEquals(PHP_BINARY, $result); + } + + public function testFindWithOpenBaseDir() + { + if (!defined('PHP_BINARY')) { + $this->markTestSkipped('Requires the PHP_BINARY constant'); + } + + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->markTestSkipped('Cannot run test on windows'); + } + + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + ini_set('open_basedir', dirname(PHP_BINARY).PATH_SEPARATOR.'/'); + + $finder = new ExecutableFinder; + $result = $finder->find(basename(PHP_BINARY)); + + $this->assertEquals(PHP_BINARY, $result); + } +} diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 1f45bf053b..9f2374266c 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -143,7 +143,9 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal $params[] = $data[$paramName]; // don't run set for a parameter passed to the constructor unset($data[$paramName]); - } elseif (!$constructorParameter->isOptional()) { + } elseif ($constructorParameter->isOptional()) { + $params[] = $constructorParameter->getDefaultValue(); + } else { throw new RuntimeException( 'Cannot create an instance of '.$class. ' from serialized data because its constructor requires '. diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index 99a2e37c4c..2ec68c0a0d 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -109,6 +109,16 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase $this->assertTrue($obj->isBaz()); } + public function testConstructorDenormalizeWithMissingOptionalArgument() + { + $obj = $this->normalizer->denormalize( + array('foo' => 'test', 'baz' => array(1, 2, 3)), + __NAMESPACE__.'\GetConstructorOptionalArgsDummy', 'any'); + $this->assertEquals('test', $obj->getFoo()); + $this->assertEquals(array(), $obj->getBar()); + $this->assertEquals(array(1, 2, 3), $obj->getBaz()); + } + /** * @dataProvider provideCallbacks */ @@ -336,3 +346,37 @@ class GetConstructorDummy abstract class SerializerNormalizer implements SerializerInterface, NormalizerInterface { } + +class GetConstructorOptionalArgsDummy +{ + protected $foo; + private $bar; + private $baz; + + public function __construct($foo, $bar = array(), $baz = array()) + { + $this->foo = $foo; + $this->bar = $bar; + $this->baz = $baz; + } + + public function getFoo() + { + return $this->foo; + } + + public function getBar() + { + return $this->bar; + } + + public function getBaz() + { + return $this->baz; + } + + public function otherMethod() + { + throw new \RuntimeException("Dummy::otherMethod() should not be called"); + } +} diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index 41b0e3b19a..58737da20f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -278,6 +278,30 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. Ši reikšmė neturi būti identiška {{ compared_value_type }} {{ compared_value }}. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + Nuotraukos santykis yra per didelis ({{ ratio }}). Didžiausias leistinas santykis yra {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + Nuotraukos santykis yra per mažas ({{ ratio }}). Mažiausias leistinas santykis yra {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + Nuotrauka yra kvadratinė ({{ width }}x{{ height }}px). Kvadratinės nuotraukos nėra leistinos. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + Nuotrauka orientuota į plotį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į plotį nėra leistinos. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + Nuotrauka orientuota į aukštį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į aukštį nėra leistinos. + + + An empty file is not allowed. + Failas negali būti tuščias. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index 1caed4eef7..65aef859ad 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -278,6 +278,26 @@ This value should not be identical to {{ compared_value }}. Deze waarde mag niet identiek zijn aan {{ compared_value }}. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + De afbeelding is vierkant ({{ width }}x{{ height }}px). Vierkante afbeeldingen zijn niet toegestaan. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + De afbeelding is liggend ({{ width }}x{{ height }}px). Liggende afbeeldingen zijn niet toegestaan. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + De afbeelding is staand ({{ width }}x{{ height }}px). Staande afbeeldingen zijn niet toegestaan. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf index 354ecc6cc9..6332c4886f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf @@ -278,6 +278,30 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + O formato da imagem é muito grande ({{ ratio }}). O formato máximo é {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + O formato da imagem é muito pequeno ({{ ratio }}). O formato mínimo esperado é {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A imagem é um quadrado ({{ width }}x{{ height }}px). Imagens quadradas não são permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas. + + + An empty file is not allowed. + Ficheiro vazio não é permitido. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf index f8b0d9b248..f74fe90615 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -278,6 +278,30 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. + + The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. + O formato da imagem é muito grande ({{ ratio }}). O formato máximo é {{ max_ratio }}. + + + The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. + O formato da imagem é muito pequeno ({{ ratio }}). O formato mínimo esperado é {{ min_ratio }}. + + + The image is square ({{ width }}x{{ height }}px). Square images are not allowed. + A imagem está num formato quadrado ({{ width }}x{{ height }}px). Imagens com formato quadrado não são permitidas. + + + The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. + A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas. + + + The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. + A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas. + + + An empty file is not allowed. + Ficheiro vazio não é permitido. +