diff --git a/plinth/app.py b/plinth/app.py index 46ef1c49c..aa5db71f4 100644 --- a/plinth/app.py +++ b/plinth/app.py @@ -543,17 +543,6 @@ class Info(FollowerComponent): for tag in self._tags ] - @classmethod - def list_tags(self) -> list[str]: - """Return a list of untranslated tags.""" - tags: set[str] = set() - from django.utils.translation import override - with override(language=None): - for app in App.list(): - tags.update((str(tag) for tag in app.info.tags)) - - return list(tags) - class EnableState(LeaderComponent): """A component to hold the enable state of an app using a simple flag. diff --git a/plinth/views.py b/plinth/views.py index 709a87980..803262126 100644 --- a/plinth/views.py +++ b/plinth/views.py @@ -226,8 +226,11 @@ class AppsIndexView(TemplateView): context['tags'] = tags # Sorted tags by localized string - context['all_tags'] = sorted(app_module.Info.list_tags(), - key=lambda tag: _(tag)) + all_tags = set() + for menu_item in menu_items: + all_tags.update(menu_item.tags or []) + + context['all_tags'] = sorted(all_tags, key=lambda tag: _(tag)) context['menu_items'] = self._pick_menu_items(menu_items, tags) return context