55 """ |
55 """ |
56 global progName, configDir |
56 global progName, configDir |
57 |
57 |
58 print() |
58 print() |
59 print("Usage:") |
59 print("Usage:") |
60 print(" %s [-hp]" % (progName)) |
60 print(" {0} [-hp]".format(progName)) |
61 print("where:") |
61 print("where:") |
62 print(" -h display this help message") |
62 print(" -h display this help message") |
63 print(" -p install into the private area (%s)" % (configDir)) |
63 print(" -p install into the private area ({0})".format(configDir)) |
64 |
64 |
65 sys.exit(rcode) |
65 sys.exit(rcode) |
66 |
66 |
67 def installTranslations(): |
67 def installTranslations(): |
68 """ |
68 """ |
77 |
77 |
78 try: |
78 try: |
79 for fn in glob.glob(os.path.join('eric', 'i18n', '*.qm')): |
79 for fn in glob.glob(os.path.join('eric', 'i18n', '*.qm')): |
80 shutil.copy2(fn, targetDir) |
80 shutil.copy2(fn, targetDir) |
81 except IOError as msg: |
81 except IOError as msg: |
82 sys.stderr.write('IOError: %s\nTry install-i18n as root.\n' % msg) |
82 sys.stderr.write( |
|
83 'IOError: {0}\nTry install-i18n as root.\n'.format(msg)) |
83 except OSError as msg: |
84 except OSError as msg: |
84 sys.stderr.write('OSError: %s\nTry install-i18n with admin rights.\n' % msg) |
85 sys.stderr.write( |
|
86 'OSError: {0}\nTry install-i18n with admin rights.\n'.format(msg)) |
85 |
87 |
86 def main(argv): |
88 def main(argv): |
87 """ |
89 """ |
88 The main function of the script. |
90 The main function of the script. |
89 |
91 |