Update translate.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: __JosephAbbey <me@josephabbey.dev>
This commit is contained in:
__JosephAbbey
2025-07-24 23:46:15 +01:00
committed by GitHub
parent c599b9fcf3
commit d43c2d427f

View File

@ -108,7 +108,7 @@ with open("./resources/strings/strings.xml", "r") as f:
with open(f"./resources-{l[0]}/strings/strings.xml", "r", encoding="utf-8") as r:
prev = BeautifulSoup(r.read().replace("\r", ""), features="xml")
except FileNotFoundError:
prev = BeautifulSoup("", features=["xml"])
prev = BeautifulSoup("", features="xml")
try:
with open(f"./resources-{l[0]}/strings/corrections.xml", "r", encoding="utf-8") as r:
curr = BeautifulSoup(r.read().replace("\r", ""), features="xml")