Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b90621

Browse files
committed
minor #36165 [Validator] Add missing translations (przemyslaw-bogusz)
This PR was squashed before being merged into the 5.1-dev branch. Discussion ---------- [Validator] Add missing translations | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT I forgot about it in the original PR (#35744) - sorry for the extra work. Commits ------- 0c06856 [Validator] Add missing translations
2 parents 80672fb + 0c06856 commit 1b90621

File tree

6 files changed

+29
-5
lines changed

6 files changed

+29
-5
lines changed

src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
*/
2020
class AtLeastOneOf extends Composite
2121
{
22-
public const AT_LEAST_ONE_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c';
22+
public const AT_LEAST_ONE_OF_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c';
2323

2424
protected static $errorNames = [
25-
self::AT_LEAST_ONE_ERROR => 'AT_LEAST_ONE_ERROR',
25+
self::AT_LEAST_ONE_OF_ERROR => 'AT_LEAST_ONE_OF_ERROR',
2626
];
2727

2828
public $constraints = [];

src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function validate($value, Constraint $constraint)
5454
}
5555

5656
$this->context->buildViolation(implode('', $messages))
57-
->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)
57+
->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)
5858
->addViolation()
5959
;
6060
}

src/Symfony/Component/Validator/Resources/translations/validators.en.xlf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@
374374
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375375
<target>The number of elements in this collection should be a multiple of {{ compared_value }}.</target>
376376
</trans-unit>
377+
<trans-unit id="97">
378+
<source>This value should satisfy at least one of the following constraints:</source>
379+
<target>This value should satisfy at least one of the following constraints:</target>
380+
</trans-unit>
381+
<trans-unit id="98">
382+
<source>Each element of this collection should satisfy its own set of constraints.</source>
383+
<target>Each element of this collection should satisfy its own set of constraints.</target>
384+
</trans-unit>
377385
</body>
378386
</file>
379387
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.es.xlf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@
374374
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375375
<target>El número de elementos en esta colección debería ser múltiplo de {{ compared_value }}.</target>
376376
</trans-unit>
377+
<trans-unit id="97">
378+
<source>This value should satisfy at least one of the following constraints:</source>
379+
<target>Este valor debería satisfacer al menos una de las siguientes restricciones:</target>
380+
</trans-unit>
381+
<trans-unit id="98">
382+
<source>Each element of this collection should satisfy its own set of constraints.</source>
383+
<target>Cada elemento de esta colección debería satisfacer su propio conjunto de restricciones.</target>
384+
</trans-unit>
377385
</body>
378386
</file>
379387
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@
374374
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375375
<target>Liczba elementów w tym zbiorze powinna być wielokrotnością {{ compared_value }}.</target>
376376
</trans-unit>
377+
<trans-unit id="97">
378+
<source>This value should satisfy at least one of the following constraints:</source>
379+
<target>Ta wartość powinna spełniać co najmniej jedną z następujących reguł:</target>
380+
</trans-unit>
381+
<trans-unit id="98">
382+
<source>Each element of this collection should satisfy its own set of constraints.</source>
383+
<target>Każdy element w tym zbiorze powinien spełniać własny zestaw reguł.</target>
384+
</trans-unit>
377385
</body>
378386
</file>
379387
</xliff>

src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function testInvalidCombinationsWithDefaultMessage($value, $constraints)
106106

107107
$this->validator->validate($value, $atLeastOneOf);
108108

109-
$this->buildViolation(implode('', $message))->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)->assertRaised();
109+
$this->buildViolation(implode('', $message))->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)->assertRaised();
110110
}
111111

112112
/**
@@ -124,7 +124,7 @@ public function testInvalidCombinationsWithCustomMessage($value, $constraints)
124124

125125
$this->validator->validate($value, $atLeastOneOf);
126126

127-
$this->buildViolation('foo')->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)->assertRaised();
127+
$this->buildViolation('foo')->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)->assertRaised();
128128
}
129129

130130
public function getInvalidCombinations()

0 commit comments

Comments
 (0)