[Validator] Add missing translations
This commit is contained in:
parent
80672fb12a
commit
0c06856207
@ -19,10 +19,10 @@ namespace Symfony\Component\Validator\Constraints;
|
|||||||
*/
|
*/
|
||||||
class AtLeastOneOf extends Composite
|
class AtLeastOneOf extends Composite
|
||||||
{
|
{
|
||||||
public const AT_LEAST_ONE_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c';
|
public const AT_LEAST_ONE_OF_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c';
|
||||||
|
|
||||||
protected static $errorNames = [
|
protected static $errorNames = [
|
||||||
self::AT_LEAST_ONE_ERROR => 'AT_LEAST_ONE_ERROR',
|
self::AT_LEAST_ONE_OF_ERROR => 'AT_LEAST_ONE_OF_ERROR',
|
||||||
];
|
];
|
||||||
|
|
||||||
public $constraints = [];
|
public $constraints = [];
|
||||||
|
@ -54,7 +54,7 @@ class AtLeastOneOfValidator extends ConstraintValidator
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->context->buildViolation(implode('', $messages))
|
$this->context->buildViolation(implode('', $messages))
|
||||||
->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)
|
->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)
|
||||||
->addViolation()
|
->addViolation()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -374,6 +374,14 @@
|
|||||||
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
|
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
|
||||||
<target>The number of elements in this collection should be a multiple of {{ compared_value }}.</target>
|
<target>The number of elements in this collection should be a multiple of {{ compared_value }}.</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="97">
|
||||||
|
<source>This value should satisfy at least one of the following constraints:</source>
|
||||||
|
<target>This value should satisfy at least one of the following constraints:</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="98">
|
||||||
|
<source>Each element of this collection should satisfy its own set of constraints.</source>
|
||||||
|
<target>Each element of this collection should satisfy its own set of constraints.</target>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
@ -374,6 +374,14 @@
|
|||||||
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
|
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
|
||||||
<target>El número de elementos en esta colección debería ser múltiplo de {{ compared_value }}.</target>
|
<target>El número de elementos en esta colección debería ser múltiplo de {{ compared_value }}.</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="97">
|
||||||
|
<source>This value should satisfy at least one of the following constraints:</source>
|
||||||
|
<target>Este valor debería satisfacer al menos una de las siguientes restricciones:</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="98">
|
||||||
|
<source>Each element of this collection should satisfy its own set of constraints.</source>
|
||||||
|
<target>Cada elemento de esta colección debería satisfacer su propio conjunto de restricciones.</target>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
@ -374,6 +374,14 @@
|
|||||||
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
|
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
|
||||||
<target>Liczba elementów w tym zbiorze powinna być wielokrotnością {{ compared_value }}.</target>
|
<target>Liczba elementów w tym zbiorze powinna być wielokrotnością {{ compared_value }}.</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="97">
|
||||||
|
<source>This value should satisfy at least one of the following constraints:</source>
|
||||||
|
<target>Ta wartość powinna spełniać co najmniej jedną z następujących reguł:</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="98">
|
||||||
|
<source>Each element of this collection should satisfy its own set of constraints.</source>
|
||||||
|
<target>Każdy element w tym zbiorze powinien spełniać własny zestaw reguł.</target>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
@ -106,7 +106,7 @@ class AtLeastOneOfValidatorTest extends ConstraintValidatorTestCase
|
|||||||
|
|
||||||
$this->validator->validate($value, $atLeastOneOf);
|
$this->validator->validate($value, $atLeastOneOf);
|
||||||
|
|
||||||
$this->buildViolation(implode('', $message))->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)->assertRaised();
|
$this->buildViolation(implode('', $message))->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)->assertRaised();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -124,7 +124,7 @@ class AtLeastOneOfValidatorTest extends ConstraintValidatorTestCase
|
|||||||
|
|
||||||
$this->validator->validate($value, $atLeastOneOf);
|
$this->validator->validate($value, $atLeastOneOf);
|
||||||
|
|
||||||
$this->buildViolation('foo')->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)->assertRaised();
|
$this->buildViolation('foo')->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)->assertRaised();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInvalidCombinations()
|
public function getInvalidCombinations()
|
||||||
|
Reference in New Issue
Block a user