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)