Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Laserlicht authored Oct 13, 2024
1 parent 9e69557 commit a06fd95
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,15 @@ def get_translation_mods_translation():
data = {}
for key, value in translation_mods.items():
tmp = {}
for item in value[1]["translations"]:
base_url = value[0].rsplit('/', 1)[0] + "/content/"
try:
tmp_str = urllib.request.urlopen(base_url + item).read()
except:
tmp_str = urllib.request.urlopen((base_url + item).replace("content", "Content").replace("config", "Config")).read()
tmp |= load_vcmi_json(tmp_str)
data[key] = tmp
if "translations" in value[1]:
for item in value[1]["translations"]:
base_url = value[0].rsplit('/', 1)[0] + "/content/"
try:
tmp_str = urllib.request.urlopen(base_url + item).read()
except:
tmp_str = urllib.request.urlopen((base_url + item).replace("content", "Content").replace("config", "Config")).read()
tmp |= load_vcmi_json(tmp_str)
data[key] = tmp
return data

def get_translation_mods_translation_assets():
Expand Down

0 comments on commit a06fd95

Please sign in to comment.