Skip to content

Commit 95997cd

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: [Validator] added missing Hungarian translation [Validator] add missing lv translation fix the exception being thrown
2 parents 60797b7 + c4c30b5 commit 95997cd

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Constraints/JsonValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Validator\Constraint;
1515
use Symfony\Component\Validator\ConstraintValidator;
1616
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
17+
use Symfony\Component\Validator\Exception\UnexpectedValueException;
1718

1819
/**
1920
* @author Imad ZAIRIG <[email protected]>
@@ -34,7 +35,7 @@ public function validate(mixed $value, Constraint $constraint)
3435
}
3536

3637
if (!\is_scalar($value) && !$value instanceof \Stringable) {
37-
throw new UnexpectedTypeException($value, 'string');
38+
throw new UnexpectedValueException($value, 'string');
3839
}
3940

4041
$value = (string) $value;

Resources/translations/validators.hu.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@
434434
<source>The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.</source>
435435
<target>Az érzékelt karakterkódolás érvénytelen ({{ detected }}). Engedélyezett karakterkódolások: {{ encodings }}.</target>
436436
</trans-unit>
437+
<trans-unit id="112">
438+
<source>This is not a valid MAC address.</source>
439+
<target>Ez egy érvénytelen MAC cím.</target>
440+
</trans-unit>
437441
</body>
438442
</file>
439443
</xliff>

Resources/translations/validators.lv.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@
434434
<source>The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.</source>
435435
<target>Noteiktais rakstzīmju kodējums nav derīgs ({{ detected }}). Atļautie kodējumi ir {{ encodings }}.</target>
436436
</trans-unit>
437+
<trans-unit id="112">
438+
<source>This is not a valid MAC address.</source>
439+
<target>Šī nav derīga MAC adrese.</target>
440+
</trans-unit>
437441
</body>
438442
</file>
439443
</xliff>

0 commit comments

Comments
 (0)