prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Enable translations for hotspots subsystem
  There are unused translations at the hotspots subsystem, which could be enabled due to finished and available translations. At the moment there is a mix of English and the configured user language.
  
  Affected file: zerver/lib/hotspots.py
  
  Example (mixed English/German):
  ![grafik](https://user-images.githubusercontent.com/7988080/91609700-28518580-e978-11ea-8073-c8f368253595.png)
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `zerver/lib/hotspots.py`
  Content:
  ```
  1 # See https://zulip.readthedocs.io/en/latest/subsystems/hotspots.html
  2 # for documentation on this subsystem.
  3 from typing import Dict, List
  4 
  5 from django.conf import settings
  6 from django.utils.translation import ugettext as _
  7 
  8 from zerver.models import UserHotspot, UserProfile
  9 
  10 ALL_HOTSPOTS: Dict[str, Dict[str, str]] = {
  11     'intro_reply': {
  12         'title': _('Reply to a message'),
  13         'description': _('Click anywhere on a message to reply.'),
  14     },
  15     'intro_streams': {
  16         'title': _('Catch up on a stream'),
  17         'description': _('Messages sent to a stream are seen by everyone subscribed '
  18                          'to that stream. Try clicking on one of the stream links below.'),
  19     },
  20     'intro_topics': {
  21         'title': _('Topics'),
  22         'description': _('Every message has a topic. Topics keep conversations '
  23                          'easy to follow, and make it easy to reply to conversations that start '
  24                          'while you are offline.'),
  25     },
  26     'intro_gear': {
  27         'title': _('Settings'),
  28         'description': _('Go to Settings to configure your '
  29                          'notifications and display settings.'),
  30     },
  31     'intro_compose': {
  32         'title': _('Compose'),
  33         'description': _('Click here to start a new conversation. Pick a topic '
  34                          '(2-3 words is best), and give it a go!'),
  35     },
  36 }
  37 
  38 def get_next_hotspots(user: UserProfile) -> List[Dict[str, object]]:
  39     # For manual testing, it can be convenient to set
  40     # ALWAYS_SEND_ALL_HOTSPOTS=True in `zproject/dev_settings.py` to
  41     # make it easy to click on all of the hotspots.  Note that
  42     # ALWAYS_SEND_ALL_HOTSPOTS has some bugs; see ReadTheDocs (link
  43     # above) for details.
  44     if settings.ALWAYS_SEND_ALL_HOTSPOTS:
  45         return [{
  46             'name': hotspot,
  47             'title': ALL_HOTSPOTS[hotspot]['title'],
  48             'description': ALL_HOTSPOTS[hotspot]['description'],
  49             'delay': 0,
  50         } for hotspot in ALL_HOTSPOTS]
  51 
  52     if user.tutorial_status == UserProfile.TUTORIAL_FINISHED:
  53         return []
  54 
  55     seen_hotspots = frozenset(UserHotspot.objects.filter(user=user).values_list('hotspot', flat=True))
  56     for hotspot in ['intro_reply', 'intro_streams', 'intro_topics', 'intro_gear', 'intro_compose']:
  57         if hotspot not in seen_hotspots:
  58             return [{
  59                 'name': hotspot,
  60                 'title': ALL_HOTSPOTS[hotspot]['title'],
  61                 'description': ALL_HOTSPOTS[hotspot]['description'],
  62                 'delay': 0.5,
  63             }]
  64 
  65     user.tutorial_status = UserProfile.TUTORIAL_FINISHED
  66     user.save(update_fields=['tutorial_status'])
  67     return []
  68 
  69 def copy_hotpots(source_profile: UserProfile, target_profile: UserProfile) -> None:
  70     for userhotspot in frozenset(UserHotspot.objects.filter(user=source_profile)):
  71         UserHotspot.objects.create(user=target_profile, hotspot=userhotspot.hotspot,
  72                                    timestamp=userhotspot.timestamp)
  73 
  74     target_profile.tutorial_status = source_profile.tutorial_status
  75     target_profile.onboarding_steps = source_profile.onboarding_steps
  76     target_profile.save(update_fields=['tutorial_status', 'onboarding_steps'])
  77
  ```
  --- 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/zerver/lib/hotspots.py b/zerver/lib/hotspots.py
  --- a/zerver/lib/hotspots.py
  +++ b/zerver/lib/hotspots.py
  @@ -3,7 +3,7 @@
   from typing import Dict, List
   
   from django.conf import settings
  -from django.utils.translation import ugettext as _
  +from django.utils.translation import ugettext_lazy as _
   
   from zerver.models import UserHotspot, UserProfile
   
  @@ -44,8 +44,8 @@
       if settings.ALWAYS_SEND_ALL_HOTSPOTS:
           return [{
               'name': hotspot,
  -            'title': ALL_HOTSPOTS[hotspot]['title'],
  -            'description': ALL_HOTSPOTS[hotspot]['description'],
  +            'title': str(ALL_HOTSPOTS[hotspot]['title']),
  +            'description': str(ALL_HOTSPOTS[hotspot]['description']),
               'delay': 0,
           } for hotspot in ALL_HOTSPOTS]
   
  @@ -57,8 +57,8 @@
           if hotspot not in seen_hotspots:
               return [{
                   'name': hotspot,
  -                'title': ALL_HOTSPOTS[hotspot]['title'],
  -                'description': ALL_HOTSPOTS[hotspot]['description'],
  +                'title': str(ALL_HOTSPOTS[hotspot]['title']),
  +                'description': str(ALL_HOTSPOTS[hotspot]['description']),
                   'delay': 0.5,
               }]
  
verification_info: {"golden_diff": "diff --git a/zerver/lib/hotspots.py b/zerver/lib/hotspots.py\n--- a/zerver/lib/hotspots.py\n+++ b/zerver/lib/hotspots.py\n@@ -3,7 +3,7 @@\n from typing import Dict, List\n \n from django.conf import settings\n-from django.utils.translation import ugettext as _\n+from django.utils.translation import ugettext_lazy as _\n \n from zerver.models import UserHotspot, UserProfile\n \n@@ -44,8 +44,8 @@\n     if settings.ALWAYS_SEND_ALL_HOTSPOTS:\n         return [{\n             'name': hotspot,\n-            'title': ALL_HOTSPOTS[hotspot]['title'],\n-            'description': ALL_HOTSPOTS[hotspot]['description'],\n+            'title': str(ALL_HOTSPOTS[hotspot]['title']),\n+            'description': str(ALL_HOTSPOTS[hotspot]['description']),\n             'delay': 0,\n         } for hotspot in ALL_HOTSPOTS]\n \n@@ -57,8 +57,8 @@\n         if hotspot not in seen_hotspots:\n             return [{\n                 'name': hotspot,\n-                'title': ALL_HOTSPOTS[hotspot]['title'],\n-                'description': ALL_HOTSPOTS[hotspot]['description'],\n+                'title': str(ALL_HOTSPOTS[hotspot]['title']),\n+                'description': str(ALL_HOTSPOTS[hotspot]['description']),\n                 'delay': 0.5,\n             }]\n", "issue": "Enable translations for hotspots subsystem\nThere are unused translations at the hotspots subsystem, which could be enabled due to finished and available translations. At the moment there is a mix of English and the configured user language.\r\n\r\nAffected file: zerver/lib/hotspots.py\r\n\r\nExample (mixed English/German):\r\n![grafik](https://user-images.githubusercontent.com/7988080/91609700-28518580-e978-11ea-8073-c8f368253595.png)\r\n\n", "before_files": [{"content": "# See https://zulip.readthedocs.io/en/latest/subsystems/hotspots.html\n# for documentation on this subsystem.\nfrom typing import Dict, List\n\nfrom django.conf import settings\nfrom django.utils.translation import ugettext as _\n\nfrom zerver.models import UserHotspot, UserProfile\n\nALL_HOTSPOTS: Dict[str, Dict[str, str]] = {\n    'intro_reply': {\n        'title': _('Reply to a message'),\n        'description': _('Click anywhere on a message to reply.'),\n    },\n    'intro_streams': {\n        'title': _('Catch up on a stream'),\n        'description': _('Messages sent to a stream are seen by everyone subscribed '\n                         'to that stream. Try clicking on one of the stream links below.'),\n    },\n    'intro_topics': {\n        'title': _('Topics'),\n        'description': _('Every message has a topic. Topics keep conversations '\n                         'easy to follow, and make it easy to reply to conversations that start '\n                         'while you are offline.'),\n    },\n    'intro_gear': {\n        'title': _('Settings'),\n        'description': _('Go to Settings to configure your '\n                         'notifications and display settings.'),\n    },\n    'intro_compose': {\n        'title': _('Compose'),\n        'description': _('Click here to start a new conversation. Pick a topic '\n                         '(2-3 words is best), and give it a go!'),\n    },\n}\n\ndef get_next_hotspots(user: UserProfile) -> List[Dict[str, object]]:\n    # For manual testing, it can be convenient to set\n    # ALWAYS_SEND_ALL_HOTSPOTS=True in `zproject/dev_settings.py` to\n    # make it easy to click on all of the hotspots.  Note that\n    # ALWAYS_SEND_ALL_HOTSPOTS has some bugs; see ReadTheDocs (link\n    # above) for details.\n    if settings.ALWAYS_SEND_ALL_HOTSPOTS:\n        return [{\n            'name': hotspot,\n            'title': ALL_HOTSPOTS[hotspot]['title'],\n            'description': ALL_HOTSPOTS[hotspot]['description'],\n            'delay': 0,\n        } for hotspot in ALL_HOTSPOTS]\n\n    if user.tutorial_status == UserProfile.TUTORIAL_FINISHED:\n        return []\n\n    seen_hotspots = frozenset(UserHotspot.objects.filter(user=user).values_list('hotspot', flat=True))\n    for hotspot in ['intro_reply', 'intro_streams', 'intro_topics', 'intro_gear', 'intro_compose']:\n        if hotspot not in seen_hotspots:\n            return [{\n                'name': hotspot,\n                'title': ALL_HOTSPOTS[hotspot]['title'],\n                'description': ALL_HOTSPOTS[hotspot]['description'],\n                'delay': 0.5,\n            }]\n\n    user.tutorial_status = UserProfile.TUTORIAL_FINISHED\n    user.save(update_fields=['tutorial_status'])\n    return []\n\ndef copy_hotpots(source_profile: UserProfile, target_profile: UserProfile) -> None:\n    for userhotspot in frozenset(UserHotspot.objects.filter(user=source_profile)):\n        UserHotspot.objects.create(user=target_profile, hotspot=userhotspot.hotspot,\n                                   timestamp=userhotspot.timestamp)\n\n    target_profile.tutorial_status = source_profile.tutorial_status\n    target_profile.onboarding_steps = source_profile.onboarding_steps\n    target_profile.save(update_fields=['tutorial_status', 'onboarding_steps'])\n", "path": "zerver/lib/hotspots.py"}], "after_files": [{"content": "# See https://zulip.readthedocs.io/en/latest/subsystems/hotspots.html\n# for documentation on this subsystem.\nfrom typing import Dict, List\n\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom zerver.models import UserHotspot, UserProfile\n\nALL_HOTSPOTS: Dict[str, Dict[str, str]] = {\n    'intro_reply': {\n        'title': _('Reply to a message'),\n        'description': _('Click anywhere on a message to reply.'),\n    },\n    'intro_streams': {\n        'title': _('Catch up on a stream'),\n        'description': _('Messages sent to a stream are seen by everyone subscribed '\n                         'to that stream. Try clicking on one of the stream links below.'),\n    },\n    'intro_topics': {\n        'title': _('Topics'),\n        'description': _('Every message has a topic. Topics keep conversations '\n                         'easy to follow, and make it easy to reply to conversations that start '\n                         'while you are offline.'),\n    },\n    'intro_gear': {\n        'title': _('Settings'),\n        'description': _('Go to Settings to configure your '\n                         'notifications and display settings.'),\n    },\n    'intro_compose': {\n        'title': _('Compose'),\n        'description': _('Click here to start a new conversation. Pick a topic '\n                         '(2-3 words is best), and give it a go!'),\n    },\n}\n\ndef get_next_hotspots(user: UserProfile) -> List[Dict[str, object]]:\n    # For manual testing, it can be convenient to set\n    # ALWAYS_SEND_ALL_HOTSPOTS=True in `zproject/dev_settings.py` to\n    # make it easy to click on all of the hotspots.  Note that\n    # ALWAYS_SEND_ALL_HOTSPOTS has some bugs; see ReadTheDocs (link\n    # above) for details.\n    if settings.ALWAYS_SEND_ALL_HOTSPOTS:\n        return [{\n            'name': hotspot,\n            'title': str(ALL_HOTSPOTS[hotspot]['title']),\n            'description': str(ALL_HOTSPOTS[hotspot]['description']),\n            'delay': 0,\n        } for hotspot in ALL_HOTSPOTS]\n\n    if user.tutorial_status == UserProfile.TUTORIAL_FINISHED:\n        return []\n\n    seen_hotspots = frozenset(UserHotspot.objects.filter(user=user).values_list('hotspot', flat=True))\n    for hotspot in ['intro_reply', 'intro_streams', 'intro_topics', 'intro_gear', 'intro_compose']:\n        if hotspot not in seen_hotspots:\n            return [{\n                'name': hotspot,\n                'title': str(ALL_HOTSPOTS[hotspot]['title']),\n                'description': str(ALL_HOTSPOTS[hotspot]['description']),\n                'delay': 0.5,\n            }]\n\n    user.tutorial_status = UserProfile.TUTORIAL_FINISHED\n    user.save(update_fields=['tutorial_status'])\n    return []\n\ndef copy_hotpots(source_profile: UserProfile, target_profile: UserProfile) -> None:\n    for userhotspot in frozenset(UserHotspot.objects.filter(user=source_profile)):\n        UserHotspot.objects.create(user=target_profile, hotspot=userhotspot.hotspot,\n                                   timestamp=userhotspot.timestamp)\n\n    target_profile.tutorial_status = source_profile.tutorial_status\n    target_profile.onboarding_steps = source_profile.onboarding_steps\n    target_profile.save(update_fields=['tutorial_status', 'onboarding_steps'])\n", "path": "zerver/lib/hotspots.py"}]}