Add the self.tr() to the window title
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 19 Dec 2008 09:28:57 +0000 (09:28 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 19 Dec 2008 09:28:57 +0000 (09:28 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2097 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BWizard.py
wizard/bertos_utils.py

index b7490667f6365b0c4f7144b10f90f70d3cce46b5..b543966db7c127d742eb19e07e322dc075993ab5 100644 (file)
@@ -20,7 +20,7 @@ class BWizard(QWizard):
     
     def __init__(self):
         QWizard.__init__(self)
-        self.setWindowTitle("Create a BeRTOS project")
+        self.setWindowTitle(self.tr("Create a BeRTOS project"))
         self._addPages()
         self._connectSignals()
     
index e5a21d9b4989fa898ee518f9e55d936d88df9b66..fd199632dfb416c1d8a912c91187d14fa51c0e35 100644 (file)
@@ -24,10 +24,19 @@ def createBertosProject(directory):
     open(directory + "/project.bertos", "w")
 
 def findDefinitions(ftype, path):
-    l = os.walk(path)
-    definitions = {}
-    for element in l:
+    L = os.walk(path)
+    for element in L:
         for filename in element[2]:
             if fnmatch.fnmatch(filename, "*." + ftype):
-                definitions[filename] = element[0]
-    return definitions
\ No newline at end of file
+                yield (filename, element[0])
+
+def loadCpuInfos(path):
+    cpuInfos = []
+    for definition in findDefinitions("cdef", path):
+        D = {}
+        def include(filename, dict = D, directory=definition[1]):
+            execfile(directory + "/" + filename, {}, D)
+        d["include"] = include
+        include(definition[0], D)
+        cpuInfos.append(D)
+    return cpuInfos