From f75da85d8394e08e4436bd087baee7481cf9844b Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:14:57 +0200 Subject: [PATCH] fix: remove context from translatable strings in Workspace (#27249) --- frappe/gettext/extractors/workspace.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frappe/gettext/extractors/workspace.py b/frappe/gettext/extractors/workspace.py index 76ca108df4..4c58c373be 100644 --- a/frappe/gettext/extractors/workspace.py +++ b/frappe/gettext/extractors/workspace.py @@ -29,8 +29,8 @@ def extract(fileobj, *args, **kwargs): yield from ( ( None, - "pgettext", - (link.get("link_to") if link.get("link_type") == "DocType" else None, link.get("label")), + "_", + link.get("label"), [f"Label of a {link.get('type')} in the {workspace_name} Workspace"], ) for link in data.get("links", []) @@ -38,8 +38,8 @@ def extract(fileobj, *args, **kwargs): yield from ( ( None, - "pgettext", - (link.get("link_to") if link.get("link_type") == "DocType" else None, link.get("description")), + "_", + link.get("description"), [f"Description of a {link.get('type')} in the {workspace_name} Workspace"], ) for link in data.get("links", []) @@ -47,8 +47,8 @@ def extract(fileobj, *args, **kwargs): yield from ( ( None, - "pgettext", - (shortcut.get("link_to") if shortcut.get("type") == "DocType" else None, shortcut.get("label")), + "_", + shortcut.get("label"), [f"Label of a shortcut in the {workspace_name} Workspace"], ) for shortcut in data.get("shortcuts", []) @@ -56,8 +56,8 @@ def extract(fileobj, *args, **kwargs): yield from ( ( None, - "pgettext", - (shortcut.get("link_to") if shortcut.get("type") == "DocType" else None, shortcut.get("format")), + "_", + shortcut.get("format"), [f"Count format of shortcut in the {workspace_name} Workspace"], ) for shortcut in data.get("shortcuts", [])