mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Merge branch '3.0'
This commit is contained in:
commit
e97bdc526b
6 changed files with 46 additions and 19 deletions
|
@ -285,11 +285,11 @@ Cura.MachineAction
|
||||||
}
|
}
|
||||||
else if (base.selectedPrinter.clusterSize === 0)
|
else if (base.selectedPrinter.clusterSize === 0)
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label", "Cura Connect: This printer is not set up to host a group of connected Ultimaker 3 printers.");
|
return catalog.i18nc("@label", "This printer is not set up to host a group of Ultimaker 3 printers.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label", "Cura Connect: This printer is set up to host a group of %1 connected Ultimaker 3 printers".arg(base.selectedPrinter.clusterSize));
|
return catalog.i18nc("@label", "This printer is the host for a group of %1 Ultimaker 3 printers.".arg(base.selectedPrinter.clusterSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ from UM.Message import Message
|
||||||
from UM.OutputDevice import OutputDeviceError
|
from UM.OutputDevice import OutputDeviceError
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
from UM.Qt.Duration import Duration, DurationFormat
|
from UM.Qt.Duration import Duration, DurationFormat
|
||||||
|
from UM.PluginRegistry import PluginRegistry
|
||||||
|
|
||||||
from . import NetworkPrinterOutputDevice
|
from . import NetworkPrinterOutputDevice
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
||||||
printersChanged = pyqtSignal()
|
printersChanged = pyqtSignal()
|
||||||
selectedPrinterChanged = pyqtSignal()
|
selectedPrinterChanged = pyqtSignal()
|
||||||
|
|
||||||
def __init__(self, key, address, properties, api_prefix, plugin_path):
|
def __init__(self, key, address, properties, api_prefix):
|
||||||
super().__init__(key, address, properties, api_prefix)
|
super().__init__(key, address, properties, api_prefix)
|
||||||
# Store the address of the master.
|
# Store the address of the master.
|
||||||
self._master_address = address
|
self._master_address = address
|
||||||
|
@ -47,7 +48,6 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
||||||
name = key
|
name = key
|
||||||
|
|
||||||
self._authentication_state = NetworkPrinterOutputDevice.AuthState.Authenticated # The printer is always authenticated
|
self._authentication_state = NetworkPrinterOutputDevice.AuthState.Authenticated # The printer is always authenticated
|
||||||
self._plugin_path = plugin_path
|
|
||||||
|
|
||||||
self.setName(name)
|
self.setName(name)
|
||||||
description = i18n_catalog.i18nc("@action:button Preceded by 'Ready to'.", "Print over network")
|
description = i18n_catalog.i18nc("@action:button Preceded by 'Ready to'.", "Print over network")
|
||||||
|
@ -709,3 +709,14 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
||||||
@pyqtSlot(int, result=str)
|
@pyqtSlot(int, result=str)
|
||||||
def formatDuration(self, seconds):
|
def formatDuration(self, seconds):
|
||||||
return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
|
return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
|
||||||
|
|
||||||
|
## For cluster below
|
||||||
|
def _get_plugin_directory_name(self):
|
||||||
|
current_file_absolute_path = os.path.realpath(__file__)
|
||||||
|
directory_path = os.path.dirname(current_file_absolute_path)
|
||||||
|
_, directory_name = os.path.split(directory_path)
|
||||||
|
return directory_name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _plugin_path(self):
|
||||||
|
return PluginRegistry.getInstance().getPluginPath(self._get_plugin_directory_name())
|
||||||
|
|
|
@ -223,7 +223,7 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin):
|
||||||
Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name)
|
Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name)
|
||||||
if force_cluster or cluster_size >= 0 or was_cluster_before:
|
if force_cluster or cluster_size >= 0 or was_cluster_before:
|
||||||
printer = NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice(
|
printer = NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice(
|
||||||
name, address, properties, self._api_prefix, self._plugin_path)
|
name, address, properties, self._api_prefix)
|
||||||
else:
|
else:
|
||||||
printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix)
|
printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix)
|
||||||
self._printers[printer.getKey()] = printer
|
self._printers[printer.getKey()] = printer
|
||||||
|
@ -289,17 +289,6 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin):
|
||||||
Logger.log("d", "Bonjour service removed: %s" % name)
|
Logger.log("d", "Bonjour service removed: %s" % name)
|
||||||
self.removePrinterSignal.emit(str(name))
|
self.removePrinterSignal.emit(str(name))
|
||||||
|
|
||||||
## For cluster below
|
|
||||||
def _get_plugin_directory_name(self):
|
|
||||||
current_file_absolute_path = os.path.realpath(__file__)
|
|
||||||
directory_path = os.path.dirname(current_file_absolute_path)
|
|
||||||
_, directory_name = os.path.split(directory_path)
|
|
||||||
return directory_name
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _plugin_path(self):
|
|
||||||
return PluginRegistry.getInstance().getPluginPath(self._get_plugin_directory_name())
|
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def openControlPanel(self):
|
def openControlPanel(self):
|
||||||
Logger.log("d", "Opening print jobs web UI...")
|
Logger.log("d", "Opening print jobs web UI...")
|
||||||
|
|
|
@ -39,7 +39,8 @@ Rectangle
|
||||||
return catalog.i18nc("@label:status", "Printing");
|
return catalog.i18nc("@label:status", "Printing");
|
||||||
case "idle":
|
case "idle":
|
||||||
return catalog.i18nc("@label:status", "Available");
|
return catalog.i18nc("@label:status", "Available");
|
||||||
case "unreachable": // TODO: new string
|
case "unreachable":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Lost connection with the printer");
|
||||||
case "maintenance": // TODO: new string
|
case "maintenance": // TODO: new string
|
||||||
case "unknown":
|
case "unknown":
|
||||||
default:
|
default:
|
||||||
|
@ -165,6 +166,7 @@ Rectangle
|
||||||
anchors.right: printProgressArea.left
|
anchors.right: printProgressArea.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
color: emphasisColor
|
color: emphasisColor
|
||||||
|
opacity: printer != null && printer.status === "unreachable" ? 0.3 : 1
|
||||||
|
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,6 +38,31 @@ msgctxt "@label:status"
|
||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
|
|
@ -163,7 +163,7 @@ msgstr "Impossible de démarrer une nouvelle tâche car l'imprimante est occupé
|
||||||
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:153
|
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:153
|
||||||
msgctxt "@info:title"
|
msgctxt "@info:title"
|
||||||
msgid "Print Details"
|
msgid "Print Details"
|
||||||
msgstr "Imprimer les détails"
|
msgstr "Les détails d'impression"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:456
|
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:456
|
||||||
msgctxt "@info:status"
|
msgctxt "@info:status"
|
||||||
|
@ -1566,7 +1566,7 @@ msgstr "Cette imprimante n'est pas configurée pour héberger un groupe d'imprim
|
||||||
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/DiscoverUM3Action.qml:287
|
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/DiscoverUM3Action.qml:287
|
||||||
msgctxt "@label"
|
msgctxt "@label"
|
||||||
msgid "This printer is the host for a group of %1 connected Ultimaker 3 printers"
|
msgid "This printer is the host for a group of %1 connected Ultimaker 3 printers"
|
||||||
msgstr "L'imprimante n'est pas configurée pour héberger un groupe de %1 imprimantes connectées Ultimaker 3."
|
msgstr "L'imprimante est configurée pour héberger un groupe de %1 imprimantes connectées Ultimaker 3."
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/PrintWindow.qml:24
|
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/PrintWindow.qml:24
|
||||||
msgctxt "@title:window"
|
msgctxt "@title:window"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue