Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: workspace extraction improvements #26169

Merged
merged 2 commits into from Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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", [])
)