prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Mauvais article et mauvaise casse pour message d'erreur sur adresse mail
  Sur la page `/comptes/connexion/`, on voit : 
  
  ```
  Saisissez un Adresse e-mail…
  ```
  
  Alors que l'on devrait avoir : 
  
  ```
  Saisissez une adresse e-mail…
  ```
  
  ![image](https://user-images.githubusercontent.com/6030745/90972240-a399de00-e517-11ea-89e7-85a6d0445ee2.png)
  
  La base du message d'erreur vient des [fichiers de traduction de Django](https://github.com/django/django/blob/6376278a904e2f8b34893a7166508dfd205fdceb/django/contrib/auth/locale/fr/LC_MESSAGES/django.po) : 
  
  ```py
  msgid ""
  "Please enter a correct %(username)s and password. Note that both fields may "
  "be case-sensitive."
  msgstr ""
  "Saisissez un %(username)s et un mot de passe valides. Remarquez que chacun "
  "de ces champs est sensible à la casse (différenciation des majuscules/"
  "minuscules)."
  ```
  
  Et à la place du placeholder `%(username)s`, on a `Adresse e-mail` dans ce projet.
  
  Dans le fichier de traduction (`django.po`) du projet actuel, on voit : 
  
  ```py
  msgid "Email address"
  msgstr "Adresse e-mail"
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/accounts/forms.py`
  Content:
  ```
  1 from django import forms
  2 from django.utils.translation import ugettext_lazy as _
  3 from django.contrib.auth.forms import AuthenticationForm
  4 from django.contrib.auth import password_validation
  5 
  6 from accounts.models import User
  7 
  8 
  9 class RegisterForm(forms.ModelForm):
  10     """Form used to create new user accounts."""
  11 
  12     email = forms.EmailField(
  13         label=_('Your email address'),
  14         required=True,
  15         help_text=_('We will send a confirmation link to '
  16                     'this address before creating the account.'))
  17     full_name = forms.CharField(
  18         label=_('Your full name'),
  19         required=True,
  20         help_text=_('This is how we will address you in our communications.'))
  21     ml_consent = forms.BooleanField(
  22         label=_('I want to receive news and communications from the service.'),
  23         required=False,
  24         help_text=_('You will be able to unsubscribe at any time.'))
  25 
  26     class Meta:
  27         model = User
  28         fields = ['full_name', 'email', 'ml_consent']
  29 
  30     def __init__(self, *args, **kwargs):
  31         super().__init__(*args, **kwargs)
  32         self.fields['full_name'].widget.attrs.update({'autofocus': True})
  33         self.fields['email'].widget.attrs.update({
  34             'placeholder': _('Please double-check this value.')})
  35 
  36     def clean_email(self):
  37         email = self.cleaned_data['email']
  38         return email.lower()
  39 
  40 
  41 class LoginForm(AuthenticationForm):
  42     username = forms.EmailField(
  43         label=_('Your email address'),
  44         required=True)
  45     password = forms.CharField(
  46         label=_('Your password'),
  47         required=True,
  48         strip=False,
  49         widget=forms.PasswordInput)
  50 
  51     def clean_username(self):
  52         """Don't prevent users to login when they user uppercase emails."""
  53 
  54         username = self.cleaned_data['username']
  55         return username.lower()
  56 
  57 
  58 class PasswordResetForm(forms.Form):
  59     """Password reset request form."""
  60 
  61     username = forms.EmailField(
  62         label=_('Your email address'),
  63         required=True)
  64 
  65 
  66 class ProfileForm(forms.ModelForm):
  67     """Edit profile related user data."""
  68 
  69     new_password = forms.CharField(
  70         label=_('Choose a new password'),
  71         required=False,
  72         strip=False,
  73         help_text=password_validation.password_validators_help_text_html(),
  74         widget=forms.PasswordInput(attrs={
  75             'placeholder': _('Leave empty to keep your existing password')
  76         }))
  77 
  78     class Meta:
  79         model = User
  80         fields = ['full_name', 'new_password', 'ml_consent']
  81         labels = {
  82             'full_name': _('Your full name'),
  83             'ml_consent':
  84                 _('Yes, I want to receive news about the service.'),
  85         }
  86         help_texts = {
  87             'full_name':
  88                 _('This is how we will address you in our ' 'communications.'),
  89             'ml_consent':
  90                 _('We will send regular updates (no more than once a month) '
  91                   'about the new features and updates about our service.'),
  92         }
  93 
  94     def _post_clean(self):
  95         super()._post_clean()
  96         # Validate the password after self.instance is updated with form data
  97         # by super().
  98         password = self.cleaned_data.get('new_password')
  99         if password:
  100             try:
  101                 password_validation.validate_password(password, self.instance)
  102             except forms.ValidationError as error:
  103                 self.add_error('new_password', error)
  104 
  105     def save(self, commit=True):
  106         user = super().save(commit=False)
  107 
  108         new_password = self.cleaned_data['new_password']
  109         if new_password:
  110             user.set_password(new_password)
  111 
  112         if commit:
  113             user.save()
  114         return user
  115 
  116 
  117 class ContributorProfileForm(forms.ModelForm):
  118     """Edit contributor profile related user data."""
  119 
  120     class Meta:
  121         model = User
  122         fields = ['organization', 'role', 'contact_phone']
  123         labels = {
  124             'organization': _('Your organization'),
  125             'role': _('Your position'),
  126         }
  127
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/src/accounts/forms.py b/src/accounts/forms.py
  --- a/src/accounts/forms.py
  +++ b/src/accounts/forms.py
  @@ -39,6 +39,13 @@
   
   
   class LoginForm(AuthenticationForm):
  +    error_messages = {
  +        'invalid_login': _(
  +            'Please enter a correct email address and password.'
  +        ),
  +        'inactive': _('This account is inactive.'),
  +    }
  +
       username = forms.EmailField(
           label=_('Your email address'),
           required=True)
  
verification_info: {"golden_diff": "diff --git a/src/accounts/forms.py b/src/accounts/forms.py\n--- a/src/accounts/forms.py\n+++ b/src/accounts/forms.py\n@@ -39,6 +39,13 @@\n \n \n class LoginForm(AuthenticationForm):\n+    error_messages = {\n+        'invalid_login': _(\n+            'Please enter a correct email address and password.'\n+        ),\n+        'inactive': _('This account is inactive.'),\n+    }\n+\n     username = forms.EmailField(\n         label=_('Your email address'),\n         required=True)\n", "issue": "Mauvais article et mauvaise casse pour message d'erreur sur adresse mail\nSur la page `/comptes/connexion/`, on voit : \r\n\r\n```\r\nSaisissez un Adresse e-mail\u2026\r\n```\r\n\r\nAlors que l'on devrait avoir : \r\n\r\n```\r\nSaisissez une adresse e-mail\u2026\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/6030745/90972240-a399de00-e517-11ea-89e7-85a6d0445ee2.png)\r\n\r\nLa base du message d'erreur vient des [fichiers de traduction de Django](https://github.com/django/django/blob/6376278a904e2f8b34893a7166508dfd205fdceb/django/contrib/auth/locale/fr/LC_MESSAGES/django.po) : \r\n\r\n```py\r\nmsgid \"\"\r\n\"Please enter a correct %(username)s and password. Note that both fields may \"\r\n\"be case-sensitive.\"\r\nmsgstr \"\"\r\n\"Saisissez un %(username)s et un mot de passe valides. Remarquez que chacun \"\r\n\"de ces champs est sensible \u00e0 la casse (diff\u00e9renciation des majuscules/\"\r\n\"minuscules).\"\r\n```\r\n\r\nEt \u00e0 la place du placeholder `%(username)s`, on a `Adresse e-mail` dans ce projet.\r\n\r\nDans le fichier de traduction (`django.po`) du projet actuel, on voit : \r\n\r\n```py\r\nmsgid \"Email address\"\r\nmsgstr \"Adresse e-mail\"\r\n```\n", "before_files": [{"content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.auth.forms import AuthenticationForm\nfrom django.contrib.auth import password_validation\n\nfrom accounts.models import User\n\n\nclass RegisterForm(forms.ModelForm):\n    \"\"\"Form used to create new user accounts.\"\"\"\n\n    email = forms.EmailField(\n        label=_('Your email address'),\n        required=True,\n        help_text=_('We will send a confirmation link to '\n                    'this address before creating the account.'))\n    full_name = forms.CharField(\n        label=_('Your full name'),\n        required=True,\n        help_text=_('This is how we will address you in our communications.'))\n    ml_consent = forms.BooleanField(\n        label=_('I want to receive news and communications from the service.'),\n        required=False,\n        help_text=_('You will be able to unsubscribe at any time.'))\n\n    class Meta:\n        model = User\n        fields = ['full_name', 'email', 'ml_consent']\n\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.fields['full_name'].widget.attrs.update({'autofocus': True})\n        self.fields['email'].widget.attrs.update({\n            'placeholder': _('Please double-check this value.')})\n\n    def clean_email(self):\n        email = self.cleaned_data['email']\n        return email.lower()\n\n\nclass LoginForm(AuthenticationForm):\n    username = forms.EmailField(\n        label=_('Your email address'),\n        required=True)\n    password = forms.CharField(\n        label=_('Your password'),\n        required=True,\n        strip=False,\n        widget=forms.PasswordInput)\n\n    def clean_username(self):\n        \"\"\"Don't prevent users to login when they user uppercase emails.\"\"\"\n\n        username = self.cleaned_data['username']\n        return username.lower()\n\n\nclass PasswordResetForm(forms.Form):\n    \"\"\"Password reset request form.\"\"\"\n\n    username = forms.EmailField(\n        label=_('Your email address'),\n        required=True)\n\n\nclass ProfileForm(forms.ModelForm):\n    \"\"\"Edit profile related user data.\"\"\"\n\n    new_password = forms.CharField(\n        label=_('Choose a new password'),\n        required=False,\n        strip=False,\n        help_text=password_validation.password_validators_help_text_html(),\n        widget=forms.PasswordInput(attrs={\n            'placeholder': _('Leave empty to keep your existing password')\n        }))\n\n    class Meta:\n        model = User\n        fields = ['full_name', 'new_password', 'ml_consent']\n        labels = {\n            'full_name': _('Your full name'),\n            'ml_consent':\n                _('Yes, I want to receive news about the service.'),\n        }\n        help_texts = {\n            'full_name':\n                _('This is how we will address you in our ' 'communications.'),\n            'ml_consent':\n                _('We will send regular updates (no more than once a month) '\n                  'about the new features and updates about our service.'),\n        }\n\n    def _post_clean(self):\n        super()._post_clean()\n        # Validate the password after self.instance is updated with form data\n        # by super().\n        password = self.cleaned_data.get('new_password')\n        if password:\n            try:\n                password_validation.validate_password(password, self.instance)\n            except forms.ValidationError as error:\n                self.add_error('new_password', error)\n\n    def save(self, commit=True):\n        user = super().save(commit=False)\n\n        new_password = self.cleaned_data['new_password']\n        if new_password:\n            user.set_password(new_password)\n\n        if commit:\n            user.save()\n        return user\n\n\nclass ContributorProfileForm(forms.ModelForm):\n    \"\"\"Edit contributor profile related user data.\"\"\"\n\n    class Meta:\n        model = User\n        fields = ['organization', 'role', 'contact_phone']\n        labels = {\n            'organization': _('Your organization'),\n            'role': _('Your position'),\n        }\n", "path": "src/accounts/forms.py"}], "after_files": [{"content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.auth.forms import AuthenticationForm\nfrom django.contrib.auth import password_validation\n\nfrom accounts.models import User\n\n\nclass RegisterForm(forms.ModelForm):\n    \"\"\"Form used to create new user accounts.\"\"\"\n\n    email = forms.EmailField(\n        label=_('Your email address'),\n        required=True,\n        help_text=_('We will send a confirmation link to '\n                    'this address before creating the account.'))\n    full_name = forms.CharField(\n        label=_('Your full name'),\n        required=True,\n        help_text=_('This is how we will address you in our communications.'))\n    ml_consent = forms.BooleanField(\n        label=_('I want to receive news and communications from the service.'),\n        required=False,\n        help_text=_('You will be able to unsubscribe at any time.'))\n\n    class Meta:\n        model = User\n        fields = ['full_name', 'email', 'ml_consent']\n\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.fields['full_name'].widget.attrs.update({'autofocus': True})\n        self.fields['email'].widget.attrs.update({\n            'placeholder': _('Please double-check this value.')})\n\n    def clean_email(self):\n        email = self.cleaned_data['email']\n        return email.lower()\n\n\nclass LoginForm(AuthenticationForm):\n    error_messages = {\n        'invalid_login': _(\n            'Please enter a correct email address and password.'\n        ),\n        'inactive': _('This account is inactive.'),\n    }\n\n    username = forms.EmailField(\n        label=_('Your email address'),\n        required=True)\n    password = forms.CharField(\n        label=_('Your password'),\n        required=True,\n        strip=False,\n        widget=forms.PasswordInput)\n\n    def clean_username(self):\n        \"\"\"Don't prevent users to login when they user uppercase emails.\"\"\"\n\n        username = self.cleaned_data['username']\n        return username.lower()\n\n\nclass PasswordResetForm(forms.Form):\n    \"\"\"Password reset request form.\"\"\"\n\n    username = forms.EmailField(\n        label=_('Your email address'),\n        required=True)\n\n\nclass ProfileForm(forms.ModelForm):\n    \"\"\"Edit profile related user data.\"\"\"\n\n    new_password = forms.CharField(\n        label=_('Choose a new password'),\n        required=False,\n        strip=False,\n        help_text=password_validation.password_validators_help_text_html(),\n        widget=forms.PasswordInput(attrs={\n            'placeholder': _('Leave empty to keep your existing password')\n        }))\n\n    class Meta:\n        model = User\n        fields = ['full_name', 'new_password', 'ml_consent']\n        labels = {\n            'full_name': _('Your full name'),\n            'ml_consent':\n                _('Yes, I want to receive news about the service.'),\n        }\n        help_texts = {\n            'full_name':\n                _('This is how we will address you in our ' 'communications.'),\n            'ml_consent':\n                _('We will send regular updates (no more than once a month) '\n                  'about the new features and updates about our service.'),\n        }\n\n    def _post_clean(self):\n        super()._post_clean()\n        # Validate the password after self.instance is updated with form data\n        # by super().\n        password = self.cleaned_data.get('new_password')\n        if password:\n            try:\n                password_validation.validate_password(password, self.instance)\n            except forms.ValidationError as error:\n                self.add_error('new_password', error)\n\n    def save(self, commit=True):\n        user = super().save(commit=False)\n\n        new_password = self.cleaned_data['new_password']\n        if new_password:\n            user.set_password(new_password)\n\n        if commit:\n            user.save()\n        return user\n\n\nclass ContributorProfileForm(forms.ModelForm):\n    \"\"\"Edit contributor profile related user data.\"\"\"\n\n    class Meta:\n        model = User\n        fields = ['organization', 'role', 'contact_phone']\n        labels = {\n            'organization': _('Your organization'),\n            'role': _('Your position'),\n        }\n", "path": "src/accounts/forms.py"}]}