autotools: teach extract_strings_qt.py to respect the XGETTEXT env variable

This commit is contained in:
Cory Fields 2013-09-14 11:48:27 -04:00
parent f286aa1611
commit f3f09462cd

View File

@ -6,6 +6,7 @@ they can be picked up by Qt linguist.
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
import glob import glob
import operator import operator
import os
OUT_CPP="src/qt/bitcoinstrings.cpp" OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""'] EMPTY=['""']
@ -49,7 +50,8 @@ def parse_po(text):
files = glob.glob('src/*.cpp') + glob.glob('src/*.h') files = glob.glob('src/*.cpp') + glob.glob('src/*.h')
# xgettext -n --keyword=_ $FILES # xgettext -n --keyword=_ $FILES
child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE) XGETTEXT=os.getenv('XGETTEXT', 'gettext')
child = Popen([XGETTEXT,'--output=-','-n','--keyword=_'] + files, stdout=PIPE)
(out, err) = child.communicate() (out, err) = child.communicate()
messages = parse_po(out) messages = parse_po(out)