os.environ["LANGUAGE"] = lang
-class Congratulations(InteractiveStep):
+class Congratulations(Step):
"""
Shows a message that the installation is complete
"""
first_install = True
def run(self):
- self.tui.message(
- _("Congratulations"),
- _(
+ if self.bricklayer.unattended:
+ message = _("The unattended installation process has been completed.")
+ else:
+ message = _(
"The installation has been completed successfully."
"\n\n"
"You can now safely remove any media used for the installation."
- ),
- buttons=[_("Finish")],
+ )
+
+ self.tui.message(
+ _("Congratulations"), message, buttons=[_("Finish")],
# Make the window a litte bit bigger
width=50,
+
+ # Automatically continue in unattended mode
+ timeout=10 if self.bricklayer.unattended else None,
)
message = _(
"The unattended installation will start in %(timeout)s seconds using %(disks)s",
- "The unattended installation will start in %(timeout)s seconds using %(disks)s",
- len(disks),
) % {
"timeout" : timeout,
"disks" : i18n.list(disks),