Skip to content

Commit 451df66

Browse files
authored
Merge pull request #1068 from hkad98/jkd/develop
feat: add support for rich text content in `to_translate`
2 parents e9fbf2c + 1abbcbc commit 451df66

File tree

1 file changed

+5
-2
lines changed
  • gooddata-sdk/gooddata_sdk/catalog/workspace

1 file changed

+5
-2
lines changed

gooddata-sdk/gooddata_sdk/catalog/workspace/service.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,12 @@ def get_texts_to_translate(
754754
# Hack: translate titles in free-form, which is not processed intentionally by this SDK
755755
for section in dashboard.content["layout"]["sections"]:
756756
for item in section["items"]:
757-
title = item["widget"].get("title")
758-
description = item["widget"].get("description")
757+
widget = item["widget"]
758+
title = widget.get("title")
759+
description = widget.get("description")
759760
self.add_title_description(to_translate, title, description)
761+
if widget.get("type") == "richText" and "content" in widget:
762+
to_translate.add(widget["content"])
760763
if "header" in section:
761764
title = section["header"].get("title")
762765
description = section["header"].get("description")

0 commit comments

Comments
 (0)