Show latest version nr. available in firmware-update-checker-message.

This commit is contained in:
Remco Burema 2020-06-05 13:29:21 +02:00
parent fd2a7689cc
commit 670f1df6c7
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
2 changed files with 7 additions and 6 deletions

View file

@ -1,4 +1,4 @@
# Copyright (c) 2018 Ultimaker B.V.
# Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from UM.i18n import i18nCatalog
@ -11,11 +11,12 @@ i18n_catalog = i18nCatalog("cura")
class FirmwareUpdateCheckerMessage(Message):
STR_ACTION_DOWNLOAD = "download"
def __init__(self, machine_id: int, machine_name: str, download_url: str) -> None:
def __init__(self, machine_id: int, machine_name: str, latest_version: str, download_url: str) -> None:
super().__init__(i18n_catalog.i18nc(
"@info Don't translate {machine_name}, since it gets replaced by a printer name!",
"New features are available for your {machine_name}! It is recommended to update the firmware on your printer.").format(
machine_name = machine_name),
"New features or bug-fixes may be available for your {machine_name}! If not already at the latest version, "
"it is recommended to update the firmware on your printer to version {latest_version}.").format(
machine_name = machine_name, latest_version = latest_version),
title = i18n_catalog.i18nc(
"@info:title The %s gets replaced with the printer name.",
"New %s firmware available") % machine_name)