mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Updated message with message types
Contributes to CURA-8418
This commit is contained in:
parent
900db57f0f
commit
2263969d5f
26 changed files with 136 additions and 82 deletions
|
@ -141,20 +141,27 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
success = profile_writer.write(file_name, container_list)
|
||||
except Exception as e:
|
||||
Logger.log("e", "Failed to export profile to %s: %s", file_name, str(e))
|
||||
m = Message(catalog.i18nc("@info:status Don't translate the XML tags <filename> or <message>!", "Failed to export profile to <filename>{0}</filename>: <message>{1}</message>", file_name, str(e)),
|
||||
lifetime = 0,
|
||||
title = catalog.i18nc("@info:title", "Error"))
|
||||
m.show()
|
||||
return False
|
||||
if not success:
|
||||
Logger.log("w", "Failed to export profile to %s: Writer plugin reported failure.", file_name)
|
||||
m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Failed to export profile to <filename>{0}</filename>: Writer plugin reported failure.", file_name),
|
||||
m = Message(catalog.i18nc("@info:status Don't translate the XML tags <filename> or <message>!",
|
||||
"Failed to export profile to <filename>{0}</filename>: <message>{1}</message>",
|
||||
file_name, str(e)),
|
||||
lifetime = 0,
|
||||
title = catalog.i18nc("@info:title", "Error"),
|
||||
message_type = Message.MessageType.ERROR)
|
||||
m.show()
|
||||
return False
|
||||
m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Exported profile to <filename>{0}</filename>", file_name),
|
||||
if not success:
|
||||
Logger.log("w", "Failed to export profile to %s: Writer plugin reported failure.", file_name)
|
||||
m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!",
|
||||
"Failed to export profile to <filename>{0}</filename>: Writer plugin reported failure.",
|
||||
file_name),
|
||||
lifetime = 0,
|
||||
title = catalog.i18nc("@info:title", "Error"),
|
||||
message_type = Message.MessageType.ERROR)
|
||||
m.show()
|
||||
return False
|
||||
m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!",
|
||||
"Exported profile to <filename>{0}</filename>",
|
||||
file_name),
|
||||
title = catalog.i18nc("@info:title", "Export succeeded"),
|
||||
message_type = Message.MessageType.POSITIVE)
|
||||
m.show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue