On translation error, allow build to continue after asking user

svn: r20802
This commit is contained in:
Benny Malengier 2012-12-20 16:40:23 +00:00
parent 2040716b9c
commit 4d7e1043ef

View File

@ -96,8 +96,15 @@ def build_trans(build_cmd):
if newer(po_file, mo_file):
cmd = 'msgfmt %s -o %s' % (po_file, mo_file)
if os.system(cmd) != 0:
os.remove(mo_file)
msg = 'ERROR: Building language translation files failed.'
raise SystemExit(msg)
ask = msg + '\n Continue building y/n [n] '
if sys.version_info[0] < 3:
reply = raw_input(ask)
else:
reply = input(ask)
if reply in ['n', 'N']:
raise SystemExit(msg)
#linux specific piece:
target = 'share/locale/' + lang + '/LC_MESSAGES'