From d6472d9ef012fe6e9d51b015ca14fd8eb4f029ad Mon Sep 17 00:00:00 2001 From: fairbird Date: Mon, 5 Feb 2024 13:22:16 +0300 Subject: [PATCH] [Standby] Update --- lib/python/Screens/Standby.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/python/Screens/Standby.py b/lib/python/Screens/Standby.py index d1996854f..eb66c0810 100644 --- a/lib/python/Screens/Standby.py +++ b/lib/python/Screens/Standby.py @@ -10,7 +10,7 @@ from Components.AVSwitch import AVSwitch from Components.Console import Console from Components.ImportChannels import ImportChannels -from Components.SystemInfo import BoxInfo +from Components.SystemInfo import BoxInfo, getBoxDisplayName from Components.Sources.StreamService import StreamServiceList from Components.Task import job_manager from Tools.Directories import mediaFilesInUse @@ -33,7 +33,6 @@ QUIT_UPGRADE_PROGRAM = 42 QUIT_IMAGE_RESTORE = 43 -getBoxDisplayName = BoxInfo.getItem("model") def isInfoBarInstance(): global infoBarInstance @@ -252,13 +251,14 @@ def __init__(self, session, retvalue=QUIT_SHUTDOWN): Screen.__init__(self, session) from Components.Label import Label text = { - QUIT_SHUTDOWN: _("Your %s is shutting down") % getBoxDisplayName, - QUIT_REBOOT: _("Your %s is rebooting") % getBoxDisplayName, - QUIT_RESTART: _("The user interface of your %s is restarting") % getBoxDisplayName, - QUIT_UPGRADE_FP: _("Your front panel processor will be upgraded\nPlease wait until your %s reboots\nThis may take a few minutes") % getBoxDisplayName, - QUIT_DEBUG_RESTART: _("The user interface of your %s is restarting\ndue to an error in StartEnigma.py") % getBoxDisplayName, - QUIT_RRECVERY_MODE: _("Your %s is rebooting into Recovery Mode") % getBoxDisplayName, - QUIT_UPGRADE_PROGRAM: _("Unattended update in progress\nPlease wait until your %s reboots\nThis may take a few minutes") % getBoxDisplayName, + QUIT_SHUTDOWN: _("Your %s %s is shutting down") % getBoxDisplayName(), + QUIT_REBOOT: _("Your %s %s is rebooting") % getBoxDisplayName(), + QUIT_RESTART: _("The user interface of your %s %s is restarting") % getBoxDisplayName(), + QUIT_UPGRADE_FP: _("Your front panel processor will be upgraded\nPlease wait until your %s %s reboots\nThis may take a few minutes") % getBoxDisplayName(), + QUIT_DEBUG_RESTART: _("The user interface of your %s %s is restarting\ndue to an error in StartEnigma.py") % getBoxDisplayName(), + QUIT_RRECVERY_MODE: _("Your %s %s is rebooting into Recovery Mode") % getBoxDisplayName(), + QUIT_UPGRADE_PROGRAM: _("Unattended update in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes") % getBoxDisplayName(), + QUIT_IMAGE_RESTORE: _("Reflash in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes") % getBoxDisplayName(), QUIT_MANUFACTURER_RESET: _("Manufacturer reset in progress\nPlease wait until enigma2 restarts") }.get(retvalue) self["text"] = Label(text) @@ -304,7 +304,8 @@ def __init__(self, session, retvalue=QUIT_SHUTDOWN, timeout=-1, default_yes=Fals QUIT_UPGRADE_FP: _("Really update the frontprocessor and reboot now?"), QUIT_DEBUG_RESTART: _("Really restart in debug mode now?"), QUIT_RRECVERY_MODE: _("Really reboot into Recovery Mode?"), - QUIT_UPGRADE_PROGRAM: _("Really update your %s and reboot now?") % getBoxDisplayName, + QUIT_UPGRADE_PROGRAM: _("Really update your %s %s and reboot now?") % getBoxDisplayName(), + QUIT_IMAGE_RESTORE: _("Really reflash your %s %s and reboot now?") % getBoxDisplayName(), QUIT_MANUFACTURER_RESET: _("Really perform a manufacturer reset now?") }.get(retvalue, None) if text: