fix locales.py

This commit is contained in:
Cloudburst 2024-06-24 21:09:41 +02:00 committed by GitHub
parent 0d40b5ebe3
commit 09fe9873cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

2
.github/locales.py vendored
View file

@ -53,6 +53,8 @@ for file in glob.glob(f"{XML_NAME}*/strings.xml"):
try: try:
tree = ET.parse(file) tree = ET.parse(file)
for child in tree.getroot(): for child in tree.getroot():
if not child.text:
continue
if child.text.startswith("\\@string/"): if child.text.startswith("\\@string/"):
print(f"[{file}] fixing {child.attrib['name']}") print(f"[{file}] fixing {child.attrib['name']}")
child.text = child.text.replace("\\@string/", "@string/") child.text = child.text.replace("\\@string/", "@string/")