Skip to content

Commit

Permalink
fix: sync strings to not add new line at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
jd1378 committed Jul 25, 2024
1 parent c244318 commit 912a06c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sync_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def save_xml(tree, file_path):
xml_declaration = '<?xml version="1.0" encoding="utf-8"?>\n'
xml_content = ET.tostring(tree.getroot(), encoding="unicode")
xml_content = xml_declaration + xml_content
xml_content = xml_content.replace('\r\n', '\n') # LF ending normalization
xml_content = xml_content.replace('\r\n', '\n').rstrip() # LF ending normalization
with open(file_path, 'wb') as f:
f.write(xml_content.encode('utf-8'))
print(f"Updated strings file saved at {file_path}")
Expand Down

0 comments on commit 912a06c

Please sign in to comment.