fix: dont translate desktop icon

This commit is contained in:
sokumon 2025-11-14 02:53:36 +05:30
parent a0caf8e320
commit fbf4e29e25

View file

@ -179,16 +179,15 @@ def get_desktop_icons(user=None):
user_icons.sort(key=lambda a: a.idx) user_icons.sort(key=lambda a: a.idx)
# translate # translate
for d in user_icons: # for d in user_icons:
if d.label: # if d.label:
d.label = _(d.label, context=d.parent) # d.label = _(d.label, context=d.parent)
# includes # includes
permitted_icons = [] permitted_icons = []
permitted_parent_labels = set() permitted_parent_labels = set()
for s in user_icons: for s in user_icons:
icon = frappe.get_lazy_doc("Desktop Icon", s) icon = frappe.get_doc("Desktop Icon", s)
if icon.is_permitted(): if icon.is_permitted():
permitted_icons.append(s) permitted_icons.append(s)