diff --git a/.github/locales.py b/.github/locales.py index 04d9cd13..9ab272b9 100644 --- a/.github/locales.py +++ b/.github/locales.py @@ -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('\n') + tree.write(fp, encoding="utf-8", method="xml", pretty_print=True, xml_declaration=False) except ET.ParseError as ex: - print(f"[{file}] {ex}") \ No newline at end of file + print(f"[{file}] {ex}")