Add strings to clarify the manual printer UI

Also adds resuming/pausing states strings and a "Print Again" to use elsewhere.
This commit is contained in:
fieldOfView 2016-10-03 12:29:50 +02:00
parent e6570884fc
commit 8a6d125478
2 changed files with 38 additions and 8 deletions

View file

@ -54,7 +54,7 @@ Cura.MachineAction
{ {
id: pageTitle id: pageTitle
width: parent.width width: parent.width
text: catalog.i18nc("@title", "Connect to Networked Printer") text: catalog.i18nc("@title:window", "Connect to Networked Printer")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: 18 font.pointSize: 18
} }
@ -64,7 +64,7 @@ Cura.MachineAction
id: pageDescription id: pageDescription
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "To print directly to your Ultimaker 3 printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your Ultimaker 3, you can still use a USB drive to transfer g-code files to your printer.\n\nSelect your Ultimaker 3 from the list below:") text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.\n\nSelect your printer from the list below:")
} }
Row Row
@ -103,7 +103,7 @@ Cura.MachineAction
Button Button
{ {
id: rediscoverButton id: rediscoverButton
text: catalog.i18nc("@title", "Refresh") text: catalog.i18nc("@action:button", "Refresh")
onClicked: manager.restartDiscovery() onClicked: manager.restartDiscovery()
} }
} }
@ -195,7 +195,7 @@ Cura.MachineAction
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
//: Tips label //: Tips label
//TODO: get actual link from webteam //TODO: get actual link from webteam
text: catalog.i18nc("@label", "If your Ultimaker 3 is not listed, read the <a href='%1'>Ultimaker 3 network troubleshooting guide</a>").arg("https://ultimaker.com/en/troubleshooting"); text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network-printing troubleshooting guide</a>").arg("https://ultimaker.com/en/troubleshooting");
onLinkActivated: Qt.openUrlExternally(link) onLinkActivated: Qt.openUrlExternally(link)
} }
@ -228,7 +228,7 @@ Cura.MachineAction
{ {
width: parent.width * 0.5 width: parent.width * 0.5
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Ultimaker 3") text: true ? catalog.i18nc("@label", "Ultimaker 3") : catalog.i18nc("@label", "Ultimaker 3 Extended")
} }
Label Label
{ {
@ -246,7 +246,7 @@ Cura.MachineAction
{ {
width: parent.width * 0.5 width: parent.width * 0.5
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "IP Address") text: catalog.i18nc("@label", "Address")
} }
Label Label
{ {
@ -255,6 +255,13 @@ Cura.MachineAction
text: base.selectedPrinter ? base.selectedPrinter.ipAddress : "" text: base.selectedPrinter ? base.selectedPrinter.ipAddress : ""
} }
} }
Label
{
width: parent.width
wrapMode: Text.WordWrap
visible: base.selectedPrinter && !base.completeProperties
text: catalog.i18nc("@label", "The printer at this address has not yet responded." )
}
Button Button
{ {
@ -266,13 +273,20 @@ Cura.MachineAction
} }
} }
Label
{
// TODO: move use this in an appropriate location
visible: false
text: catalog.i18nc("@label:", "Print Again")
}
UM.Dialog UM.Dialog
{ {
id: manualPrinterDialog id: manualPrinterDialog
property string printerKey property string printerKey
property alias addressText: addressField.text property alias addressText: addressField.text
title: catalog.i18nc("@label", "IP Address") title: catalog.i18nc("@title:window", "Printer Address")
minimumWidth: 400 * Screen.devicePixelRatio minimumWidth: 400 * Screen.devicePixelRatio
minimumHeight: 120 * Screen.devicePixelRatio minimumHeight: 120 * Screen.devicePixelRatio
@ -298,8 +312,17 @@ Cura.MachineAction
Column { Column {
anchors.fill: parent anchors.fill: parent
spacing: UM.Theme.getSize("default_margin").height
TextField { Label
{
text: catalog.i18nc("@alabel","Enter the IP address or hostname of your printer on the network.")
width: parent.width
wrapMode: Text.WordWrap
}
TextField
{
id: addressField id: addressField
width: parent.width width: parent.width
maximumLength: 40 maximumLength: 40

View file

@ -804,6 +804,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self.setErrorText(i18n_catalog.i18nc("@label:MonitorStatus", "Print aborted. Please check the printer")) self.setErrorText(i18n_catalog.i18nc("@label:MonitorStatus", "Print aborted. Please check the printer"))
state = "error" state = "error"
# NB/TODO: the following two states are intentionally added for future proofing the i18n strings
# but are currently non-functional
if state == "!pausing":
self.setErrorText(i18n_catalog.i18nc("@label:MonitorStatus", "Pausing print..."))
if state == "!resuming":
self.setErrorText(i18n_catalog.i18nc("@label:MonitorStatus", "Resuming print..."))
self._updateJobState(state) self._updateJobState(state)
self.setTimeElapsed(json_data["time_elapsed"]) self.setTimeElapsed(json_data["time_elapsed"])
self.setTimeTotal(json_data["time_total"]) self.setTimeTotal(json_data["time_total"])