Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0c06856

Browse filesBrowse files
przemyslaw-boguszfabpot
authored andcommitted
[Validator] Add missing translations
1 parent 80672fb commit 0c06856
Copy full SHA for 0c06856

File tree

6 files changed

+29
-5
lines changed
Filter options

6 files changed

+29
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php
+2-2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.en.xlf
+8Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.es.xlf
+8Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
+8Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.