Skip to content

Commit

Permalink
Merge pull request #72992 from BrettDong/fix-text-extraction
Browse files Browse the repository at this point in the history
Properly handle default_clause without text in translation string extractor
  • Loading branch information
Maleclypse authored Apr 18, 2024
2 parents 5b6b22d + 730f733 commit 6f9c45c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/string_extractor/parsers/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def parse_widget(json, origin):
comment = "Text in portion of UI widget \"{}\"".format(id)
if "text" in phrase:
write_text(phrase["text"], origin, comment=comment)
if "default_clause" in json:
if "default_clause" in json and "text" in json["default_clause"]:
write_text(json["default_clause"]["text"], origin,
comment="Default clause of UI widget \"{}\"".format(id))
if "clauses" in json:
Expand Down

0 comments on commit 6f9c45c

Please sign in to comment.