Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-08-04 14:44:33 +0300
committerJaime van Kessel <nallath@gmail.com>2020-08-04 14:44:33 +0300
commitc8746eced63756250baaba23f4c721327334f4ca (patch)
treef4d01b3a80255e59d160614519b9324ab54ffd6f /plugins/UM3NetworkPrinting
parenta8904e76b07305ade8667d8f8f166248a265f416 (diff)
Move some HTML codes out of the translation
Due to string freeze we can't fix this for 4.7 CURA-7627
Diffstat (limited to 'plugins/UM3NetworkPrinting')
-rw-r--r--plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
index d18cf4739e..ec8dfd9ae7 100644
--- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
+++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
@@ -332,11 +332,12 @@ class CloudOutputDeviceManager:
"These printers are not linked to the Digital Factory:",
len(self.reported_device_ids)
)
+ message_text += "<br/><ul>{}</ul><br/>".format(device_names)
+ digital_factory_string = self.I18N_CATALOG.i18nc("info:name", "Ultimaker Digital Factory")
+
message_text += self.I18N_CATALOG.i18nc(
"info:status",
- "<ul>{}</ul>To establish a connection, please visit the "
- "<a href='https://mycloud.ultimaker.com/'>Ultimaker Digital Factory</a>.",
- device_names
+ "To establish a connection, please visit the {website_link}".format(website_link = "<a href='https://digitalfactory.ultimaker.com/'>{}</a>.".format(digital_factory_string))
)
self._removed_printers_message.setText(message_text)
self._removed_printers_message.addAction("keep_printer_configurations_action",
@@ -422,13 +423,17 @@ class CloudOutputDeviceManager:
machine.setMetaDataEntry(self.META_HOST_GUID, device.clusterData.host_guid)
machine.setMetaDataEntry("group_name", device.name)
machine.setMetaDataEntry("group_size", device.clusterSize)
- machine.setMetaDataEntry("removal_warning", self.I18N_CATALOG.i18nc(
- "@label ({} is printer name)",
- "{} will be removed until the next account sync. <br> To remove {} permanently, "
- "visit <a href='https://mycloud.ultimaker.com/'>Ultimaker Digital Factory</a>. "
- "<br><br>Are you sure you want to remove {} temporarily?",
- device.name, device.name, device.name
- ))
+ digital_factory_string = self.I18N_CATALOG.i18nc("info:name", "Ultimaker Digital Factory")
+ digital_factory_link = "<a href='https://digitalfactory.ultimaker.com/'>{}</a>".format(digital_factory_string)
+ removal_warning_string = self.I18N_CATALOG.i18nc(
+ "@label ({printer_name} is replaced with the name of the printer",
+ "{printer_name} will be removed until the next account sync. <br> To remove {printer_name} permanently, "
+ "visit {digital_factory_link}"
+ "<br><br>Are you sure you want to remove {printer_name} temporarily?".format(printer_name = device.name,
+ digital_factory_link = digital_factory_link)
+ )
+
+ machine.setMetaDataEntry("removal_warning", removal_warning_string)
machine.addConfiguredConnectionType(device.connectionType.value)
def _connectToOutputDevice(self, device: CloudOutputDevice, machine: GlobalStack) -> None: