Add --from-code parameter to xgettext for a python3 activity
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
This commit is contained in:
parent
6fc675e848
commit
ecf335c19c
@ -26,6 +26,7 @@ is setup by creating a `setup.py` file in the project with the following::
|
|||||||
bundlebuilder.start()
|
bundlebuilder.start()
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
import six
|
||||||
import argparse
|
import argparse
|
||||||
import operator
|
import operator
|
||||||
import os
|
import os
|
||||||
@ -563,7 +564,10 @@ def cmd_genpot(config, options):
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
args = ['xgettext', '--join-existing', '--language=Python',
|
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
|
args += python_files
|
||||||
retcode = subprocess.call(args)
|
retcode = subprocess.call(args)
|
||||||
|
Loading…
Reference in New Issue
Block a user