equal
deleted
inserted
replaced
77 # ----------------------------------------------------------------------------- |
77 # ----------------------------------------------------------------------------- |
78 # Module Import |
78 # Module Import |
79 # ------------- |
79 # ------------- |
80 # |
80 # |
81 |
81 |
82 from __future__ import absolute_import |
82 |
83 from __future__ import print_function |
83 |
84 import os |
84 import os |
85 import sys |
85 import sys |
86 import re |
86 import re |
87 from builtins import str as text |
87 from builtins import str as text |
88 import wx |
88 import wx |
227 verbosePrint(verbose, cmd) |
227 verbosePrint(verbose, cmd) |
228 os.system(cmd) |
228 os.system(cmd) |
229 |
229 |
230 languageDict = getSupportedLanguageDict(applicationName) |
230 languageDict = getSupportedLanguageDict(applicationName) |
231 |
231 |
232 for langCode in languageDict.keys(): |
232 for langCode in list(languageDict.keys()): |
233 if langCode == 'en': |
233 if langCode == 'en': |
234 pass |
234 pass |
235 else: |
235 else: |
236 langPOfileName = "%s_%s.po" % (applicationName, langCode) |
236 langPOfileName = "%s_%s.po" % (applicationName, langCode) |
237 if os.path.exists(langPOfileName): |
237 if os.path.exists(langPOfileName): |
252 currentDir = os.getcwd() |
252 currentDir = os.getcwd() |
253 os.chdir(applicationDirectoryPath) |
253 os.chdir(applicationDirectoryPath) |
254 |
254 |
255 languageDict = getSupportedLanguageDict(applicationName) |
255 languageDict = getSupportedLanguageDict(applicationName) |
256 |
256 |
257 for langCode in languageDict.keys(): |
257 for langCode in list(languageDict.keys()): |
258 if langCode == 'en': |
258 if langCode == 'en': |
259 pass |
259 pass |
260 else: |
260 else: |
261 langPOfileName = "%s_%s.po" % (applicationName, langCode) |
261 langPOfileName = "%s_%s.po" % (applicationName, langCode) |
262 if os.path.exists(langPOfileName): |
262 if os.path.exists(langPOfileName): |
306 currentDir = os.getcwd() |
306 currentDir = os.getcwd() |
307 os.chdir(applicationDirectoryPath) |
307 os.chdir(applicationDirectoryPath) |
308 |
308 |
309 languageDict = getSupportedLanguageDict(applicationName) |
309 languageDict = getSupportedLanguageDict(applicationName) |
310 |
310 |
311 for langCode in languageDict.keys(): |
311 for langCode in list(languageDict.keys()): |
312 if (langCode == 'en') and (forceEnglish == 0): |
312 if (langCode == 'en') and (forceEnglish == 0): |
313 pass |
313 pass |
314 else: |
314 else: |
315 langPOfileName = "%s_%s.po" % (applicationName, langCode) |
315 langPOfileName = "%s_%s.po" % (applicationName, langCode) |
316 if os.path.exists(langPOfileName): |
316 if os.path.exists(langPOfileName): |
412 """ |
412 """ |
413 |
413 |
414 # translate the path separators |
414 # translate the path separators |
415 directory = unixpath(directory) |
415 directory = unixpath(directory) |
416 # build a list of all directory elements |
416 # build a list of all directory elements |
417 aList = filter(lambda x: len(x) > 0, directory.split('/')) |
417 aList = [x for x in directory.split('/') if len(x) > 0] |
418 theLen = len(aList) |
418 theLen = len(aList) |
419 # if the first element is a Windows-style disk drive |
419 # if the first element is a Windows-style disk drive |
420 # concatenate it with the first directory |
420 # concatenate it with the first directory |
421 if aList[0].endswith(':'): |
421 if aList[0].endswith(':'): |
422 if theLen > 1: |
422 if theLen > 1: |