forked from recloudstream/cloudstream
[skip ci] fix xml header being slightly wrong
This commit is contained in:
parent
9c40abc4d3
commit
5245eff6e1
1 changed files with 4 additions and 2 deletions
6
.github/locales.py
vendored
6
.github/locales.py
vendored
|
@ -56,6 +56,8 @@ for file in glob.glob(f"{XML_NAME}*/strings.xml"):
|
|||
if child.text.startswith("\\@string/"):
|
||||
print(f"[{file}] fixing {child.attrib['name']}")
|
||||
child.text = child.text.replace("\\@string/", "@string/")
|
||||
tree.write(file, encoding="utf-8", method="xml", pretty_print=True, xml_declaration=True)
|
||||
with open(file, 'w') as fp:
|
||||
fp.write('<?xml version="1.0" encoding="utf-8"?>\n')
|
||||
tree.write(fp, encoding="utf-8", method="xml", pretty_print=True, xml_declaration=False)
|
||||
except ET.ParseError as ex:
|
||||
print(f"[{file}] {ex}")
|
||||
print(f"[{file}] {ex}")
|
||||
|
|
Loading…
Reference in a new issue