internal-v0 / data /update_metadata_from_concepts.py
carlosh93's picture
Updating app version July 15th, 2025
1cfc9e8
raw
history blame contribute delete
675 Bytes
import json
meta = json.load(open("metadata.json", "r", encoding="utf-8"))
concepts = json.load(open("concepts.json", "r", encoding="utf-8"))
for country in concepts:
if not country in meta:
meta[country] = dict()
for language in concepts[country]:
if language not in meta[country]:
meta[country][language] = meta["USA"]["English"]
# FIXME: Remove this after we ask language leads to translate
if not meta[country][language]["Description"].endswith(language):
meta[country][language]["Description"] += f"in {language}"
with open("metadata.json", "w", encoding="utf-8") as f:
json.dump(meta, f, indent=2)