74 try: |
74 try: |
75 for fn in glob.glob(os.path.join("eric", "src", "eric7", "i18n", "*.qm")): |
75 for fn in glob.glob(os.path.join("eric", "src", "eric7", "i18n", "*.qm")): |
76 shutil.copy2(fn, targetDir) |
76 shutil.copy2(fn, targetDir) |
77 os.chmod(os.path.join(targetDir, os.path.basename(fn)), 0o644) |
77 os.chmod(os.path.join(targetDir, os.path.basename(fn)), 0o644) |
78 except OSError as msg: |
78 except OSError as msg: |
79 sys.stderr.write("OSError: {0}\nTry install-i18n as root.\n".format(msg)) |
79 if sys.platform.startswith(("win", "cygwin")): |
80 except OSError as msg: |
80 sys.stderr.write( |
81 sys.stderr.write( |
81 "OSError: {0}\nTry install-i18n with admin rights.\n".format(msg) |
82 "OSError: {0}\nTry install-i18n with admin rights.\n".format(msg) |
82 ) |
83 ) |
83 else: |
|
84 sys.stderr.write("OSError: {0}\nTry install-i18n as root.\n".format(msg)) |
84 |
85 |
85 |
86 |
86 def main(argv): |
87 def main(argv): |
87 """ |
88 """ |
88 The main function of the script. |
89 The main function of the script. |