From fa7349cedf4e15f4b829b8dd08e3868256b6b915 Mon Sep 17 00:00:00 2001 From: anastasianayden Date: Tue, 16 Apr 2024 09:14:27 +0200 Subject: [PATCH] fix title translation --- ckanext/gdi_userportal/logic/action/translation_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/gdi_userportal/logic/action/translation_utils.py b/ckanext/gdi_userportal/logic/action/translation_utils.py index 7191eaf..524714c 100644 --- a/ckanext/gdi_userportal/logic/action/translation_utils.py +++ b/ckanext/gdi_userportal/logic/action/translation_utils.py @@ -100,6 +100,6 @@ def replace_search_facets(data, translation_dict): new_facets = {} for key, facet in data.items(): title = facet["title"] - new_facets[key] = {"title": translation_dict.get(title, title)} + new_facets[key] = {"title": get_translations([title]).get(title, title)} new_facets[key]["items"] = [_change_facet(item, translation_dict) for item in facet["items"]] - return data + return new_facets