feat: workspace extraction improvements (#26169)

* feat: add extractor for count format of shortcut

* feat: add extraction of description string
This commit is contained in:
Exequiel Arona 2024-04-30 07:44:34 -03:00 committed by GitHub
parent 6a6ded156f
commit 2263acf80c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
@ -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", [])
)