Preferences/ConfigurationPages/EditorAPIsPage.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3190
a9a94491c4fd
child 3656
441956d8fce5
--- a/Preferences/ConfigurationPages/EditorAPIsPage.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/Preferences/ConfigurationPages/EditorAPIsPage.py	Thu Apr 03 23:05:31 2014 +0200
@@ -21,6 +21,7 @@
 
 import Preferences
 import Utilities
+import UI.PixmapCache
 
 
 class EditorAPIsPage(ConfigurationPageBase, Ui_EditorAPIsPage):
@@ -35,7 +36,9 @@
         self.setupUi(self)
         self.setObjectName("EditorAPIsPage")
         
-        self.prepareApiButton.setText(self.trUtf8("Compile APIs"))
+        self.apiFileButton.setIcon(UI.PixmapCache.getIcon("open.png"))
+        
+        self.prepareApiButton.setText(self.tr("Compile APIs"))
         self.__currentAPI = None
         self.__inPreparation = False
         
@@ -137,9 +140,9 @@
         """
         file = E5FileDialog.getOpenFileName(
             self,
-            self.trUtf8("Select API file"),
+            self.tr("Select API file"),
             self.apiFileEdit.text(),
-            self.trUtf8("API File (*.api);;All Files (*)"))
+            self.tr("API File (*.api);;All Files (*)"))
             
         if file:
             self.apiFileEdit.setText(Utilities.toNativeSeparators(file))
@@ -181,8 +184,8 @@
                     QFileInfo(installedAPIFile).fileName())
             file, ok = QInputDialog.getItem(
                 self,
-                self.trUtf8("Add from installed APIs"),
-                self.trUtf8("Select from the list of installed API files"),
+                self.tr("Add from installed APIs"),
+                self.tr("Select from the list of installed API files"),
                 installedAPIFilesShort,
                 0, False)
             if ok:
@@ -192,9 +195,9 @@
         else:
             E5MessageBox.warning(
                 self,
-                self.trUtf8("Add from installed APIs"),
-                self.trUtf8("""There are no APIs installed yet."""
-                            """ Selection is not available."""))
+                self.tr("Add from installed APIs"),
+                self.tr("""There are no APIs installed yet."""
+                        """ Selection is not available."""))
             self.addInstalledApiFileButton.setEnabled(False)
         self.prepareApiButton.setEnabled(self.apiList.count() > 0)
         
@@ -211,8 +214,8 @@
             pluginAPIFilesDict[QFileInfo(apiFile).fileName()] = apiFile
         file, ok = QInputDialog.getItem(
             self,
-            self.trUtf8("Add from Plugin APIs"),
-            self.trUtf8(
+            self.tr("Add from Plugin APIs"),
+            self.tr(
                 "Select from the list of API files installed by plugins"),
             sorted(pluginAPIFilesDict.keys()),
             0, False)
@@ -242,7 +245,7 @@
         self.prepareApiProgressBar.reset()
         self.prepareApiProgressBar.setRange(0, 100)
         self.prepareApiProgressBar.setValue(0)
-        self.prepareApiButton.setText(self.trUtf8("Compile APIs"))
+        self.prepareApiButton.setText(self.tr("Compile APIs"))
         self.__inPreparation = False
     
     def __apiPreparationCancelled(self):
@@ -257,7 +260,7 @@
         """
         self.prepareApiProgressBar.setRange(0, 0)
         self.prepareApiProgressBar.setValue(0)
-        self.prepareApiButton.setText(self.trUtf8("Cancel compilation"))
+        self.prepareApiButton.setText(self.tr("Cancel compilation"))
         self.__inPreparation = True
         
     def saveState(self):

eric ide

mercurial