Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 3.4:
  [Validator] Add missing vietnamese translations
  add German translation
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  prevent method calls on null values
  Return int if scale = 0
  • Loading branch information
fabpot committed Feb 29, 2020
2 parents 19e09ad + b5ccfc1 commit 3a3a07f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ConstraintValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
abstract class ConstraintValidator implements ConstraintValidatorInterface
{
/**
* Whether to format {@link \DateTime} objects as RFC-3339 dates
* ("Y-m-d H:i:s").
* Whether to format {@link \DateTime} objects, either with the {@link \IntlDateFormatter}
* (if it is available) or as RFC-3339 dates ("Y-m-d H:i:s").
*/
const PRETTY_DATE = 1;

Expand Down Expand Up @@ -69,7 +69,8 @@ protected function formatTypeOf($value)
* in double quotes ("). Objects, arrays and resources are formatted as
* "object", "array" and "resource". If the $format bitmask contains
* the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted
* as RFC-3339 dates ("Y-m-d H:i:s").
* with the {@link \IntlDateFormatter}. If it is not available, they will be
* formatted as RFC-3339 dates ("Y-m-d H:i:s").
*
* Be careful when passing message parameters to a constraint violation
* that (may) contain objects, arrays or resources. These parameters
Expand Down
4 changes: 4 additions & 0 deletions Resources/translations/validators.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@
<source>This value is not a valid hostname.</source>
<target>Dieser Wert ist kein gültiger Hostname.</target>
</trans-unit>
<trans-unit id="96">
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
<target>Die Anzahl an Elementen in dieser Sammlung sollte ein Vielfaches von {{ compared_value }} sein.</target>
</trans-unit>
</body>
</file>
</xliff>
12 changes: 12 additions & 0 deletions Resources/translations/validators.vi.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,18 @@
<source>This password has been leaked in a data breach, it must not be used. Please use another password.</source>
<target>Mật khẩu này đã bị rò rỉ dữ liệu, không được sử dụng nữa. Xin vui lòng sử dụng mật khẩu khác.</target>
</trans-unit>
<trans-unit id="94">
<source>This value should be between {{ min }} and {{ max }}.</source>
<target>Giá trị này nên thuộc giữa {{ min }} và {{ max }}.</target>
</trans-unit>
<trans-unit id="95">
<source>This value is not a valid hostname.</source>
<target>Giá trị này không phải là tên máy chủ hợp lệ.</target>
</trans-unit>
<trans-unit id="96">
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
<target>Số lượng các phần tử trong bộ sưu tập này nên là bội số của {{compared_value}}.</target>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit 3a3a07f

Please sign in to comment.