From c8c07839a0ed1de2ff0dab2ca10324c059d52653 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 8 Jun 2022 14:37:17 +0100 Subject: [PATCH] Pick up show_locale_labels from the calling template --- wagtail/admin/views/chooser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wagtail/admin/views/chooser.py b/wagtail/admin/views/chooser.py index d0465aa3d7..832830058a 100644 --- a/wagtail/admin/views/chooser.py +++ b/wagtail/admin/views/chooser.py @@ -108,6 +108,11 @@ class PageChooserTable(Table): return " ".join(classnames) + def get_context_data(self, parent_context): + context = super().get_context_data(parent_context) + context["show_locale_labels"] = parent_context.get("show_locale_labels", False) + return context + class PageTitleColumn(Column): cell_template_name = "wagtailadmin/chooser/tables/page_title_cell.html"