Skip to content

Commit

Permalink
Merge pull request CleverRaven#53917 from BrettDong/item
Browse files Browse the repository at this point in the history
Improve translation comments for items
  • Loading branch information
Rivet-the-Zombie authored Dec 31, 2021
2 parents 524a7db + dc3f412 commit 3c23511
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lang/string_extractor/parsers/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@

def parse_generic(json, origin):
name = ""
comment = []
if "//" in json:
comment.append(json["//"])
if "//isbn13" in json:
comment.append("ISBN {}".format(json["//isbn13"]))

if "name" in json:
name = get_singular_name(json["name"])
write_text(json["name"], origin, comment="Item name",
write_text(json["name"], origin, comment=comment + ["Item name"],
plural=True, c_format=False)
elif "id" in json:
name = json["id"]

if "description" in json:
write_text(json["description"], origin, c_format=False,
comment="Description of \"{}\"".format(name))
comment=comment + ["Description of \"{}\"".format(name)])

if "use_action" in json:
parse_use_action(json["use_action"], origin, name)
Expand Down

0 comments on commit 3c23511

Please sign in to comment.