From 7aea357c3c71f1e28acbd03bd117f450b1eb4f81 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 14 Jan 2022 12:12:46 +0100 Subject: [PATCH] Fix some language inconsistencies Replaces #259, thanks @andritolion --- OctoPrintOutputDevice.py | 32 ++++++++++++++++---------------- qml/DiscoverOctoPrintAction.qml | 14 +++++++------- qml/ManualInstanceDialog.qml | 2 +- qml/UploadOptions.qml | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/OctoPrintOutputDevice.py b/OctoPrintOutputDevice.py index 53f369e..6460442 100644 --- a/OctoPrintOutputDevice.py +++ b/OctoPrintOutputDevice.py @@ -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": @@ -622,7 +622,7 @@ 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, ) @@ -630,7 +630,7 @@ def proceedRequestWrite(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._waiting_message.actionTriggered.connect( self._stopWaitingForPrinter @@ -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, @@ -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) @@ -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" @@ -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) @@ -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, @@ -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...", ) ) ): @@ -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") @@ -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 @@ -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: @@ -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, @@ -1627,7 +1627,7 @@ 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, ) @@ -1635,7 +1635,7 @@ def _onUploadFinished(self, reply: QNetworkReply) -> 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._waiting_message.actionTriggered.connect(self._stopWaitingForAnalysis) self._waiting_message.show() diff --git a/qml/DiscoverOctoPrintAction.qml b/qml/DiscoverOctoPrintAction.qml index 3d599f4..5966045 100644 --- a/qml/DiscoverOctoPrintAction.qml +++ b/qml/DiscoverOctoPrintAction.qml @@ -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 { @@ -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 @@ -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: @@ -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: @@ -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 { @@ -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 diff --git a/qml/ManualInstanceDialog.qml b/qml/ManualInstanceDialog.qml index 768a80d..d945963 100644 --- a/qml/ManualInstanceDialog.qml +++ b/qml/ManualInstanceDialog.qml @@ -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) } diff --git a/qml/UploadOptions.qml b/qml/UploadOptions.qml index 6b4a949..723e267 100644 --- a/qml/UploadOptions.qml +++ b/qml/UploadOptions.qml @@ -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.") } }