Skip to content

Commit 17da084

Browse files
authored
Merge pull request #206 from bocharsky-bw/translate-exceptions
RFC: Add translations for exception reasons
2 parents ba0942a + 8078b24 commit 17da084

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/Exception/ResetPasswordExceptionInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
*/
1515
interface ResetPasswordExceptionInterface extends \Throwable
1616
{
17+
public const MESSAGE_PROBLEM_VALIDATE = 'There was a problem validating your password reset request';
18+
public const MESSAGE_PROBLEM_HANDLE = 'There was a problem handling your password reset request';
19+
1720
public function getReason(): string;
1821
}

src/Resources/translations/ResetPasswordBundle.en.xlf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,30 @@
2222
<source>%count% minute|%count% minutes</source>
2323
<target>%count% minute|%count% minutes</target>
2424
</trans-unit>
25+
<trans-unit id="6">
26+
<source>There was a problem validating your password reset request</source>
27+
<target>There was a problem validating your password reset request</target>
28+
</trans-unit>
29+
<trans-unit id="7">
30+
<source>There was a problem handling your password reset request</source>
31+
<target>There was a problem handling your password reset request</target>
32+
</trans-unit>
33+
<trans-unit id="8">
34+
<source>The link in your email is expired. Please try to reset your password again.</source>
35+
<target>The link in your email is expired. Please try to reset your password again.</target>
36+
</trans-unit>
37+
<trans-unit id="9">
38+
<source>Please update the request_password_repository configuration in config/packages/reset_password.yaml to point to your "request password repository" service.</source>
39+
<target>Please update the request_password_repository configuration in config/packages/reset_password.yaml to point to your "request password repository" service.</target>
40+
</trans-unit>
41+
<trans-unit id="10">
42+
<source>The reset password link is invalid. Please try to reset your password again.</source>
43+
<target>The reset password link is invalid. Please try to reset your password again.</target>
44+
</trans-unit>
45+
<trans-unit id="11">
46+
<source>You have already requested a reset password email. Please check your email or try again soon.</source>
47+
<target>You have already requested a reset password email. Please check your email or try again soon.</target>
48+
</trans-unit>
2549
</body>
2650
</file>
2751
</xliff>

0 commit comments

Comments
 (0)