From 2319e04d955d46c5fd1482b12bfa31d9246feffa Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Wed, 26 Jul 2023 17:32:11 +0100 Subject: [PATCH] Add header to XML fragments file A header containing a charset is required by xgettext. --- po/update_po.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/po/update_po.py b/po/update_po.py index 790adce8f..0793f9b29 100644 --- a/po/update_po.py +++ b/po/update_po.py @@ -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')