Add --from-code parameter to xgettext for a python3 activity

Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
master
Ibiam Chihurumnaya 4 years ago committed by James Cameron
parent 6fc675e848
commit ecf335c19c

@ -26,6 +26,7 @@ is setup by creating a `setup.py` file in the project with the following::
bundlebuilder.start()
'''
import six
import argparse
import operator
import os
@ -563,7 +564,10 @@ def cmd_genpot(config, options):
f.close()
args = ['xgettext', '--join-existing', '--language=Python',
'--keyword=_', '--add-comments=TRANS:', '--output=%s' % pot_file]
'--keyword=_', '--add-comments=TRANS:',
'--output=%s' % pot_file]
if six.PY3:
args.insert(5, '--from-code=UTF-8')
args += python_files
retcode = subprocess.call(args)

Loading…
Cancel
Save