Skip to content

Commit

Permalink
Fix missing BOM
Browse files Browse the repository at this point in the history
The BOM was missing
  • Loading branch information
NicolasGrosjean committed Jan 2, 2021
1 parent 1dbb829 commit 6b67b20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/copy_on_other_languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def copy_on_other_languages(localisation_dir, source_lang, dest_langs):
for file in files:
with open(os.path.join(root, file), 'r') as f:
lines = f.readlines()
with open(os.path.join(root, file.replace(f'{source_lang}.yml', f'{dest_lang}.yml')), 'w') as f:
f.write(f'l_{dest_lang}:\n')
with open(os.path.join(root, file.replace(f'{source_lang}.yml', f'{dest_lang}.yml')), 'w',
encoding='utf-8') as f:
f.write(f'\ufeffl_{dest_lang}:\n')
for i in range(1, len(lines)):
f.write(lines[i])
os.remove(os.path.join(root, file))
Expand Down

0 comments on commit 6b67b20

Please sign in to comment.