Preferences/__init__.py

changeset 284
06d3067f8a63
parent 270
41505c92ac31
child 286
652f5159f1c3
--- a/Preferences/__init__.py	Wed May 26 08:16:15 2010 +0200
+++ b/Preferences/__init__.py	Wed May 26 08:37:24 2010 +0200
@@ -1802,9 +1802,13 @@
     s = prefClass.settings.value("Qt/Qt4TranslationsDir", 
         prefClass.qtDefaults["Qt4TranslationsDir"])
     if s == "":
-        return os.getenv("QT4TRANSLATIONSDIR", "")
-    else:
-        return s
+        s = os.getenv("QT4TRANSLATIONSDIR", "")
+    if s == "" and isWindowsPlatform():
+        from PyQt4 import pyqtconfig
+        transPath = os.path.join(pyqtconfig._pkg_config["pyqt_mod_dir"], "translations")
+        if os.path.exists(transPath):
+            s = transPath
+    return s
     
 def getQt(key, prefClass = Prefs):
     """

eric ide

mercurial