Skip to content

Commit

Permalink
Fix some language inconsistencies
Browse files Browse the repository at this point in the history
Replaces #259, thanks @andritolion
  • Loading branch information
fieldOfView committed Jan 14, 2022
1 parent 9ca02ae commit 7aea357
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
32 changes: 16 additions & 16 deletions OctoPrintOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def pausePrint(self) -> None:

def resumePrint(self) -> None:
if not self._printers[0].activePrintJob:
Logger.log("e", "There is no active printjob to resume")
Logger.log("e", "There is no active print job to resume")
return

if self._printers[0].activePrintJob.state == "paused":
Expand Down Expand Up @@ -622,15 +622,15 @@ def proceedRequestWrite(self) -> None:
"",
i18n_catalog.i18nc(
"@action:tooltip",
"Stop waiting for the printer and queue the printjob instead",
"Stop waiting for the printer and queue the print job instead",
),
button_style=Message.ActionButtonStyle.SECONDARY,
)
self._waiting_message.addAction(
"cancel",
i18n_catalog.i18nc("@action:button", "Cancel"),
"",
i18n_catalog.i18nc("@action:tooltip", "Abort the printjob"),
i18n_catalog.i18nc("@action:tooltip", "Abort the print job"),
)
self._waiting_message.actionTriggered.connect(
self._stopWaitingForPrinter
Expand Down Expand Up @@ -740,7 +740,7 @@ def _sendPrintJob(self) -> None:
pass

self._progress_message = Message(
i18n_catalog.i18nc("@info:status", "Sending data to OctoPrint"),
i18n_catalog.i18nc("@info:status", "Sending data to OctoPrint..."),
title=i18n_catalog.i18nc("@label", "OctoPrint"),
progress=-1,
lifetime=0,
Expand All @@ -751,7 +751,7 @@ def _sendPrintJob(self) -> None:
"cancel",
i18n_catalog.i18nc("@action:button", "Cancel"),
"",
i18n_catalog.i18nc("@action:tooltip", "Abort the printjob"),
i18n_catalog.i18nc("@action:tooltip", "Abort the print job"),
)

self._progress_message.actionTriggered.connect(self._cancelSendGcode)
Expand Down Expand Up @@ -1145,7 +1145,7 @@ def _onRequestFinished(self, reply: QNetworkReply) -> None:
state = json_data["state"]
if not isinstance(state, str):
Logger.log(
"e", "Encountered non-string printjob state: %s" % state
"e", "Encountered non-string print job state: %s" % state
)
elif state.startswith("Error"):
print_job_state = "error"
Expand All @@ -1170,7 +1170,7 @@ def _onRequestFinished(self, reply: QNetworkReply) -> None:
print_job_state = "offline"
else:
Logger.log(
"w", "Encountered unexpected printjob state: %s" % state
"w", "Encountered unexpected print job state: %s" % state
)
print_job.updateState(print_job_state)

Expand Down Expand Up @@ -1201,7 +1201,7 @@ def _onRequestFinished(self, reply: QNetworkReply) -> None:
self._progress_message = Message(
i18n_catalog.i18nc(
"@info:status",
"Streaming file to the printer SD card",
"Streaming file to the SD card of the printer...",
),
0,
False,
Expand All @@ -1217,7 +1217,7 @@ def _onRequestFinished(self, reply: QNetworkReply) -> None:
and self._progress_message.getText().startswith(
i18n_catalog.i18nc(
"@info:status",
"Streaming file to the printer SD card",
"Streaming file to the SD card of the printer...",
)
)
):
Expand Down Expand Up @@ -1340,7 +1340,7 @@ def _onRequestFinished(self, reply: QNetworkReply) -> None:
elif reply.operation() == QNetworkAccessManager.PostOperation:
if (
self._api_prefix + "files" in reply.url().toString()
): # Result from /files command to start a printjob:
): # Result from /files command to start a print job:
if http_status_code == 204:
Logger.log("d", "OctoPrint file command accepted")

Expand All @@ -1358,7 +1358,7 @@ def _onRequestFinished(self, reply: QNetworkReply) -> None:
):
Logger.log(
"d",
"OctoPrint reports an 404 not found error after uploading to SD-card, but we ignore that",
"OctoPrint reports an 404 not found error after uploading to SD card, but we ignore that",
)
return

Expand Down Expand Up @@ -1529,12 +1529,12 @@ def _onUploadFinished(self, reply: QNetworkReply) -> None:
elif http_status_code == 409:
if "files/sdcard" in reply.url().toString():
error_string = i18n_catalog.i18nc(
"@info:error", "Can't store the printjob on the printer sd card."
"@info:error", "Can't store a print job on SD card of the printer at this time."
)
else:
error_string = i18n_catalog.i18nc(
"@info:error",
"Can't store the printjob with the same name as the one that is currently printing.",
"Can't store the print job with the same name as the one that is currently printing.",
)

