add swedish, danish
[enigma2.git] / lib / python / Components / TimerList.py
index 6349466b44cfb80401efd92433a776d317170ddf..d3774cfad56cb32e9cf1e71d57d928b5b81c2d5a 100644 (file)
@@ -42,27 +42,36 @@ def TimerEntryComponent(timer, processed):
                                        repeatedtext += days[x]
                                        count += 1
                                flags = flags >> 1
-               res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, 400, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (" %s ... %s" % (FuzzyTime(timer.begin)[1], FuzzyTime(timer.end)[1]))))
+               if timer.justplay:
+                       res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, 400, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s "+ _("(ZAP)")) % (FuzzyTime(timer.begin)[1]))))
+               else:
+                       res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, 400, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s ... %s (%d " + _("mins") + ")") % (FuzzyTime(timer.begin)[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60))))
        else:
-               res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, 400, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ("%s, %s ... %s" % (FuzzyTime(timer.begin) + FuzzyTime(timer.end)[1:]))))
+               if timer.justplay:
+                       res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, 400, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s " + _("(ZAP)")) % (FuzzyTime(timer.begin)))))
+               else:
+                       res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, 400, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s ... %s (%d " + _("mins") + ")") % (FuzzyTime(timer.begin) + FuzzyTime(timer.end)[1:] + ((timer.end - timer.begin) / 60,)))))
 
        if not processed:
                if timer.state == TimerEntry.StateWaiting:
-                       state = "waiting"
+                       state = _("waiting")
                elif timer.state == TimerEntry.StatePrepared:
-                       state = "about to start"
+                       state = _("about to start")
                elif timer.state == TimerEntry.StateRunning:
-                       state = "recording..."
+                       if timer.justplay:
+                               state = _("zapped")
+                       else:
+                               state = _("recording...")
                else:
-                       state = "<unknown>"
+                       state = _("<unknown>")
        else:
-               state = "done!"
+               state = _("done!")
        
        res.append((eListboxPythonMultiContent.TYPE_TEXT, 320, 50, 240, 20, 1, RT_HALIGN_RIGHT|RT_VALIGN_CENTER, state))
 
        if timer.disabled:
-               png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/redx.png"))
-               res.append((eListboxPythonMultiContent.TYPE_PIXMAP, 490, 5, 40, 40, png))
+               png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "redx.png"))
+               res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 490, 5, 40, 40, png))
        
        return res