Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonatan-lopes committed Sep 24, 2023
1 parent 303c7cb commit fb5c260
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions wagtail_localize/views/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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",
)

Expand Down

0 comments on commit fb5c260

Please sign in to comment.