elif http_status_code >= 400:
Expand Down Expand Up @@ -1613,7 +1613,7 @@ def _onUploadFinished(self, reply: QNetworkReply) -> None:
self._waiting_message = Message(
i18n_catalog.i18nc(
"@info:status",
"Waiting for OctoPrint to complete Gcode analysis...",
"Waiting for OctoPrint to complete G-code analysis...",
),
title=i18n_catalog.i18nc("@label", "OctoPrint"),
progress=-1,
Expand All @@ -1627,15 +1627,15 @@ def _onUploadFinished(self, reply: QNetworkReply) -> None:
"",
i18n_catalog.i18nc(
"@action:tooltip",
"Stop waiting for the Gcode analysis and start printing immediately",
"Stop waiting for the G-code analysis and start printing immediately",
),
button_style=Message.ActionButtonStyle.SECONDARY,
)
self._waiting_message.addAction(
"cancel",
i18n_catalog.i18nc("@action:button", "Cancel"),
"",
i18n_catalog.i18nc("@action:tooltip", "Abort the printjob"),
i18n_catalog.i18nc("@action:tooltip", "Abort the print job"),
)
self._waiting_message.actionTriggered.connect(self._stopWaitingForAnalysis)
self._waiting_message.show()
Expand Down
14 changes: 7 additions & 7 deletions qml/DiscoverOctoPrintAction.qml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Cura.MachineAction
{
width: Math.floor(parent.width * 0.2)
wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "User name")
text: catalog.i18nc("@label", "Username")
}
Label
{
Expand Down Expand Up @@ -419,7 +419,7 @@ Cura.MachineAction
}
else
{
result = catalog.i18nc("@label", "The API key is not valid.");
result = catalog.i18nc("@label", "The API key is invalid.");
}
}
else
Expand Down Expand Up @@ -550,7 +550,7 @@ Cura.MachineAction
CheckBox
{
id: autoConnectCheckBox
text: catalog.i18nc("@label", "Connect to printer before sending printjob")
text: catalog.i18nc("@label", "Connect to printer before sending print job")
enabled: manager.instanceApiKeyAccepted && autoPrintCheckBox.checked && !autoPowerControlCheckBox.checked
checked: enabled && Cura.ContainerManager.getContainerMetaDataEntry(activeMachineId, "octoprint_auto_connect") == "true"
onClicked:
Expand All @@ -561,7 +561,7 @@ Cura.MachineAction
CheckBox
{
id: storeOnSdCheckBox
text: catalog.i18nc("@label", "Store G-code on the printer SD card")
text: catalog.i18nc("@label", "Store G-code on the SD card of the printer")
enabled: manager.instanceSupportsSd
checked: manager.instanceApiKeyAccepted && Cura.ContainerManager.getContainerMetaDataEntry(activeMachineId, "octoprint_store_sd") == "true"
onClicked:
Expand All @@ -574,7 +574,7 @@ Cura.MachineAction
visible: storeOnSdCheckBox.checked
wrapMode: Text.WordWrap
width: parent.width
text: catalog.i18nc("@label", "Note: Transfering files to the printer SD card takes very long. Using this option is not recommended.")
text: catalog.i18nc("@label", "Note: Transferring files to the printer SD card takes very long. Using this option is not recommended.")
}
CheckBox
{
Expand All @@ -600,13 +600,13 @@ Cura.MachineAction
CheckBox
{
id: fixGcodeFlavor
text: catalog.i18nc("@label", "Set Gcode flavor to \"Marlin\"")
text: catalog.i18nc("@label", "Set G-code flavor to \"Marlin\"")
checked: true
visible: machineGCodeFlavorProvider.properties.value == "UltiGCode"
}
Label
{
text: catalog.i18nc("@label", "Note: Printing UltiGCode using OctoPrint does not work. Setting Gcode flavor to \"Marlin\" fixes this, but overrides material settings on your printer.")
text: catalog.i18nc("@label", "Note: Printing UltiGCode using OctoPrint does not work. Setting G-code flavor to \"Marlin\" fixes this, but overrides material settings on your printer.")
width: parent.width - UM.Theme.getSize("default_margin").width
wrapMode: Text.WordWrap
visible: fixGcodeFlavor.visible
Expand Down
2 changes: 1 addition & 1 deletion qml/ManualInstanceDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ UM.Dialog

Label
{
text: catalog.i18nc("@label","HTTP user name")
text: catalog.i18nc("@label","HTTP username")
width: Math.floor(parent.width * 0.4)
}

Expand Down
2 changes: 1 addition & 1 deletion qml/UploadOptions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ UM.Dialog
}
Label
{
text: catalog.i18nc("@label", "An extenstion will be added automatically.")
text: catalog.i18nc("@label", "A file extenstion will be added automatically.")
}
}

Expand Down

0 comments on commit 7aea357

Please sign in to comment.