Skip to content

Commit

Permalink
Add header to XML fragments file
Browse files Browse the repository at this point in the history
A header containing a charset is required by xgettext.
  • Loading branch information
Nick-Hall committed Jul 26, 2023
1 parent 91473e6 commit 2319e04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions po/update_po.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ def xml_fragments():
print("Checking for XML fragments in Python files")
modop = int(len(files) / 20)
wfp = open("fragments.pot", 'w', encoding='utf-8')
wfp.write('msgid ""\n')
wfp.write('msgstr ""\n')
wfp.write('"Content-Type: text/plain; charset=UTF-8\\n"\n\n')
for indx, filename in enumerate(files):
if not indx % modop:
print(int(indx / len(files) * 100), end='\r')
Expand Down

0 comments on commit 2319e04

Please sign in to comment.