8000 Merge branch '4.4' into 5.2 · devloop42/symfony@b964e03 · GitHub
[go: up one dir, main page]

Skip to content

Commit b964e03

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [Mailer] Fixed decode exception when sendgrid response is 202 missing translations for basque
2 parents 6cda3bb + 0c5a79d commit b964e03

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,18 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e
5454

5555
try {
5656
$statusCode = $response->getStatusCode();
57-
$result = $response->toArray(false);
58-
} catch (DecodingExceptionInterface $e) {
59-
throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $statusCode), $response);
6057
} catch (TransportExceptionInterface $e) {
6158
throw new HttpTransportException('Could not reach the remote Sendgrid server.', $response, 0, $e);
6259
}
6360

6461
if (202 !== $statusCode) {
65-
throw new HttpTransportException('Unable to send an email: '.implode('; ', array_column($result['errors'], 'message')).sprintf(' (code %d).', $statusCode), $response);
62+
try {
63+
$result = $response->toArray(false);
64+
65+
throw new HttpTransportException('Unable to send an email: '.implode('; ', array_column($result['errors'], 'message')).sprintf(' (code %d).', $statusCode), $response);
66+
} catch (DecodingExceptionInterface $e) {
67+
throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $statusCode), $response);
68+
}
6669
}
6770

6871
$sentMessage->setMessageId($response->getHeaders(false)['x-message-id'][0]);

src/Symfony/Component/Security/Core/Resources/translations/security.eu.xlf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@
7070
<source>Invalid or expired login link.</source>
7171
<target>Sartzeko esteka baliogabea edo iraungia.</target>
7272
</trans-unit>
73+
<trans-unit id="19">
74+
<source>Too many failed login attempts, please try again in %minutes% minute.</source>
75+
<target>Saioa hasteko huts gehiegi egin dira, saiatu berriro minutu %minutes% geroago.</target>
76+
</trans-unit>
77+
<trans-unit id="20">
78+
<source>Too many failed login attempts, please try again in %minutes% minutes.</source>
79+
<target>Saioa hasteko huts gehiegi egin dira, saiatu berriro %minutes% minututan.</target>
80+
</trans-unit>
7381
</body>
7482
</file>
7583
</xliff>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@
386386
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
387387
<target>Balio hori ez da baliozko baloreen nazioarteko identifikazio-zenbaki bat (ISIN).</target>
388388
</trans-unit>
389+
<trans-unit id="100">
390+
<source>This value should be a valid expression.</source>
391+
<target>Balio hori baliozko adierazpena izan beharko litzateke.</target>
392+
</trans-unit>
389393
</body>
390394
</file>
391395
</xliff>

0 commit comments

Comments
 (0)
0