activate language when used in standalone screen
[enigma2.git] / lib / python / Screens / About.py
index 2e32e7d..2e267a0 100644 (file)
@@ -2,6 +2,8 @@ from Screen import Screen
 from Components.ActionMap import ActionMap
 from Components.Label import Label
 from Components.Harddisk import Harddisk
+from Components.NimManager import nimmanager
+from Components.MenuList import MenuList
 
 class About(Screen):
        def __init__(self, session):
@@ -9,14 +11,20 @@ class About(Screen):
                
                self["text"] = Label("Enigma v2.0b")
 
-               self["tuner"] = Label("Detected NIMs:")
-               self["tunerA"] = Label("   Tuner A: Alps BSBE1 (DVB-S)")
-               self["tunerB"] = Label("   Tuner B: Alps BSBE1 (DVB-S)")
+               self["tuner"] = Label(_("Detected NIMs:"))
+               
+               nims = nimmanager.nimList()
+               count = 0
+               for i in nims:
+                       self["tuner" + str(count)] = Label(i[0])
+                       count += 1
 
-               self["hdd"] = Label("Detected HDD:")
+               self["hdd"] = Label(_("Detected HDD:"))
                hdd = Harddisk(0)
-               #self["hddA"] = Label("%s (%s, %d MB free)" % (hdd.model(), hdd.capacity(),hdd.free()))
-               self["hddA"] = Label("Seagate 398 GByte (323 GByte free)")
+               if hdd.model() != "":
+                       self["hddA"] = Label(_("%s (%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
+               else:                   
+                       self["hddA"] = Label(_("none"))
 
                self["actions"] = ActionMap(["SetupActions"], 
                        {