diff -r 6d1bf321fb89 -r 2f2b2152580f i18n/mki18n.py --- a/i18n/mki18n.py Thu Oct 11 12:09:04 2018 +0300 +++ b/i18n/mki18n.py Fri Oct 12 10:42:47 2018 +0300 @@ -84,8 +84,10 @@ import os import sys import re +from builtins import str as text import wx + # ----------------------------------------------------------------------------- # Global variables # ---------------- @@ -200,7 +202,7 @@ os.chdir(applicationDirectoryPath) filelist = 'app.fil' if not os.path.exists(filelist): - raise IOError(2, 'No module file: ' % filelist) + raise IOError(2, 'No module file: %s' % filelist) fileout = 'messages.pot' # Steps: @@ -487,7 +489,7 @@ try: optionList, pargs = getopt.getopt(sys.argv[1:], validOptions, validLongOptions) except getopt.GetoptError as e: - printUsage(e[0]) + printUsage(e) sys.exit(1) for (opt, val) in optionList: if opt == '-h': @@ -513,7 +515,7 @@ makePO(appDirPath, option['domain'], option['verbose']) exit_code = 0 except IOError as e: - printUsage(e[1] + '\n You must write a file app.fil that contains the list of all files to parse.') + printUsage(text(e) + '\n You must write a file app.fil that contains the list of all files to parse.') if option['mo']: makeMO(appDirPath, option['moTarget'], option['domain'], option['verbose'], option['forceEnglish']) exit_code = 0