From 780a4ce2d73d4285a3659e94aaa71aa5cf9770cc Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 19 Jul 2024 14:04:15 +0530 Subject: [PATCH] Fix bug footer menu items not translated --- publichealth/home/templatetags/navigation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/publichealth/home/templatetags/navigation.py b/publichealth/home/templatetags/navigation.py index 7025c5d..f03aea3 100644 --- a/publichealth/home/templatetags/navigation.py +++ b/publichealth/home/templatetags/navigation.py @@ -78,15 +78,13 @@ def menuitems_children(parent, context=None): items_to_remove = [] for menuitem in menuitems_children: try: - if type(menuitem) == ContactForm: - menuitem.title = menuitem.title - else: - menuitem.title = menuitem.trans_title if 'devenez' in menuitem.title.lower() and remove_devenez: items_to_remove.append(menuitem) elif 'mitglied werden' in menuitem.title.lower() and remove_mitglied: items_to_remove.append(menuitem) + menuitem.title = menuitem.trans_title except AttributeError: + print("Menuitem %s has an issue :: %s" % (menuitem.title, str(ae))) pass for item in items_to_remove: menuitems_children = menuitems_children & Page.objects.not_page(item)