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 a08c00b

Browse filesBrowse files
[Validator] Fix translation of AtLeastOneOf constraint message
1 parent fee32aa commit a08c00b
Copy full SHA for a08c00b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

55 files changed

+114
-113
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AtLeastOneOf extends Composite
2626
];
2727

2828
public $constraints = [];
29-
public $message = 'This value should satisfy at least one of the following constraints:';
29+
public $message = 'This value should satisfy at least one of the following constraints: {{ child_messages }}';
3030
public $messageCollection = 'Each element of this collection should satisfy its own set of constraints.';
3131
public $includeInternalMessages = true;
3232

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function validate($value, Constraint $constraint)
3131

3232
$validator = $this->context->getValidator();
3333

34-
$messages = [$constraint->message];
34+
$childMessages = [];
3535

3636
foreach ($constraint->constraints as $key => $item) {
3737
$executionContext = clone $this->context;
@@ -43,19 +43,20 @@ public function validate($value, Constraint $constraint)
4343
}
4444

4545
if ($constraint->includeInternalMessages) {
46-
$message = ' ['.($key + 1).'] ';
46+
$message = '['.($key + 1).'] ';
4747

4848
if ($item instanceof All || $item instanceof Collection) {
4949
$message .= $constraint->messageCollection;
5050
} else {
5151
$message .= $violations->get(\count($violations) - 1)->getMessage();
5252
}
5353

54-
$messages[] = $message;
54+
$childMessages[] = $message;
5555
}
5656
}
5757

58-
$this->context->buildViolation(implode('', $messages))
58+
$this->context->buildViolation($constraint->message)
59+
->setParameter('{{ child_messages }}', implode(' ', $childMessages))
5960
->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)
6061
->addViolation()
6162
;

‎src/Symfony/Component/Validator/Resources/translations/validators.af.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.af.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Die hoeveelheid elemente in hierdie versameling moet 'n meelvoud van {{ compared_value }} wees.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Hierdie waarde moet voldoen aan ten minste een van hierdie beperkings:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Hierdie waarde moet voldoen aan ten minste een van hierdie beperkings: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>يجب أن يكون عدد العناصر في هذه المجموعة مضاعف {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>يجب أن تستوفي هذه القيمة واحدة من القيود التالية:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>يجب أن تستوفي هذه القيمة واحدة من القيود التالية: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.az.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.az.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Bu kolleksiyadakı elementlerin sayı {{ compared_value }} tam bölünəni olmalıdır.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Bu dəyər aşağıdakı məcburiyyətlərdən birini qarşılamalıdır:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Bu dəyər aşağıdakı məcburiyyətlərdən birini qarşılamalıdır: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.be.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.be.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Колькасць элементаў у гэтай калекцыі павінна быць кратным {{compared_value}}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Значэнне павінна задавальняць як мінімум аднаму з наступных абмежаванняў:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Значэнне павінна задавальняць як мінімум аднаму з наступных абмежаванняў: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Броят на елементите в тази колекция трябва да бъде кратен на {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Стойността трябва да отговаря на поне едно от следните ограничения:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Стойността трябва да отговаря на поне едно от следните ограничения: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Broj elemenata u ovoj kolekciji bi trebalo da bude djeljiv sa {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Ova vrijednost bi trebalo da zadovoljava namjanje jedno od narednih ograničenja:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Ova vrijednost bi trebalo da zadovoljava namjanje jedno od narednih ograničenja: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>El nombre d'elements d'aquesta col·lecció ha de ser múltiple de {{compared_value}}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Aquest valor ha de satisfer almenys una de les restriccions següents:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Aquest valor ha de satisfer almenys una de les restriccions següents: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Počet prvků v této kolekci musí být násobek {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Tato hodnota musí splňovat alespoň jedno z následujících omezení:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Tato hodnota musí splňovat alespoň jedno z následujících omezení: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.da.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.da.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Antallet af elementer i denne samling skal være en multiplikation af {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Værdien skal overholde mindst én af følgende krav::</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Værdien skal overholde mindst én af følgende krav:: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.de.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.de.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Die Anzahl an Elementen in dieser Sammlung sollte ein Vielfaches von {{ compared_value }} sein.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Dieser Wert sollte eine der folgenden Bedingungen erfüllen:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Dieser Wert sollte eine der folgenden Bedingungen erfüllen: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.el.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.el.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Το νούμερο των στοιχείων σε αυτή τη συλλογή θα πρέπει να είναι πολλαπλάσιο του {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Αυτή η τιμή θα πρέπει να ικανοποιεί τουλάχιστον έναν από τους παρακάτω περιορισμούς: </target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Αυτή η τιμή θα πρέπει να ικανοποιεί τουλάχιστον έναν από τους παρακάτω περιορισμούς: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎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
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>The number of elements in this collection should be a multiple of {{ compared_value }}.</target>
376376
</trans-unit>
377377
<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>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>This value should satisfy at least one of the following constraints: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎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
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>El número de elementos en esta colección debería ser múltiplo de {{ compared_value }}.</target>
376376
</trans-unit>
377377
<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>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Este valor debería satisfacer al menos una de las siguientes restricciones: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Bilduma honetako elementu-kopuruak {{ compared_value }}-ren multiploa izan behar luke.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Balio honek, gutxienez, murrizketa hauetako bat bete behar du:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Balio honek, gutxienez, murrizketa hauetako bat bete behar du: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>تعداد عناصر این مجموعه باید ضریبی از {{ compared_value }} باشد.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>این مقدار باید حداقل یکی از محدودیت‌های زیر را ارضا کند:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>این مقدار باید حداقل یکی از محدودیت‌های زیر را ارضا کند: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Ryhmässä olevien elementtien määrän pitää olla monikerta luvulle {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Tämän arvon tulee läpäistä vähintään yksi seuraavista tarkistuksista:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Tämän arvon tulee läpäistä vähintään yksi seuraavista tarkistuksista: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Le nombre d'éléments de cette collection doit être un multiple de {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Cette valeur doit satisfaire à au moins une des contraintes suivantes :</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Cette valeur doit satisfaire au moins une des contraintes suivantes : {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>O número de elementos desta colección debería ser múltiplo de {{compare_value}}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Este valor debe cumprir polo menos unha das seguintes restricións:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Este valor debe cumprir polo menos unha das seguintes restricións: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.he.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.he.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>מספר האלמנטים באוסף זה צריך להיות מכפיל של {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>ערך זה אמור לעמוד לפחות באחד התנאים הבאים:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>ערך זה אמור לעמוד לפחות באחד התנאים הבאים: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>Broj elemenata u kolekciji treba biti djeljiv s {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Ova vrijednost mora zadovoljiti jedan od sljedećih ograničenja:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Ova vrijednost mora zadovoljiti jedan od sljedećih ograničenja: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

‎src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@
375375
<target>A gyűjteményben lévő elemek számának oszthatónak kell lennie a következővel: {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378-
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Ennek az értéknek meg kell felelni legalább egynek a következő feltételek közül:</target>
378+
<source>This value should satisfy at least one of the following constraints: {{ child_messages }}</source>
379+
<target>Ennek az értéknek meg kell felelni legalább egynek a következő feltételek közül: {{ child_messages }}</target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.