diff --git a/src/apps/users/services/core.py b/src/apps/users/services/core.py index aaf674f8e2b..189a4d4e33f 100644 --- a/src/apps/users/services/core.py +++ b/src/apps/users/services/core.py @@ -29,6 +29,14 @@ def __init__(self, session) -> None: self._cache: PasswordRecoveryCache = PasswordRecoveryCache() self.session = session + def get_locallized_email_subject(self, language: str) -> str: + subjects = { + "en": "Password reset", + "fr": "Réinitialisation du mot de passe", + "el": "Επαναφορά κωδικού πρόσβασης", + } + return subjects.get(language, "Password reset") + async def send_password_recovery( self, schema: PasswordRecoveryRequest, @@ -91,7 +99,7 @@ async def send_password_recovery( message = MessageSchema( recipients=[user.email_encrypted], - subject="Password reset", + subject=self.get_locallized_email_subject(language), body=service.get_localized_html_template( template_name="reset_password", language=language,