mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-07-30 16:38:31 +00:00
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:
@ -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:
|
with open(f"./resources-{l[0]}/strings/strings.xml", "r", encoding="utf-8") as r:
|
||||||
prev = BeautifulSoup(r.read().replace("\r", ""), features="xml")
|
prev = BeautifulSoup(r.read().replace("\r", ""), features="xml")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
prev = BeautifulSoup("", features=["xml"])
|
prev = BeautifulSoup("", features="xml")
|
||||||
try:
|
try:
|
||||||
with open(f"./resources-{l[0]}/strings/corrections.xml", "r", encoding="utf-8") as r:
|
with open(f"./resources-{l[0]}/strings/corrections.xml", "r", encoding="utf-8") as r:
|
||||||
curr = BeautifulSoup(r.read().replace("\r", ""), features="xml")
|
curr = BeautifulSoup(r.read().replace("\r", ""), features="xml")
|
||||||
|
Reference in New Issue
Block a user