From 0c604ca002e9635237257b225d35b1e5b3ef3c62 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 11 Oct 2016 13:34:02 +0200 Subject: [PATCH 1/3] Update translation of PostProcessingPlugin These were missed previous time because I had my extract script set-up wrong. Contributes to issue CURA-570. --- resources/i18n/de/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ resources/i18n/es/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ resources/i18n/fi/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ resources/i18n/fr/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ resources/i18n/it/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ resources/i18n/nl/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ resources/i18n/tr/cura.po | 39 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 273 insertions(+) diff --git a/resources/i18n/de/cura.po b/resources/i18n/de/cura.po index 5865f8ebed..7dd480bf81 100644 --- a/resources/i18n/de/cura.po +++ b/resources/i18n/de/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Einige Einstellungswerte unterscheiden sich von den im Profil gespeicherten Werten.\n\nKlicken Sie, um den Profilmanager zu öffnen." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "G-Code ändern" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Nachbearbeitung" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Erweiterung, die eine Nachbearbeitung von Skripten ermöglicht, die von Benutzern erstellt wurden." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Plugin Nachbearbeitung" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Skripts Nachbearbeitung" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Ein Skript hinzufügen" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Einstellungen" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Aktive Skripts Nachbearbeitung ändern" diff --git a/resources/i18n/es/cura.po b/resources/i18n/es/cura.po index 8bee1f3c52..ef82e6be05 100644 --- a/resources/i18n/es/cura.po +++ b/resources/i18n/es/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Algunos valores son distintos de los valores almacenados en el perfil.\n\nHaga clic para abrir el administrador de perfiles." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "Modificar GCode" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Posprocesamiento" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Extensión que permite el posprocesamiento de las secuencias de comandos creadas por los usuarios." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Complemento de posprocesamiento" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Secuencias de comandos de posprocesamiento" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Añadir secuencia de comando" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Ajustes" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Cambia las secuencias de comandos de posprocesamiento." diff --git a/resources/i18n/fi/cura.po b/resources/i18n/fi/cura.po index 04b196c6ce..c96b976be0 100644 --- a/resources/i18n/fi/cura.po +++ b/resources/i18n/fi/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Jotkut asetusten arvot eroavat profiiliin tallennetuista arvoista.\n\nAvaa profiilin hallinta napsauttamalla." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "Muokkaa GCode-arvoa" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Jälkikäsittely" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Lisäosa, jonka avulla käyttäjät voivat luoda komentosarjoja jälkikäsittelyä varten" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Jälkikäsittelylisäosa" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Jälkikäsittelykomentosarjat" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Lisää komentosarja" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Asetukset" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Muuta aktiivisia jälkikäsittelykomentosarjoja" diff --git a/resources/i18n/fr/cura.po b/resources/i18n/fr/cura.po index c895cd41f5..ea3ed63c31 100644 --- a/resources/i18n/fr/cura.po +++ b/resources/i18n/fr/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Certaines valeurs de paramètre sont différentes des valeurs enregistrées dans le profil.\n\nCliquez pour ouvrir le gestionnaire de profils." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "Modifier le G-Code" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Post-traitement" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Extension qui permet le post-traitement des scripts créés par l'utilisateur" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Plug-in de post-traitement" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Scripts de post-traitement" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Ajouter un script" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Paramètres" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Modifier les scripts de post-traitement actifs" diff --git a/resources/i18n/it/cura.po b/resources/i18n/it/cura.po index 2483c09260..92ecd581cd 100644 --- a/resources/i18n/it/cura.po +++ b/resources/i18n/it/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Alcuni valori di impostazione sono diversi dai valori memorizzati nel profilo.\n\nFare clic per aprire la gestione profili." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "Modifica il codice G" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Post-elaborazione" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Estensione che consente la post-elaborazione degli script creati da utente" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Plug-in di post-elaborazione" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Script di post-elaborazione" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Aggiungi uno script" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Impostazioni" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Modifica script di post-elaborazione attivi" diff --git a/resources/i18n/nl/cura.po b/resources/i18n/nl/cura.po index 3dd69d0a0d..ee566a61ad 100644 --- a/resources/i18n/nl/cura.po +++ b/resources/i18n/nl/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Sommige instellingswaarden zijn anders dan de waarden die in het profiel zijn opgeslagen.\n\nKlik om het profielbeheer te openen." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "G-code wijzigen" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Nabewerken" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Uitbreiding waarmee door de gebruiker gemaakte scripts voor nabewerking kunnen worden gebruikt" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Invoegtoepassing voor nabewerking" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Scripts voor nabewerking" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Een script toevoegen" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Instellingen" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Actieve scripts voor nabewerking wijzigen" diff --git a/resources/i18n/tr/cura.po b/resources/i18n/tr/cura.po index 940ffb3e5e..511ed43c47 100644 --- a/resources/i18n/tr/cura.po +++ b/resources/i18n/tr/cura.po @@ -2294,3 +2294,42 @@ msgid "" "\n" "Click to open the profile manager." msgstr "Bazı ayar değerleri profilinizde saklanan değerlerden farklıdır.\n\nProfil yöneticisini açmak için tıklayın." + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.py:24 +msgid "Modify G-Code" +msgstr "GCode Değiştir" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:12 +msgctxt "@label" +msgid "Post Processing" +msgstr "Son İşleme" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/__init__.py:16 +msgctxt "Description of plugin" +msgid "Extension that allows for user created scripts for post processing" +msgstr "Kullanıcının oluşturduğu komut dosyalarına son işleme için izin veren uzantı" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:18 +msgctxt "@title:window" +msgid "Post Processing Plugin" +msgstr "Son İşleme Uzantısı" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:49 +msgctxt "@label" +msgid "Post Processing Scripts" +msgstr "Son İşleme Dosyaları" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:218 +msgctxt "@action" +msgid "Add a script" +msgstr "Dosya ekle" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:264 +msgctxt "@label" +msgid "Settings" +msgstr "Ayarlar" + +#: /home/ruben/Projects/Cura/plugins/PostProcessingPlugin/PostProcessingPlugin.qml:456 +msgctxt "@info:tooltip" +msgid "Change active post-processing scripts" +msgstr "Etkin son işleme dosyalarını değiştir" From d04e6a664417108141ae9fae319c037588d468a1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 11 Oct 2016 13:34:48 +0200 Subject: [PATCH 2/3] Use buffered writing for writing gcode to removable drives GCode files are still written line by line, but python is instructed to use buffering. This greatly decreases the total time required to write large(ish) files to USB drives, while having minimal impact on memory use. CURA-2544 --- .../RemovableDriveOutputDevice.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index efb7929327..b7d31e68f8 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -23,6 +23,7 @@ class RemovableDriveOutputDevice(OutputDevice): self.setPriority(1) self._writing = False + self._stream = None def requestWrite(self, node, file_name = None, filter_by_machine = False): filter_by_machine = True # This plugin is indended to be used by machine (regardless of what it was told to do) @@ -65,8 +66,8 @@ class RemovableDriveOutputDevice(OutputDevice): try: Logger.log("d", "Writing to %s", file_name) - stream = open(file_name, "wt") - job = WriteMeshJob(writer, stream, node, MeshWriter.OutputMode.TextMode) + self._stream = open(file_name, "wt", buffering = 1) + job = WriteMeshJob(writer, self._stream, node, MeshWriter.OutputMode.TextMode) job.setFileName(file_name) job.progress.connect(self._onProgress) job.finished.connect(self._onFinished) @@ -92,6 +93,10 @@ class RemovableDriveOutputDevice(OutputDevice): self.writeProgress.emit(self, progress) def _onFinished(self, job): + if self._stream: + self._stream.close() + self._stream = None + if hasattr(job, "_message"): job._message.hide() job._message = None From 15a870c050b3d45151d30147608f868811114481 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 11 Oct 2016 13:39:44 +0200 Subject: [PATCH 3/3] Add some documentation CURA-2544 --- .../RemovableDriveOutputDevice/RemovableDriveOutputDevice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index b7d31e68f8..8b6dce8292 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -66,6 +66,7 @@ class RemovableDriveOutputDevice(OutputDevice): try: Logger.log("d", "Writing to %s", file_name) + # Using buffering greatly reduces the write time for many lines of gcode self._stream = open(file_name, "wt", buffering = 1) job = WriteMeshJob(writer, self._stream, node, MeshWriter.OutputMode.TextMode) job.setFileName(file_name) @@ -94,6 +95,7 @@ class RemovableDriveOutputDevice(OutputDevice): def _onFinished(self, job): if self._stream: + # Explicitly closing the stream flushes the write-buffer self._stream.close() self._stream = None