Skip to content

Commit

Permalink
Merge pull request #26245 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-26169

feat: workspace extraction improvements (backport #26169)
  • Loading branch information
akhilnarang committed Apr 30, 2024
2 parents ebf1a54 + 7d6a40a commit 32e6ac6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions frappe/gettext/extractors/workspace.py
Expand Up @@ -35,6 +35,15 @@ def extract(fileobj, *args, **kwargs):
)
for link in data.get("links", [])
)
yield from (
(
None,
"pgettext",
(link.get("link_to") if link.get("link_type") == "DocType" else None, link.get("description")),
[f"Description of a {link.get('type')} in the {workspace_name} Workspace"],
)
for link in data.get("links", [])
)
yield from (
(
None,
Expand All @@ -44,3 +53,12 @@ def extract(fileobj, *args, **kwargs):
)
for shortcut in data.get("shortcuts", [])
)
yield from (
(
None,
"pgettext",
(shortcut.get("link_to") if shortcut.get("type") == "DocType" else None, shortcut.get("format")),
[f"Count format of shortcut in the {workspace_name} Workspace"],
)
for shortcut in data.get("shortcuts", [])
)

0 comments on commit 32e6ac6

Please sign in to comment.