prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  draft and live action labels are unclear 
  ![screen shot 2017-01-05 at 12 42 52](https://cloud.githubusercontent.com/assets/7290588/21680947/944efe00-d344-11e6-9cbd-870f91fe9d5f.png)
  
  I don't think it's clear what the 'draft' and 'live' buttons will do. Could we include the full labels 'Preview draft' and 'View live'? 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `wagtail/wagtailadmin/wagtail_hooks.py`
  Content:
  ```
  1 from __future__ import absolute_import, unicode_literals
  2 
  3 from django import forms
  4 from django.contrib.auth.models import Permission
  5 from django.contrib.staticfiles.templatetags.staticfiles import static
  6 from django.core.urlresolvers import reverse
  7 from django.utils.translation import ugettext_lazy as _
  8 from wagtail.wagtailadmin.menu import MenuItem, SubmenuMenuItem, settings_menu
  9 from wagtail.wagtailadmin.search import SearchArea
  10 from wagtail.wagtailadmin.widgets import Button, ButtonWithDropdownFromHook, PageListingButton
  11 from wagtail.wagtailcore import hooks
  12 from wagtail.wagtailcore.permissions import collection_permission_policy
  13 
  14 
  15 class ExplorerMenuItem(MenuItem):
  16     @property
  17     def media(self):
  18         return forms.Media(js=[static('wagtailadmin/js/explorer-menu.js')])
  19 
  20 
  21 @hooks.register('register_admin_menu_item')
  22 def register_explorer_menu_item():
  23     return ExplorerMenuItem(
  24         _('Explorer'), reverse('wagtailadmin_explore_root'),
  25         name='explorer',
  26         classnames='icon icon-folder-open-inverse dl-trigger',
  27         attrs={'data-explorer-menu-url': reverse('wagtailadmin_explorer_nav')},
  28         order=100)
  29 
  30 
  31 class SettingsMenuItem(SubmenuMenuItem):
  32     template = 'wagtailadmin/shared/menu_settings_menu_item.html'
  33 
  34 
  35 @hooks.register('register_admin_menu_item')
  36 def register_settings_menu():
  37     return SettingsMenuItem(
  38         _('Settings'), settings_menu, classnames='icon icon-cogs', order=10000)
  39 
  40 
  41 @hooks.register('register_permissions')
  42 def register_permissions():
  43     return Permission.objects.filter(content_type__app_label='wagtailadmin', codename='access_admin')
  44 
  45 
  46 @hooks.register('register_admin_search_area')
  47 def register_pages_search_area():
  48     return SearchArea(
  49         _('Pages'), reverse('wagtailadmin_pages:search'),
  50         name='pages',
  51         classnames='icon icon-folder-open-inverse',
  52         order=100)
  53 
  54 
  55 class CollectionsMenuItem(MenuItem):
  56     def is_shown(self, request):
  57         return collection_permission_policy.user_has_any_permission(
  58             request.user, ['add', 'change', 'delete']
  59         )
  60 
  61 
  62 @hooks.register('register_settings_menu_item')
  63 def register_collections_menu_item():
  64     return CollectionsMenuItem(_('Collections'), reverse('wagtailadmin_collections:index'), classnames='icon icon-folder-open-1', order=700)
  65 
  66 
  67 @hooks.register('register_page_listing_buttons')
  68 def page_listing_buttons(page, page_perms, is_parent=False):
  69     if page_perms.can_edit():
  70         yield PageListingButton(_('Edit'), reverse('wagtailadmin_pages:edit', args=[page.id]),
  71                                 attrs={'title': _('Edit this page')}, priority=10)
  72     if page.has_unpublished_changes:
  73         yield PageListingButton(_('Draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),
  74                                 attrs={'title': _('Preview draft'), 'target': '_blank'}, priority=20)
  75     if page.live and page.url:
  76         yield PageListingButton(_('Live'), page.url, attrs={'target': "_blank", 'title': _('View live')}, priority=30)
  77     if page_perms.can_add_subpage():
  78         if is_parent:
  79             yield Button(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),
  80                          attrs={'title': _("Add a child page to '{0}' ").format(page.get_admin_display_title())}, classes={'button', 'button-small', 'bicolor', 'icon', 'white', 'icon-plus'}, priority=40)
  81         else:
  82             yield PageListingButton(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),
  83                                     attrs={'title': _("Add a child page to '{0}' ").format(page.get_admin_display_title())}, priority=40)
  84 
  85     yield ButtonWithDropdownFromHook(
  86         _('More'),
  87         hook_name='register_page_listing_more_buttons',
  88         page=page,
  89         page_perms=page_perms,
  90         is_parent=is_parent,
  91         attrs={'target': '_blank', 'title': _('View more options')}, priority=50)
  92 
  93 
  94 @hooks.register('register_page_listing_more_buttons')
  95 def page_listing_more_buttons(page, page_perms, is_parent=False):
  96     if page_perms.can_move():
  97         yield Button(_('Move'), reverse('wagtailadmin_pages:move', args=[page.id]),
  98                      attrs={"title": _('Move this page')}, priority=10)
  99     if not page.is_root():
  100         yield Button(_('Copy'), reverse('wagtailadmin_pages:copy', args=[page.id]),
  101                      attrs={'title': _('Copy this page')}, priority=20)
  102     if page_perms.can_delete():
  103         yield Button(_('Delete'), reverse('wagtailadmin_pages:delete', args=[page.id]),
  104                      attrs={'title': _('Delete this page')}, priority=30)
  105     if page_perms.can_unpublish():
  106         yield Button(_('Unpublish'), reverse('wagtailadmin_pages:unpublish', args=[page.id]),
  107                      attrs={'title': _('Unpublish this page')}, priority=40)
  108     if not page.is_root():
  109         yield Button(_('Revisions'), reverse('wagtailadmin_pages:revisions_index', args=[page.id]),
  110                      attrs={'title': _("View this page's revision history")}, priority=50)
  111
  ```
  --- 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/wagtail/wagtailadmin/wagtail_hooks.py b/wagtail/wagtailadmin/wagtail_hooks.py
  --- a/wagtail/wagtailadmin/wagtail_hooks.py
  +++ b/wagtail/wagtailadmin/wagtail_hooks.py
  @@ -70,10 +70,10 @@
           yield PageListingButton(_('Edit'), reverse('wagtailadmin_pages:edit', args=[page.id]),
                                   attrs={'title': _('Edit this page')}, priority=10)
       if page.has_unpublished_changes:
  -        yield PageListingButton(_('Draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),
  +        yield PageListingButton(_('View draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),
                                   attrs={'title': _('Preview draft'), 'target': '_blank'}, priority=20)
       if page.live and page.url:
  -        yield PageListingButton(_('Live'), page.url, attrs={'target': "_blank", 'title': _('View live')}, priority=30)
  +        yield PageListingButton(_('View live'), page.url, attrs={'target': "_blank", 'title': _('View live')}, priority=30)
       if page_perms.can_add_subpage():
           if is_parent:
               yield Button(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),
  
verification_info: {"golden_diff": "diff --git a/wagtail/wagtailadmin/wagtail_hooks.py b/wagtail/wagtailadmin/wagtail_hooks.py\n--- a/wagtail/wagtailadmin/wagtail_hooks.py\n+++ b/wagtail/wagtailadmin/wagtail_hooks.py\n@@ -70,10 +70,10 @@\n         yield PageListingButton(_('Edit'), reverse('wagtailadmin_pages:edit', args=[page.id]),\n                                 attrs={'title': _('Edit this page')}, priority=10)\n     if page.has_unpublished_changes:\n-        yield PageListingButton(_('Draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),\n+        yield PageListingButton(_('View draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),\n                                 attrs={'title': _('Preview draft'), 'target': '_blank'}, priority=20)\n     if page.live and page.url:\n-        yield PageListingButton(_('Live'), page.url, attrs={'target': \"_blank\", 'title': _('View live')}, priority=30)\n+        yield PageListingButton(_('View live'), page.url, attrs={'target': \"_blank\", 'title': _('View live')}, priority=30)\n     if page_perms.can_add_subpage():\n         if is_parent:\n             yield Button(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),\n", "issue": "draft and live action labels are unclear \n![screen shot 2017-01-05 at 12 42 52](https://cloud.githubusercontent.com/assets/7290588/21680947/944efe00-d344-11e6-9cbd-870f91fe9d5f.png)\r\n\r\nI don't think it's clear what the 'draft' and 'live' buttons will do. Could we include the full labels 'Preview draft' and 'View live'? \n", "before_files": [{"content": "from __future__ import absolute_import, unicode_literals\n\nfrom django import forms\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.staticfiles.templatetags.staticfiles import static\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom wagtail.wagtailadmin.menu import MenuItem, SubmenuMenuItem, settings_menu\nfrom wagtail.wagtailadmin.search import SearchArea\nfrom wagtail.wagtailadmin.widgets import Button, ButtonWithDropdownFromHook, PageListingButton\nfrom wagtail.wagtailcore import hooks\nfrom wagtail.wagtailcore.permissions import collection_permission_policy\n\n\nclass ExplorerMenuItem(MenuItem):\n    @property\n    def media(self):\n        return forms.Media(js=[static('wagtailadmin/js/explorer-menu.js')])\n\n\n@hooks.register('register_admin_menu_item')\ndef register_explorer_menu_item():\n    return ExplorerMenuItem(\n        _('Explorer'), reverse('wagtailadmin_explore_root'),\n        name='explorer',\n        classnames='icon icon-folder-open-inverse dl-trigger',\n        attrs={'data-explorer-menu-url': reverse('wagtailadmin_explorer_nav')},\n        order=100)\n\n\nclass SettingsMenuItem(SubmenuMenuItem):\n    template = 'wagtailadmin/shared/menu_settings_menu_item.html'\n\n\n@hooks.register('register_admin_menu_item')\ndef register_settings_menu():\n    return SettingsMenuItem(\n        _('Settings'), settings_menu, classnames='icon icon-cogs', order=10000)\n\n\n@hooks.register('register_permissions')\ndef register_permissions():\n    return Permission.objects.filter(content_type__app_label='wagtailadmin', codename='access_admin')\n\n\n@hooks.register('register_admin_search_area')\ndef register_pages_search_area():\n    return SearchArea(\n        _('Pages'), reverse('wagtailadmin_pages:search'),\n        name='pages',\n        classnames='icon icon-folder-open-inverse',\n        order=100)\n\n\nclass CollectionsMenuItem(MenuItem):\n    def is_shown(self, request):\n        return collection_permission_policy.user_has_any_permission(\n            request.user, ['add', 'change', 'delete']\n        )\n\n\n@hooks.register('register_settings_menu_item')\ndef register_collections_menu_item():\n    return CollectionsMenuItem(_('Collections'), reverse('wagtailadmin_collections:index'), classnames='icon icon-folder-open-1', order=700)\n\n\n@hooks.register('register_page_listing_buttons')\ndef page_listing_buttons(page, page_perms, is_parent=False):\n    if page_perms.can_edit():\n        yield PageListingButton(_('Edit'), reverse('wagtailadmin_pages:edit', args=[page.id]),\n                                attrs={'title': _('Edit this page')}, priority=10)\n    if page.has_unpublished_changes:\n        yield PageListingButton(_('Draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),\n                                attrs={'title': _('Preview draft'), 'target': '_blank'}, priority=20)\n    if page.live and page.url:\n        yield PageListingButton(_('Live'), page.url, attrs={'target': \"_blank\", 'title': _('View live')}, priority=30)\n    if page_perms.can_add_subpage():\n        if is_parent:\n            yield Button(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),\n                         attrs={'title': _(\"Add a child page to '{0}' \").format(page.get_admin_display_title())}, classes={'button', 'button-small', 'bicolor', 'icon', 'white', 'icon-plus'}, priority=40)\n        else:\n            yield PageListingButton(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),\n                                    attrs={'title': _(\"Add a child page to '{0}' \").format(page.get_admin_display_title())}, priority=40)\n\n    yield ButtonWithDropdownFromHook(\n        _('More'),\n        hook_name='register_page_listing_more_buttons',\n        page=page,\n        page_perms=page_perms,\n        is_parent=is_parent,\n        attrs={'target': '_blank', 'title': _('View more options')}, priority=50)\n\n\n@hooks.register('register_page_listing_more_buttons')\ndef page_listing_more_buttons(page, page_perms, is_parent=False):\n    if page_perms.can_move():\n        yield Button(_('Move'), reverse('wagtailadmin_pages:move', args=[page.id]),\n                     attrs={\"title\": _('Move this page')}, priority=10)\n    if not page.is_root():\n        yield Button(_('Copy'), reverse('wagtailadmin_pages:copy', args=[page.id]),\n                     attrs={'title': _('Copy this page')}, priority=20)\n    if page_perms.can_delete():\n        yield Button(_('Delete'), reverse('wagtailadmin_pages:delete', args=[page.id]),\n                     attrs={'title': _('Delete this page')}, priority=30)\n    if page_perms.can_unpublish():\n        yield Button(_('Unpublish'), reverse('wagtailadmin_pages:unpublish', args=[page.id]),\n                     attrs={'title': _('Unpublish this page')}, priority=40)\n    if not page.is_root():\n        yield Button(_('Revisions'), reverse('wagtailadmin_pages:revisions_index', args=[page.id]),\n                     attrs={'title': _(\"View this page's revision history\")}, priority=50)\n", "path": "wagtail/wagtailadmin/wagtail_hooks.py"}], "after_files": [{"content": "from __future__ import absolute_import, unicode_literals\n\nfrom django import forms\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.staticfiles.templatetags.staticfiles import static\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom wagtail.wagtailadmin.menu import MenuItem, SubmenuMenuItem, settings_menu\nfrom wagtail.wagtailadmin.search import SearchArea\nfrom wagtail.wagtailadmin.widgets import Button, ButtonWithDropdownFromHook, PageListingButton\nfrom wagtail.wagtailcore import hooks\nfrom wagtail.wagtailcore.permissions import collection_permission_policy\n\n\nclass ExplorerMenuItem(MenuItem):\n    @property\n    def media(self):\n        return forms.Media(js=[static('wagtailadmin/js/explorer-menu.js')])\n\n\n@hooks.register('register_admin_menu_item')\ndef register_explorer_menu_item():\n    return ExplorerMenuItem(\n        _('Explorer'), reverse('wagtailadmin_explore_root'),\n        name='explorer',\n        classnames='icon icon-folder-open-inverse dl-trigger',\n        attrs={'data-explorer-menu-url': reverse('wagtailadmin_explorer_nav')},\n        order=100)\n\n\nclass SettingsMenuItem(SubmenuMenuItem):\n    template = 'wagtailadmin/shared/menu_settings_menu_item.html'\n\n\n@hooks.register('register_admin_menu_item')\ndef register_settings_menu():\n    return SettingsMenuItem(\n        _('Settings'), settings_menu, classnames='icon icon-cogs', order=10000)\n\n\n@hooks.register('register_permissions')\ndef register_permissions():\n    return Permission.objects.filter(content_type__app_label='wagtailadmin', codename='access_admin')\n\n\n@hooks.register('register_admin_search_area')\ndef register_pages_search_area():\n    return SearchArea(\n        _('Pages'), reverse('wagtailadmin_pages:search'),\n        name='pages',\n        classnames='icon icon-folder-open-inverse',\n        order=100)\n\n\nclass CollectionsMenuItem(MenuItem):\n    def is_shown(self, request):\n        return collection_permission_policy.user_has_any_permission(\n            request.user, ['add', 'change', 'delete']\n        )\n\n\n@hooks.register('register_settings_menu_item')\ndef register_collections_menu_item():\n    return CollectionsMenuItem(_('Collections'), reverse('wagtailadmin_collections:index'), classnames='icon icon-folder-open-1', order=700)\n\n\n@hooks.register('register_page_listing_buttons')\ndef page_listing_buttons(page, page_perms, is_parent=False):\n    if page_perms.can_edit():\n        yield PageListingButton(_('Edit'), reverse('wagtailadmin_pages:edit', args=[page.id]),\n                                attrs={'title': _('Edit this page')}, priority=10)\n    if page.has_unpublished_changes:\n        yield PageListingButton(_('View draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),\n                                attrs={'title': _('Preview draft'), 'target': '_blank'}, priority=20)\n    if page.live and page.url:\n        yield PageListingButton(_('View live'), page.url, attrs={'target': \"_blank\", 'title': _('View live')}, priority=30)\n    if page_perms.can_add_subpage():\n        if is_parent:\n            yield Button(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),\n                         attrs={'title': _(\"Add a child page to '{0}' \").format(page.get_admin_display_title())}, classes={'button', 'button-small', 'bicolor', 'icon', 'white', 'icon-plus'}, priority=40)\n        else:\n            yield PageListingButton(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),\n                                    attrs={'title': _(\"Add a child page to '{0}' \").format(page.get_admin_display_title())}, priority=40)\n\n    yield ButtonWithDropdownFromHook(\n        _('More'),\n        hook_name='register_page_listing_more_buttons',\n        page=page,\n        page_perms=page_perms,\n        is_parent=is_parent,\n        attrs={'target': '_blank', 'title': _('View more options')}, priority=50)\n\n\n@hooks.register('register_page_listing_more_buttons')\ndef page_listing_more_buttons(page, page_perms, is_parent=False):\n    if page_perms.can_move():\n        yield Button(_('Move'), reverse('wagtailadmin_pages:move', args=[page.id]),\n                     attrs={\"title\": _('Move this page')}, priority=10)\n    if not page.is_root():\n        yield Button(_('Copy'), reverse('wagtailadmin_pages:copy', args=[page.id]),\n                     attrs={'title': _('Copy this page')}, priority=20)\n    if page_perms.can_delete():\n        yield Button(_('Delete'), reverse('wagtailadmin_pages:delete', args=[page.id]),\n                     attrs={'title': _('Delete this page')}, priority=30)\n    if page_perms.can_unpublish():\n        yield Button(_('Unpublish'), reverse('wagtailadmin_pages:unpublish', args=[page.id]),\n                     attrs={'title': _('Unpublish this page')}, priority=40)\n    if not page.is_root():\n        yield Button(_('Revisions'), reverse('wagtailadmin_pages:revisions_index', args=[page.id]),\n                     attrs={'title': _(\"View this page's revision history\")}, priority=50)\n", "path": "wagtail/wagtailadmin/wagtail_hooks.py"}]}