prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Rename "Deadline"
  As part of https://github.com/mozilla/pontoon/pull/1565, we wrote that "Deadline sounds permanent, threatening, and ugly."
  
  Let's replace the word with something else.
  
  Maybe "Due date"?
  Rename "Deadline"
  As part of https://github.com/mozilla/pontoon/pull/1565, we wrote that "Deadline sounds permanent, threatening, and ugly."
  
  Let's replace the word with something else.
  
  Maybe "Due date"?
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `pontoon/projects/management/commands/send_deadline_notifications.py`
  Content:
  ```
  1 import datetime
  2 
  3 from django.contrib.auth.models import User
  4 from django.core.management.base import BaseCommand
  5 from notifications.signals import notify
  6 
  7 from pontoon.base.models import Project
  8 
  9 
  10 class Command(BaseCommand):
  11     help = "Notify contributors about the approaching project deadline"
  12 
  13     def handle(self, *args, **options):
  14         """
  15         This command sends deadline reminders to contributors of projects that
  16         are due in 7 days. If 2 days before the deadline project still isn't
  17         complete for the contributor's locale, notifications are sent again.
  18 
  19         The command is designed to run daily.
  20         """
  21         for project in Project.objects.available():
  22             if project.deadline:
  23                 days_left = (project.deadline - datetime.date.today()).days
  24                 if days_left not in (2, 7):
  25                     continue
  26             else:
  27                 continue
  28 
  29             self.stdout.write(f"Sending deadline notifications for project {project}.")
  30 
  31             is_project_public = project.visibility == Project.Visibility.PUBLIC
  32             verb = f"due in {days_left} days"
  33             locales = []
  34 
  35             for project_locale in project.project_locale.all():
  36                 if project_locale.approved_strings < project_locale.total_strings:
  37                     locales.append(project_locale.locale)
  38 
  39             contributors = (
  40                 User.objects.filter(
  41                     translation__entity__resource__project=project,
  42                     translation__locale__in=locales,
  43                     profile__project_deadline_notifications=True,
  44                 ).distinct(),
  45             )
  46 
  47             for contributor in contributors:
  48                 if is_project_public or contributor.is_superuser:
  49                     notify.send(project, recipient=contributor, verb=verb)
  50 
  51             self.stdout.write(f"Deadline notifications for project {project} sent.")
  52
  ```
  --- 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/pontoon/projects/management/commands/send_deadline_notifications.py b/pontoon/projects/management/commands/send_deadline_notifications.py
  --- a/pontoon/projects/management/commands/send_deadline_notifications.py
  +++ b/pontoon/projects/management/commands/send_deadline_notifications.py
  @@ -8,12 +8,12 @@
   
   
   class Command(BaseCommand):
  -    help = "Notify contributors about the approaching project deadline"
  +    help = "Notify contributors about the approaching project target date"
   
       def handle(self, *args, **options):
           """
  -        This command sends deadline reminders to contributors of projects that
  -        are due in 7 days. If 2 days before the deadline project still isn't
  +        This command sends target date reminders to contributors of projects that
  +        are due in 7 days. If 2 days before the target date project still isn't
           complete for the contributor's locale, notifications are sent again.
   
           The command is designed to run daily.
  @@ -26,7 +26,9 @@
               else:
                   continue
   
  -            self.stdout.write(f"Sending deadline notifications for project {project}.")
  +            self.stdout.write(
  +                f"Sending target date notifications for project {project}."
  +            )
   
               is_project_public = project.visibility == Project.Visibility.PUBLIC
               verb = f"due in {days_left} days"
  @@ -48,4 +50,4 @@
                   if is_project_public or contributor.is_superuser:
                       notify.send(project, recipient=contributor, verb=verb)
   
  -            self.stdout.write(f"Deadline notifications for project {project} sent.")
  +            self.stdout.write(f"Target date notifications for project {project} sent.")
  
verification_info: {"golden_diff": "diff --git a/pontoon/projects/management/commands/send_deadline_notifications.py b/pontoon/projects/management/commands/send_deadline_notifications.py\n--- a/pontoon/projects/management/commands/send_deadline_notifications.py\n+++ b/pontoon/projects/management/commands/send_deadline_notifications.py\n@@ -8,12 +8,12 @@\n \n \n class Command(BaseCommand):\n-    help = \"Notify contributors about the approaching project deadline\"\n+    help = \"Notify contributors about the approaching project target date\"\n \n     def handle(self, *args, **options):\n         \"\"\"\n-        This command sends deadline reminders to contributors of projects that\n-        are due in 7 days. If 2 days before the deadline project still isn't\n+        This command sends target date reminders to contributors of projects that\n+        are due in 7 days. If 2 days before the target date project still isn't\n         complete for the contributor's locale, notifications are sent again.\n \n         The command is designed to run daily.\n@@ -26,7 +26,9 @@\n             else:\n                 continue\n \n-            self.stdout.write(f\"Sending deadline notifications for project {project}.\")\n+            self.stdout.write(\n+                f\"Sending target date notifications for project {project}.\"\n+            )\n \n             is_project_public = project.visibility == Project.Visibility.PUBLIC\n             verb = f\"due in {days_left} days\"\n@@ -48,4 +50,4 @@\n                 if is_project_public or contributor.is_superuser:\n                     notify.send(project, recipient=contributor, verb=verb)\n \n-            self.stdout.write(f\"Deadline notifications for project {project} sent.\")\n+            self.stdout.write(f\"Target date notifications for project {project} sent.\")\n", "issue": "Rename \"Deadline\"\nAs part of https://github.com/mozilla/pontoon/pull/1565, we wrote that \"Deadline sounds permanent, threatening, and ugly.\"\r\n\r\nLet's replace the word with something else.\r\n\r\nMaybe \"Due date\"?\nRename \"Deadline\"\nAs part of https://github.com/mozilla/pontoon/pull/1565, we wrote that \"Deadline sounds permanent, threatening, and ugly.\"\r\n\r\nLet's replace the word with something else.\r\n\r\nMaybe \"Due date\"?\n", "before_files": [{"content": "import datetime\n\nfrom django.contrib.auth.models import User\nfrom django.core.management.base import BaseCommand\nfrom notifications.signals import notify\n\nfrom pontoon.base.models import Project\n\n\nclass Command(BaseCommand):\n    help = \"Notify contributors about the approaching project deadline\"\n\n    def handle(self, *args, **options):\n        \"\"\"\n        This command sends deadline reminders to contributors of projects that\n        are due in 7 days. If 2 days before the deadline project still isn't\n        complete for the contributor's locale, notifications are sent again.\n\n        The command is designed to run daily.\n        \"\"\"\n        for project in Project.objects.available():\n            if project.deadline:\n                days_left = (project.deadline - datetime.date.today()).days\n                if days_left not in (2, 7):\n                    continue\n            else:\n                continue\n\n            self.stdout.write(f\"Sending deadline notifications for project {project}.\")\n\n            is_project_public = project.visibility == Project.Visibility.PUBLIC\n            verb = f\"due in {days_left} days\"\n            locales = []\n\n            for project_locale in project.project_locale.all():\n                if project_locale.approved_strings < project_locale.total_strings:\n                    locales.append(project_locale.locale)\n\n            contributors = (\n                User.objects.filter(\n                    translation__entity__resource__project=project,\n                    translation__locale__in=locales,\n                    profile__project_deadline_notifications=True,\n                ).distinct(),\n            )\n\n            for contributor in contributors:\n                if is_project_public or contributor.is_superuser:\n                    notify.send(project, recipient=contributor, verb=verb)\n\n            self.stdout.write(f\"Deadline notifications for project {project} sent.\")\n", "path": "pontoon/projects/management/commands/send_deadline_notifications.py"}], "after_files": [{"content": "import datetime\n\nfrom django.contrib.auth.models import User\nfrom django.core.management.base import BaseCommand\nfrom notifications.signals import notify\n\nfrom pontoon.base.models import Project\n\n\nclass Command(BaseCommand):\n    help = \"Notify contributors about the approaching project target date\"\n\n    def handle(self, *args, **options):\n        \"\"\"\n        This command sends target date reminders to contributors of projects that\n        are due in 7 days. If 2 days before the target date project still isn't\n        complete for the contributor's locale, notifications are sent again.\n\n        The command is designed to run daily.\n        \"\"\"\n        for project in Project.objects.available():\n            if project.deadline:\n                days_left = (project.deadline - datetime.date.today()).days\n                if days_left not in (2, 7):\n                    continue\n            else:\n                continue\n\n            self.stdout.write(\n                f\"Sending target date notifications for project {project}.\"\n            )\n\n            is_project_public = project.visibility == Project.Visibility.PUBLIC\n            verb = f\"due in {days_left} days\"\n            locales = []\n\n            for project_locale in project.project_locale.all():\n                if project_locale.approved_strings < project_locale.total_strings:\n                    locales.append(project_locale.locale)\n\n            contributors = (\n                User.objects.filter(\n                    translation__entity__resource__project=project,\n                    translation__locale__in=locales,\n                    profile__project_deadline_notifications=True,\n                ).distinct(),\n            )\n\n            for contributor in contributors:\n                if is_project_public or contributor.is_superuser:\n                    notify.send(project, recipient=contributor, verb=verb)\n\n            self.stdout.write(f\"Target date notifications for project {project} sent.\")\n", "path": "pontoon/projects/management/commands/send_deadline_notifications.py"}]}