prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Separate XLIFF export options
  ### Motivation
  <!-- A clear and concise description of what the motivation for the new feature is, and what problem it is solving. -->
  Apparently, the two options to export XLIFF files (either all pages or only public pages) are too similar and lead to accidental misclicks.
  
  ### Proposed Solution
  <!-- A clear and concise description of the feature you would like to add, and how it solves the motivating problem. -->
  - Move the public option to the top (since this is the most used)
  - Reword the "all pages" option to make it more obvious that this includes drafts
  - Maybe add an exclamation mark or similar to the "all pages" option
  
  ### Alternatives
  <!-- A clear and concise description of any alternative solutions or features you've considered, and why you're proposed solution is better. -->
  
  
  ### Additional Context
  <!-- Add any other information or screenshots about the feature request here. -->
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `integreat_cms/cms/views/pages/page_bulk_actions.py`
  Content:
  ```
  1 import logging
  2 
  3 from django.contrib import messages
  4 from django.shortcuts import get_object_or_404
  5 from django.utils.translation import ugettext as _
  6 from django.views.generic.list import MultipleObjectMixin
  7 
  8 from ....xliff.utils import pages_to_xliff_file
  9 from ...models import Page
  10 from ...utils.pdf_utils import generate_pdf
  11 from ...utils.translation_utils import ugettext_many_lazy as __
  12 from ..bulk_action_views import BulkActionView
  13 
  14 logger = logging.getLogger(__name__)
  15 
  16 
  17 class PageBulkActionMixin(MultipleObjectMixin):
  18     """
  19     Mixin for page bulk actions
  20     """
  21 
  22     #: The model of this :class:`~integreat_cms.cms.views.bulk_action_views.BulkActionView`
  23     model = Page
  24 
  25 
  26 # pylint: disable=too-many-ancestors
  27 class GeneratePdfView(PageBulkActionMixin, BulkActionView):
  28     """
  29     Bulk action for generating a PDF document of the content
  30     """
  31 
  32     #: Whether the view requires change permissions
  33     require_change_permission = False
  34     #: Whether the public translation objects should be prefetched
  35     prefetch_public_translations = True
  36 
  37     def post(self, request, *args, **kwargs):
  38         r"""
  39         Apply the bulk action on every item in the queryset and redirect
  40 
  41         :param request: The current request
  42         :type request: ~django.http.HttpResponse
  43 
  44         :param \*args: The supplied arguments
  45         :type \*args: list
  46 
  47         :param \**kwargs: The supplied keyword arguments
  48         :type \**kwargs: dict
  49 
  50         :return: The redirect
  51         :rtype: ~django.http.HttpResponseRedirect
  52         """
  53         # Generate PDF document and redirect to it
  54         return generate_pdf(
  55             request.region,
  56             kwargs.get("language_slug"),
  57             self.get_queryset(),
  58         )
  59 
  60 
  61 # pylint: disable=too-many-ancestors
  62 class ExportXliffView(PageBulkActionMixin, BulkActionView):
  63     """
  64     Bulk action for generating XLIFF files for translations
  65     """
  66 
  67     #: Whether only public translation should be exported
  68     only_public = False
  69     #: Whether the view requires change permissions
  70     require_change_permission = False
  71 
  72     def post(self, request, *args, **kwargs):
  73         r"""
  74         Function for handling a pdf export request for pages.
  75         The pages get extracted from request.GET attribute and the request is forwarded to :func:`~integreat_cms.cms.utils.pdf_utils.generate_pdf`
  76 
  77         :param request: The current request
  78         :type request: ~django.http.HttpResponse
  79 
  80         :param \*args: The supplied arguments
  81         :type \*args: list
  82 
  83         :param \**kwargs: The supplied keyword arguments
  84         :type \**kwargs: dict
  85 
  86         :return: The redirect
  87         :rtype: ~django.http.HttpResponseRedirect
  88         """
  89         target_language = get_object_or_404(
  90             self.request.region.language_tree_nodes,
  91             language__slug=kwargs.get("language_slug"),
  92             parent__isnull=False,
  93         ).language
  94 
  95         xliff_file_url = pages_to_xliff_file(
  96             request, self.get_queryset(), target_language, only_public=self.only_public
  97         )
  98         if xliff_file_url:
  99             # Insert link with automatic download into success message
  100             messages.success(
  101                 request,
  102                 __(
  103                     _("XLIFF file for translation to {} successfully created.").format(
  104                         target_language
  105                     ),
  106                     _(
  107                         "If the download does not start automatically, please click {}here{}."
  108                     ).format(
  109                         f"<a data-auto-download href='{xliff_file_url}' class='font-bold underline hover:no-underline' download>",
  110                         "</a>",
  111                     ),
  112                 ),
  113             )
  114 
  115         # Let the base view handle the redirect
  116         return super().post(request, *args, **kwargs)
  117
  ```
  --- 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/integreat_cms/cms/views/pages/page_bulk_actions.py b/integreat_cms/cms/views/pages/page_bulk_actions.py
  --- a/integreat_cms/cms/views/pages/page_bulk_actions.py
  +++ b/integreat_cms/cms/views/pages/page_bulk_actions.py
  @@ -100,9 +100,13 @@
               messages.success(
                   request,
                   __(
  -                    _("XLIFF file for translation to {} successfully created.").format(
  -                        target_language
  -                    ),
  +                    _(
  +                        "XLIFF file with published pages only for translation to {} successfully created."
  +                    ).format(target_language)
  +                    if self.only_public
  +                    else _(
  +                        "XLIFF file with unpublished and published pages for translation to {} successfully created."
  +                    ).format(target_language),
                       _(
                           "If the download does not start automatically, please click {}here{}."
                       ).format(
  
verification_info: {"golden_diff": "diff --git a/integreat_cms/cms/views/pages/page_bulk_actions.py b/integreat_cms/cms/views/pages/page_bulk_actions.py\n--- a/integreat_cms/cms/views/pages/page_bulk_actions.py\n+++ b/integreat_cms/cms/views/pages/page_bulk_actions.py\n@@ -100,9 +100,13 @@\n             messages.success(\n                 request,\n                 __(\n-                    _(\"XLIFF file for translation to {} successfully created.\").format(\n-                        target_language\n-                    ),\n+                    _(\n+                        \"XLIFF file with published pages only for translation to {} successfully created.\"\n+                    ).format(target_language)\n+                    if self.only_public\n+                    else _(\n+                        \"XLIFF file with unpublished and published pages for translation to {} successfully created.\"\n+                    ).format(target_language),\n                     _(\n                         \"If the download does not start automatically, please click {}here{}.\"\n                     ).format(\n", "issue": "Separate XLIFF export options\n### Motivation\r\n<!-- A clear and concise description of what the motivation for the new feature is, and what problem it is solving. -->\r\nApparently, the two options to export XLIFF files (either all pages or only public pages) are too similar and lead to accidental misclicks.\r\n\r\n### Proposed Solution\r\n<!-- A clear and concise description of the feature you would like to add, and how it solves the motivating problem. -->\r\n- Move the public option to the top (since this is the most used)\r\n- Reword the \"all pages\" option to make it more obvious that this includes drafts\r\n- Maybe add an exclamation mark or similar to the \"all pages\" option\r\n\r\n### Alternatives\r\n<!-- A clear and concise description of any alternative solutions or features you've considered, and why you're proposed solution is better. -->\r\n\r\n\r\n### Additional Context\r\n<!-- Add any other information or screenshots about the feature request here. -->\r\n\r\n\n", "before_files": [{"content": "import logging\n\nfrom django.contrib import messages\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import ugettext as _\nfrom django.views.generic.list import MultipleObjectMixin\n\nfrom ....xliff.utils import pages_to_xliff_file\nfrom ...models import Page\nfrom ...utils.pdf_utils import generate_pdf\nfrom ...utils.translation_utils import ugettext_many_lazy as __\nfrom ..bulk_action_views import BulkActionView\n\nlogger = logging.getLogger(__name__)\n\n\nclass PageBulkActionMixin(MultipleObjectMixin):\n    \"\"\"\n    Mixin for page bulk actions\n    \"\"\"\n\n    #: The model of this :class:`~integreat_cms.cms.views.bulk_action_views.BulkActionView`\n    model = Page\n\n\n# pylint: disable=too-many-ancestors\nclass GeneratePdfView(PageBulkActionMixin, BulkActionView):\n    \"\"\"\n    Bulk action for generating a PDF document of the content\n    \"\"\"\n\n    #: Whether the view requires change permissions\n    require_change_permission = False\n    #: Whether the public translation objects should be prefetched\n    prefetch_public_translations = True\n\n    def post(self, request, *args, **kwargs):\n        r\"\"\"\n        Apply the bulk action on every item in the queryset and redirect\n\n        :param request: The current request\n        :type request: ~django.http.HttpResponse\n\n        :param \\*args: The supplied arguments\n        :type \\*args: list\n\n        :param \\**kwargs: The supplied keyword arguments\n        :type \\**kwargs: dict\n\n        :return: The redirect\n        :rtype: ~django.http.HttpResponseRedirect\n        \"\"\"\n        # Generate PDF document and redirect to it\n        return generate_pdf(\n            request.region,\n            kwargs.get(\"language_slug\"),\n            self.get_queryset(),\n        )\n\n\n# pylint: disable=too-many-ancestors\nclass ExportXliffView(PageBulkActionMixin, BulkActionView):\n    \"\"\"\n    Bulk action for generating XLIFF files for translations\n    \"\"\"\n\n    #: Whether only public translation should be exported\n    only_public = False\n    #: Whether the view requires change permissions\n    require_change_permission = False\n\n    def post(self, request, *args, **kwargs):\n        r\"\"\"\n        Function for handling a pdf export request for pages.\n        The pages get extracted from request.GET attribute and the request is forwarded to :func:`~integreat_cms.cms.utils.pdf_utils.generate_pdf`\n\n        :param request: The current request\n        :type request: ~django.http.HttpResponse\n\n        :param \\*args: The supplied arguments\n        :type \\*args: list\n\n        :param \\**kwargs: The supplied keyword arguments\n        :type \\**kwargs: dict\n\n        :return: The redirect\n        :rtype: ~django.http.HttpResponseRedirect\n        \"\"\"\n        target_language = get_object_or_404(\n            self.request.region.language_tree_nodes,\n            language__slug=kwargs.get(\"language_slug\"),\n            parent__isnull=False,\n        ).language\n\n        xliff_file_url = pages_to_xliff_file(\n            request, self.get_queryset(), target_language, only_public=self.only_public\n        )\n        if xliff_file_url:\n            # Insert link with automatic download into success message\n            messages.success(\n                request,\n                __(\n                    _(\"XLIFF file for translation to {} successfully created.\").format(\n                        target_language\n                    ),\n                    _(\n                        \"If the download does not start automatically, please click {}here{}.\"\n                    ).format(\n                        f\"<a data-auto-download href='{xliff_file_url}' class='font-bold underline hover:no-underline' download>\",\n                        \"</a>\",\n                    ),\n                ),\n            )\n\n        # Let the base view handle the redirect\n        return super().post(request, *args, **kwargs)\n", "path": "integreat_cms/cms/views/pages/page_bulk_actions.py"}], "after_files": [{"content": "import logging\n\nfrom django.contrib import messages\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import ugettext as _\nfrom django.views.generic.list import MultipleObjectMixin\n\nfrom ....xliff.utils import pages_to_xliff_file\nfrom ...models import Page\nfrom ...utils.pdf_utils import generate_pdf\nfrom ...utils.translation_utils import ugettext_many_lazy as __\nfrom ..bulk_action_views import BulkActionView\n\nlogger = logging.getLogger(__name__)\n\n\nclass PageBulkActionMixin(MultipleObjectMixin):\n    \"\"\"\n    Mixin for page bulk actions\n    \"\"\"\n\n    #: The model of this :class:`~integreat_cms.cms.views.bulk_action_views.BulkActionView`\n    model = Page\n\n\n# pylint: disable=too-many-ancestors\nclass GeneratePdfView(PageBulkActionMixin, BulkActionView):\n    \"\"\"\n    Bulk action for generating a PDF document of the content\n    \"\"\"\n\n    #: Whether the view requires change permissions\n    require_change_permission = False\n    #: Whether the public translation objects should be prefetched\n    prefetch_public_translations = True\n\n    def post(self, request, *args, **kwargs):\n        r\"\"\"\n        Apply the bulk action on every item in the queryset and redirect\n\n        :param request: The current request\n        :type request: ~django.http.HttpResponse\n\n        :param \\*args: The supplied arguments\n        :type \\*args: list\n\n        :param \\**kwargs: The supplied keyword arguments\n        :type \\**kwargs: dict\n\n        :return: The redirect\n        :rtype: ~django.http.HttpResponseRedirect\n        \"\"\"\n        # Generate PDF document and redirect to it\n        return generate_pdf(\n            request.region,\n            kwargs.get(\"language_slug\"),\n            self.get_queryset(),\n        )\n\n\n# pylint: disable=too-many-ancestors\nclass ExportXliffView(PageBulkActionMixin, BulkActionView):\n    \"\"\"\n    Bulk action for generating XLIFF files for translations\n    \"\"\"\n\n    #: Whether only public translation should be exported\n    only_public = False\n    #: Whether the view requires change permissions\n    require_change_permission = False\n\n    def post(self, request, *args, **kwargs):\n        r\"\"\"\n        Function for handling a pdf export request for pages.\n        The pages get extracted from request.GET attribute and the request is forwarded to :func:`~integreat_cms.cms.utils.pdf_utils.generate_pdf`\n\n        :param request: The current request\n        :type request: ~django.http.HttpResponse\n\n        :param \\*args: The supplied arguments\n        :type \\*args: list\n\n        :param \\**kwargs: The supplied keyword arguments\n        :type \\**kwargs: dict\n\n        :return: The redirect\n        :rtype: ~django.http.HttpResponseRedirect\n        \"\"\"\n        target_language = get_object_or_404(\n            self.request.region.language_tree_nodes,\n            language__slug=kwargs.get(\"language_slug\"),\n            parent__isnull=False,\n        ).language\n\n        xliff_file_url = pages_to_xliff_file(\n            request, self.get_queryset(), target_language, only_public=self.only_public\n        )\n        if xliff_file_url:\n            # Insert link with automatic download into success message\n            messages.success(\n                request,\n                __(\n                    _(\n                        \"XLIFF file with published pages only for translation to {} successfully created.\"\n                    ).format(target_language)\n                    if self.only_public\n                    else _(\n                        \"XLIFF file with unpublished and published pages for translation to {} successfully created.\"\n                    ).format(target_language),\n                    _(\n                        \"If the download does not start automatically, please click {}here{}.\"\n                    ).format(\n                        f\"<a data-auto-download href='{xliff_file_url}' class='font-bold underline hover:no-underline' download>\",\n                        \"</a>\",\n                    ),\n                ),\n            )\n\n        # Let the base view handle the redirect\n        return super().post(request, *args, **kwargs)\n", "path": "integreat_cms/cms/views/pages/page_bulk_actions.py"}]}