qt: Extract translations correctly from UTF-8 formatted source

This commit is contained in:
Hennadii Stepanov 2021-05-17 13:20:07 +02:00 committed by UdjinM6
parent 09239a17c7
commit ac2e9ea1e7
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -58,7 +58,7 @@ if not XGETTEXT:
print('Cannot extract strings: xgettext utility is not installed or not configured.',file=sys.stderr)
print('Please install package "gettext" and re-run \'./configure\'.',file=sys.stderr)
sys.exit(1)
child = Popen([XGETTEXT,'--output=-','-n','--keyword=_'] + files, stdout=PIPE)
child = Popen([XGETTEXT,'--output=-','--from-code=utf-8','-n','--keyword=_'] + files, stdout=PIPE)
(out, err) = child.communicate()
messages = parse_po(out.decode('utf-8'))