From fb5c26084ca5d5f0dac35a7a371568ff4ff297e3 Mon Sep 17 00:00:00 2001 From: Jhonatan Lopes Date: Sun, 24 Sep 2023 10:57:23 -0300 Subject: [PATCH] Address review comments --- wagtail_localize/views/report.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/wagtail_localize/views/report.py b/wagtail_localize/views/report.py index f44dd55a..bcd7b508 100644 --- a/wagtail_localize/views/report.py +++ b/wagtail_localize/views/report.py @@ -100,11 +100,7 @@ def filter(self, qs, value): def _get_locale_choices(): - choices = [ - (language_code, display_name) - for language_code, display_name in get_content_languages().items() - ] - return choices + return list(get_content_languages().items()) class LocaleFilter(django_filters.ChoiceFilter): @@ -124,13 +120,13 @@ class TranslationsReportFilterSet(WagtailFilterSet): field_name="source__locale", choices=_get_locale_choices, empty_label=None, - null_label="All", + null_label=gettext_lazy("All"), null_value="all", ) target_locale = LocaleFilter( choices=_get_locale_choices, empty_label=None, - null_label="All", + null_label=gettext_lazy("All"), null_value="all", )