mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-30 18:23:03 +03:00
Disable code for updating index.html
This commit is contained in:
parent
2e4d6e9c16
commit
160beeb6ce
@ -92,11 +92,11 @@ loaded_localizations("{target_lang}", {localizations_json});
|
||||
with open(f"{os.path.dirname(__file__)}/{target_lang}/localizations.js", "w", encoding="utf8") as f:
|
||||
f.write(js)
|
||||
|
||||
file_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "index.html"))
|
||||
with open(file_path, "r") as f:
|
||||
code = f.read()
|
||||
available_langs_json = json.dumps(available_langs).replace('","', '", "')
|
||||
code = re.sub(r"(available_languages\s*=\s*)\[[^\]]*\]", f"$1{available_langs_json}]", code)
|
||||
with open(file_path, "w") as f:
|
||||
f.write(code)
|
||||
print(f'Updated available_languages list in "{file_path}"')
|
||||
# file_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "index.html"))
|
||||
# with open(file_path, "r") as f:
|
||||
# code = f.read()
|
||||
# available_langs_json = json.dumps(available_langs).replace('","', '", "')
|
||||
# code = re.sub(r"(available_languages\s*=\s*)\[[^\]]*\]", f"$1{available_langs_json}]", code)
|
||||
# with open(file_path, "w") as f:
|
||||
# f.write(code)
|
||||
# print(f'Updated available_languages list in "{file_path}"')
|
||||
|
Loading…
Reference in New Issue
Block a user