Skip to content

Commit e161c87

Browse files
Merge branch '5.4' into 6.4
* 5.4: [VarDumper] Fix test suite with PHP 8.4 [DoctrineBridge] Add missing return type [Mailer] Fix sendmail transport not handling failure [HttpClient] Lazily initialize CurlClientState updating missing translations for Greek #53768 [Validator] Allow BICs’ first four characters to be digits [ErrorHandler] Fix exit code when an exception occurs and the exception handler has been unregistered [Validator] Review Arabic translations and add correct translations.
2 parents e65b8b1 + 9304c6b commit e161c87

File tree

4 files changed

+14
-29
lines changed

4 files changed

+14
-29
lines changed

Constraints/BicValidator.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,6 @@ public function validate(mixed $value, Constraint $constraint)
102102
return;
103103
}
104104

105-
// first 4 letters must be alphabetic (bank code)
106-
if (!ctype_alpha(substr($canonicalize, 0, 4))) {
107-
$this->context->buildViolation($constraint->message)
108-
->setParameter('{{ value }}', $this->formatValue($value))
109-
->setCode(Bic::INVALID_BANK_CODE_ERROR)
110-
->addViolation();
111-
112-
return;
113-
}
114-
115105
$bicCountryCode = substr($canonicalize, 4, 2);
116106
if (!isset(self::BIC_COUNTRY_TO_IBAN_COUNTRY_MAP[$bicCountryCode]) && !Countries::exists($bicCountryCode)) {
117107
$this->context->buildViolation($constraint->message)

Resources/translations/validators.ar.xlf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
</trans-unit>
137137
<trans-unit id="37" resname="This is not a valid IP address.">
138138
<source>This value is not a valid IP address.</source>
139-
<target state="needs-review-translation">هذه القيمة ليست عنوان IP صالحًا.</target>
139+
<target>هذا ليس عنوان IP صحيح.</target>
140140
</trans-unit>
141141
<trans-unit id="38">
142142
<source>This value is not a valid language.</source>
@@ -192,7 +192,7 @@
192192
</trans-unit>
193193
<trans-unit id="51" resname="No temporary folder was configured in php.ini.">
194194
<source>No temporary folder was configured in php.ini, or the configured folder does not exist.</source>
195-
<target state="needs-review-translation">لم يتم تكوين مجلد مؤقت في ملف php.ini، أو المجلد المعد لا يوجد.</target>
195+
<target>لم يتم تكوين مجلد مؤقت في ملف php.ini.</target>
196196
</trans-unit>
197197
<trans-unit id="52">
198198
<source>Cannot write temporary file to disk.</source>
@@ -224,7 +224,7 @@
224224
</trans-unit>
225225
<trans-unit id="59" resname="This is not a valid International Bank Account Number (IBAN).">
226226
<source>This value is not a valid International Bank Account Number (IBAN).</source>
227-
<target state="needs-review-translation">هذه القيمة ليست رقم حساب بنكي دولي (IBAN) صالحًا.</target>
227+
<target>هذه القيمة ليست رقم حساب بنكي دولي (IBAN) صالحًا.</target>
228228
</trans-unit>
229229
<trans-unit id="60">
230230
<source>This value is not a valid ISBN-10.</source>
@@ -312,15 +312,15 @@
312312
</trans-unit>
313313
<trans-unit id="81" resname="This is not a valid Business Identifier Code (BIC).">
314314
<source>This value is not a valid Business Identifier Code (BIC).</source>
315-
<target state="needs-review-translation">هذه القيمة ليست رمز معرف الأعمال (BIC) صالحًا.</target>
315+
<target>هذه القيمة ليست رمز معرف أعمال (BIC) صالحًا.</target>
316316
</trans-unit>
317317
<trans-unit id="82">
318318
<source>Error</source>
319319
<target>خطأ</target>
320320
</trans-unit>
321321
<trans-unit id="83" resname="This is not a valid UUID.">
322322
<source>This value is not a valid UUID.</source>
323-
<target state="needs-review-translation">هذه القيمة ليست UUID صالحًا.</target>
323+
<target>هذه القيمة ليست UUID صالحًا.</target>
324324
</trans-unit>
325325
<trans-unit id="84">
326326
<source>This value should be a multiple of {{ compared_value }}.</source>
@@ -432,11 +432,11 @@
432432
</trans-unit>
433433
<trans-unit id="111">
434434
<source>The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.</source>
435-
<target state="needs-review-translation">تم اكتشاف ترميز الأحرف غير صالح ({{ detected }}). الترميزات المسموح بها هي {{ encodings }}.</target>
435+
<target>تم اكتشاف ترميز أحرف غير صالح ({{ detected }}). الترميزات المسموح بها هي {{ encodings }}.</target>
436436
</trans-unit>
437437
<trans-unit id="112">
438438
<source>This value is not a valid MAC address.</source>
439-
<target state="needs-review-translation">هذه القيمة ليست عنوان MAC صالحًا.</target>
439+
<target>هذه القيمة ليست عنوان MAC صالحًا.</target>
440440
</trans-unit>
441441
</body>
442442
</file>

Resources/translations/validators.el.xlf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
</trans-unit>
137137
<trans-unit id="37" resname="This is not a valid IP address.">
138138
<source>This value is not a valid IP address.</source>
139-
<target state="needs-review-translation">Αυτή η τιμή δεν είναι έγκυρη διεύθυνση IP.</target>
139+
<target >Αυτή η IP διεύθυνση δεν είναι έγκυρη.</target>
140140
</trans-unit>
141141
<trans-unit id="38">
142142
<source>This value is not a valid language.</source>
@@ -192,7 +192,7 @@
192192
</trans-unit>
193193
<trans-unit id="51" resname="No temporary folder was configured in php.ini.">
194194
<source>No temporary folder was configured in php.ini, or the configured folder does not exist.</source>
195-
<target state="needs-review-translation">Δεν ρυθμίστηκε προσωρινός φάκελος στο php.ini, ή ο ρυθμισμένος φάκελος δεν υπάρχει.</target>
195+
<target>Δεν έχει ρυθμιστεί προσωρινός φάκελος στο php.ini, ή ο ρυθμισμένος φάκελος δεν υπάρχει.</target>
196196
</trans-unit>
197197
<trans-unit id="52">
198198
<source>Cannot write temporary file to disk.</source>
@@ -224,7 +224,7 @@
224224
</trans-unit>
225225
<trans-unit id="59" resname="This is not a valid International Bank Account Number (IBAN).">
226226
<source>This value is not a valid International Bank Account Number (IBAN).</source>
227-
<target state="needs-review-translation">Αυτή η τιμή δεν είναι έγκυρος Διεθνής Αριθμός Τραπεζικού Λογαριασμού (IBAN).</target>
227+
<target>Αυτός δεν είναι έγκυρος διεθνής αριθμός τραπεζικού λογαριασμού (IBAN).</target>
228228
</trans-unit>
229229
<trans-unit id="60">
230230
<source>This value is not a valid ISBN-10.</source>
@@ -312,15 +312,15 @@
312312
</trans-unit>
313313
<trans-unit id="81" resname="This is not a valid Business Identifier Code (BIC).">
314314
<source>This value is not a valid Business Identifier Code (BIC).</source>
315-
<target state="needs-review-translation">Αυτή η τιμή δεν είναι έγκυρος Κωδικός Ταυτοποίησης Επιχείρησης (BIC).</target>
315+
<target>Αυτός ο αριθμός δεν είναι έγκυρος Κωδικός Ταυτοποίησης Επιχείρησης (BIC).</target>
316316
</trans-unit>
317317
<trans-unit id="82">
318318
<source>Error</source>
319319
<target>Σφάλμα</target>
320320
</trans-unit>
321321
<trans-unit id="83" resname="This is not a valid UUID.">
322322
<source>This value is not a valid UUID.</source>
323-
<target state="needs-review-translation">Αυτή η τιμή δεν είναι έγκυρη UUID.</target>
323+
<target >Αυτός ο αριθμός δεν είναι έγκυρη UUID.</target>
324324
</trans-unit>
325325
<trans-unit id="84">
326326
<source>This value should be a multiple of {{ compared_value }}.</source>
@@ -436,7 +436,7 @@
436436
</trans-unit>
437437
<trans-unit id="112">
438438
<source>This value is not a valid MAC address.</source>
439-
<target state="needs-review-translation">Αυτή η τιμή δεν είναι έγκυρη διεύθυνση MAC.</target>
439+
<target>Αυτός ο αριθμός δεν είναι έγκυρη διεύθυνση MAC.</target>
440440
</trans-unit>
441441
</body>
442442
</file>

Tests/Constraints/BicValidatorTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ public function testValidBics($bic)
190190

191191
public static function getValidBics()
192192
{
193-
// http://formvalidation.io/validators/bic/
194193
return [
195194
['ASPKAT2LXXX'],
196195
['ASPKAT2L'],
197196
['DSBACNBXSHA'],
198197
['UNCRIT2B912'],
199198
['DABADKKK'],
200199
['RZOOAT2L303'],
200+
['1SBACNBXSHA'],
201201
];
202202
}
203203

@@ -241,11 +241,6 @@ public static function getInvalidBics()
241241
['ASPKAT2LX', Bic::INVALID_LENGTH_ERROR],
242242
['ASPKAT2LXXX1', Bic::INVALID_LENGTH_ERROR],
243243
['DABADKK', Bic::INVALID_LENGTH_ERROR],
244-
['1SBACNBXSHA', Bic::INVALID_BANK_CODE_ERROR],
245-
['RZ00AT2L303', Bic::INVALID_BANK_CODE_ERROR],
246-
['D2BACNBXSHA', Bic::INVALID_BANK_CODE_ERROR],
247-
['DS3ACNBXSHA', Bic::INVALID_BANK_CODE_ERROR],
248-
['DSB4CNBXSHA', Bic::INVALID_BANK_CODE_ERROR],
249244
['DEUT12HH', Bic::INVALID_COUNTRY_CODE_ERROR],
250245
['DSBAC6BXSHA', Bic::INVALID_COUNTRY_CODE_ERROR],
251246
['DSBA5NBXSHA', Bic::INVALID_COUNTRY_CODE_ERROR],

0 commit comments

Comments
 (0)