fix some misspellings
[enigma2.git] / lib / python / Screens / ServiceInfo.py
index e07b32082d514bfab7f4cee03461f781b75499a6..34ad549b229d2d0c5e3bc14a7f77f513a481de69 100644 (file)
@@ -19,13 +19,8 @@ def to_unsigned(x):
        return x & 0xFFFFFFFF
 
 def ServiceInfoListEntry(a, b, valueType=TYPE_TEXT, param=4):
-       res = [ ]
-
-       #PyObject *type, *px, *py, *pwidth, *pheight, *pfnt, *pstring, *pflags;
-       res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 200, 30, 0, RT_HALIGN_LEFT, ""))
-       res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 200, 25, 0, RT_HALIGN_LEFT, a))
        print "b:", b
-       if type(b) is not str:
+       if not isinstance(b, str):
                if valueType == TYPE_VALUE_HEX:
                        b = ("0x%0" + str(param) + "x") % to_unsigned(b)
                elif valueType == TYPE_VALUE_DEC:
@@ -34,10 +29,13 @@ def ServiceInfoListEntry(a, b, valueType=TYPE_TEXT, param=4):
                        b = ("0x%0" + str(param) + "x (%dd)") % (to_unsigned(b), b)
                else:
                        b = str(b)
-       
-       res.append((eListboxPythonMultiContent.TYPE_TEXT, 220, 0, 350, 25, 0, RT_HALIGN_LEFT, b))
 
-       return res
+       return [
+               #PyObject *type, *px, *py, *pwidth, *pheight, *pfnt, *pstring, *pflags;
+               (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 200, 30, 0, RT_HALIGN_LEFT, ""),
+               (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 200, 25, 0, RT_HALIGN_LEFT, a),
+               (eListboxPythonMultiContent.TYPE_TEXT, 220, 0, 350, 25, 0, RT_HALIGN_LEFT, b)
+       ]
 
 class ServiceInfoList(HTMLComponent, GUIComponent):
        def __init__(self, source):
@@ -83,9 +81,9 @@ class ServiceInfo(Screen):
                        self.feinfo = None
                else:
                        self.type = TYPE_SERVICE_INFO
-                       self["red"] = Label(_("Serviceinfo"))
+                       self["red"] = Label(_("Service"))
                        self["green"] = Label(_("PIDs"))
-                       self["yellow"] = Label(_("Transponder"))
+                       self["yellow"] = Label(_("Multiplex"))
                        self["blue"] = Label(_("Tuner status"))
                        service = session.nav.getCurrentService()
                        if service is not None:
@@ -133,27 +131,25 @@ class ServiceInfo(Screen):
                else:
                        if self.transponder_info:
                                tp_info = ConvertToHumanReadable(self.transponder_info)
-                               conv = { "tuner_type"           : _("Transponder Type"),
-                                                "system"                       : _("System"),
-                                                "modulation"           : _("Modulation"),
-                                                "orbital_position" : _("Orbital Position"),
-                                                "frequency"            : _("Frequency"),
-                                                "symbol_rate"          : _("Symbolrate"),
-                                                "bandwidth"            : _("Bandwidth"),
-                                                "polarization"         : _("Polarization"),
-                                                "inversion"            : _("Inversion"),
-                                                "pilot"                        : _("Pilot"),
-                                                "rolloff"                      : _("Rolloff"),
-                                                "fec_inner"            : _("FEC"),
-                                                "code_rate_lp"         : _("Coderate LP"),
-                                                "code_rate_hp"         : _("Coderate HP"),
-                                                "constellation"        : _("Constellation"),
-                                                "transmission_mode": _("Transmission Mode"),
-                                                "guard_interval"       : _("Guard Interval"),
-                                                "hierarchy_information": _("Hierarchy Information") }
-                               Labels = [ ]
-                               for i in tp_info.keys():
-                                       Labels.append( (conv[i], tp_info[i], TYPE_VALUE_DEC) )
+                               conv = { "tuner_type"                   : _("Type"),
+                                        "system"                       : _("System"),
+                                        "modulation"                   : _("Modulation"),
+                                        "orbital_position"             : _("Orbital position"),
+                                        "frequency"                    : _("Frequency"),
+                                        "symbol_rate"                  : _("Symbol rate"),
+                                        "bandwidth"                    : _("Bandwidth"),
+                                        "polarization"                 : _("Polarization"),
+                                        "inversion"                    : _("Inversion"),
+                                        "pilot"                        : _("Pilot"),
+                                        "rolloff"                      : _("Roll-off"),
+                                        "fec_inner"                    : _("FEC"),
+                                        "code_rate_lp"                 : _("Code rate LP"),
+                                        "code_rate_hp"                 : _("Code rate HP"),
+                                        "constellation"                : _("Constellation"),
+                                        "transmission_mode"            : _("Transmission mode"),
+                                        "guard_interval"               : _("Guard interval"),
+                                        "hierarchy_information"        : _("Hierarchy info") }
+                               Labels = [(conv[i], tp_info[i], TYPE_VALUE_DEC) for i in tp_info.keys()]
                                self.fillList(Labels)
 
        def pids(self):
@@ -186,7 +182,7 @@ class ServiceInfo(Screen):
                if frontendDataOrg and len(frontendDataOrg):
                        frontendData = ConvertToHumanReadable(frontendDataOrg)
                        if frontendDataOrg["tuner_type"] == "DVB-S":
-                               return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+                               return (("NIM", ('A', 'B', 'C', 'D')[frontendData["tuner_number"]], TYPE_TEXT),
                                                        ("Type", frontendData["system"], TYPE_TEXT),
                                                        ("Modulation", frontendData["modulation"], TYPE_TEXT),
                                                        ("Orbital position", frontendData["orbital_position"], TYPE_VALUE_DEC),
@@ -198,7 +194,7 @@ class ServiceInfo(Screen):
                                                        ("Pilot", frontendData.get("pilot", None), TYPE_TEXT),
                                                        ("Rolloff", frontendData.get("rolloff", None), TYPE_TEXT))
                        elif frontendDataOrg["tuner_type"] == "DVB-C":
-                               return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+                               return (("NIM", ('A', 'B', 'C', 'D')[frontendData["tuner_number"]], TYPE_TEXT),
                                                ("Type", frontendData["tuner_type"], TYPE_TEXT),
                                                ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
                                                ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
@@ -206,7 +202,7 @@ class ServiceInfo(Screen):
                                                ("Inversion", frontendData["inversion"], TYPE_TEXT),
                                                ("FEC inner", frontendData["fec_inner"], TYPE_TEXT))
                        elif frontendDataOrg["tuner_type"] == "DVB-T":
-                               return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+                               return (("NIM", ('A', 'B', 'C', 'D')[frontendData["tuner_number"]], TYPE_TEXT),
                                                ("Type", frontendData["tuner_type"], TYPE_TEXT),
                                                ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
                                                ("Inversion", frontendData["inversion"], TYPE_TEXT),