29 """ |
29 """ |
30 Global function to get the name of the directory storing the config data. |
30 Global function to get the name of the directory storing the config data. |
31 |
31 |
32 @return directory name of the config dir (string) |
32 @return directory name of the config dir (string) |
33 """ |
33 """ |
34 cdn = ".eric6" |
34 cdn = ".eric7" |
35 |
35 |
36 hp = os.path.join(os.path.expanduser("~"), cdn) |
36 hp = os.path.join(os.path.expanduser("~"), cdn) |
37 if not os.path.exists(hp): |
37 if not os.path.exists(hp): |
38 os.mkdir(hp) |
38 os.mkdir(hp) |
39 return hp |
39 return hp |
71 |
71 |
72 targetDir = (configDir if privateInstall |
72 targetDir = (configDir if privateInstall |
73 else getConfig('ericTranslationsDir')) |
73 else getConfig('ericTranslationsDir')) |
74 |
74 |
75 try: |
75 try: |
76 for fn in glob.glob(os.path.join('eric', 'eric6', 'i18n', '*.qm')): |
76 for fn in glob.glob(os.path.join('eric', 'eric7', 'i18n', '*.qm')): |
77 shutil.copy2(fn, targetDir) |
77 shutil.copy2(fn, targetDir) |
78 os.chmod(os.path.join(targetDir, os.path.basename(fn)), 0o644) |
78 os.chmod(os.path.join(targetDir, os.path.basename(fn)), 0o644) |
79 except OSError as msg: |
79 except OSError as msg: |
80 sys.stderr.write( |
80 sys.stderr.write( |
81 'OSError: {0}\nTry install-i18n as root.\n'.format(msg)) |
81 'OSError: {0}\nTry install-i18n as root.\n'.format(msg)) |