From c5884221d422132f53f636cb5a7644a2c14ce55e Mon Sep 17 00:00:00 2001 From: Sab Pyrope Date: Thu, 22 Aug 2024 11:14:30 +0800 Subject: [PATCH] extractor fix --- lang/string_extractor/parsers/mapgen.py | 6 ++++++ lang/string_extractor/parsers/oter_vision.py | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lang/string_extractor/parsers/mapgen.py b/lang/string_extractor/parsers/mapgen.py index e7d79c915c56e..789d08a3f3001 100644 --- a/lang/string_extractor/parsers/mapgen.py +++ b/lang/string_extractor/parsers/mapgen.py @@ -71,3 +71,9 @@ def parse_mapgen_object(json, origin, om): write_text(m["name"], origin, comment="Name of the monster {} placed on map {}" .format(desc, om)) + + if "place_graffiti" in json: + for graffiti in json["place_graffiti"]: + if "text" in graffiti: + write_text(graffiti["text"], origin, + comment="Graffiti placed on map {}".format(om)) diff --git a/lang/string_extractor/parsers/oter_vision.py b/lang/string_extractor/parsers/oter_vision.py index 70d388e4c4f20..67136323614b1 100644 --- a/lang/string_extractor/parsers/oter_vision.py +++ b/lang/string_extractor/parsers/oter_vision.py @@ -4,6 +4,6 @@ def parse_oter_vision(json, origin): if "levels" in json: for level in json["levels"]: - if "name" in json: - write_text(json["name"], origin, - comment="oter vision level name") + if "name" in level: + write_text(level["name"], origin, + comment="Overmap terrain vision level name")