in fluent/migrate/_context.py [0:0]
def read_legacy_resource(self, path: str):
"""Read a legacy resource and parse it into a dict."""
parser = getParser(path)
parser.readFile(path)
# Transform the parsed result which is an iterator into a dict.
return {
entity.key: entity.val
for entity in parser
if entity.localized or self.enforce_translated
}