add utf-8 error handling

- add popup about utf-8 decoding error
- update translation for de
- add Dialogs which show when no filename was set
- update for python2 compatibility
This commit is contained in:
thelastWallE 2021-11-07 23:19:49 +01:00
parent 7ad2cf9ffd
commit b39276015d
11 changed files with 333 additions and 201 deletions

View File

@ -215,7 +215,7 @@ class KlipperPlugin(
settings.set(["probe", "points"], points_new)
settings.remove(["probePoints"])
def migrate_settings(self, settings, old, new, new2="") -> None:
def migrate_settings(self, settings, old, new, new2=""):
"""migrate setting to setting with additional group
Args:

View File

@ -1,6 +1,7 @@
from __future__ import absolute_import, division, print_function, unicode_literals
import glob
import os, time, sys
import io
import flask
from . import util, logger
@ -16,7 +17,7 @@ if sys.version_info[0] < 3:
import StringIO
def list_cfg_files(self, path: str) -> list:
def list_cfg_files(self, path):
"""Generate list of config files.
Args:
@ -77,22 +78,33 @@ def get_cfg(self, file):
if util.file_exist(self, file):
logger.log_debug(self, "get_cfg_files Path: " + file)
try:
with open(file, "r") as f:
with io.open(file, "r", encoding='utf-8') as f:
response['config'] = f.read()
except IOError as Err:
logger.log_error(
self,
"Error: Klipper config file not found at: {}".format(file)
+ "\n IOError: {}".format(Err)
gettext("Error: Klipper config file not found at:")
+ " {}".format(file)
+ "\n"
+ gettext("IOError:") + " {}".format(Err)
)
response['text'] = Err
return response
except UnicodeDecodeError as Err:
logger.log_error(
self,
gettext("Decode Error:")
+"\n"
+ "{}".format(Err)
+ "\n\n"
+ gettext("Please convert your config files to utf-8!")
+ "\n"
+ gettext("Or you can also paste your config \ninto the Editor and save it.")
)
response['text'] = Err
return response
else:
if sys.version_info[0] < 3:
response['config'] = response.config.decode('utf-8')
return response
finally:
f.close()
else:
response['text'] = gettext("File not found!")
return response
@ -114,8 +126,6 @@ def save_cfg(self, content, filename):
"Save klipper config"
)
if sys.version_info[0] < 3:
content = content.encode('utf-8')
configpath = os.path.expanduser(self._settings.get(["configuration", "configpath"]))
if filename == "":
@ -127,7 +137,7 @@ def save_cfg(self, content, filename):
logger.log_debug(self, "Writing Klipper config to {}".format(filepath))
try:
with open(filepath, "w") as f:
with io.open(filepath, "w", encoding='utf-8') as f:
f.write(content)
except IOError:
logger.log_error(self, "Error: Couldn't open Klipper config file: {}".format(filepath))
@ -136,7 +146,6 @@ def save_cfg(self, content, filename):
logger.log_debug(self, "Written Klipper config to {}".format(filepath))
return True
finally:
f.close()
copy_cfg_to_backup(self, filepath)
@ -290,4 +299,3 @@ def copy_cfg_to_backup(self, src):
else:
logger.log_debug(self, "CfgBackup " + dst + " written")
return True

View File

@ -119,7 +119,7 @@ $(function () {
};
showConfirmationDialog(
_.sprintf(gettext('You are about to delete backuped config file "%(name)s".'), {
_.sprintf(gettext('You are about to delete backed config file "%(name)s".'), {
name: _.escape(backup),
}),
perform
@ -165,7 +165,7 @@ $(function () {
};
showConfirmationDialog(
_.sprintf(gettext("You are about to restore %(count)d backuped config files."), {
_.sprintf(gettext("You are about to restore %(count)d backed config files."), {
count: self.markedForFileRestore().length,
}),
perform
@ -180,7 +180,7 @@ $(function () {
};
showConfirmationDialog(
_.sprintf(gettext("You are about to delete %(count)d backuped config files."), {
_.sprintf(gettext("You are about to delete %(count)d backed config files."), {
count: self.markedForFileRestore().length,
}),
perform
@ -192,7 +192,7 @@ $(function () {
title = gettext("Restoring klipper config files");
self.klipperViewModel.consoleMessage("debug", title);
message = _.sprintf(gettext("Restoring %(count)d backuped config files..."), {
message = _.sprintf(gettext("Restoring %(count)d backed config files..."), {
count: files.length,
});
@ -246,7 +246,7 @@ $(function () {
var title, message, handler;
title = gettext("Deleting backup files");
message = _.sprintf(gettext("Deleting %(count)d backup files..."), {
message = _.sprintf(gettext("Deleting %(count)d backed files..."), {
count: files.length,
});

View File

@ -215,39 +215,18 @@ $(function () {
var options = options || {};
var closing = options.closing || false;
if (editor.session) {
self.klipperViewModel.consoleMessage("debug", "SaveCfg start");
if (self.CfgFilename() != "") {
if (editor.session) {
if (self.settings.settings.plugins.klipper.configuration.parse_check() == true) {
var saveRequest = function () {
OctoPrint.plugins.klipper.saveCfg(editor.session.getValue(), self.CfgFilename())
.done(function (response) {
if (response.saved === true) {
self.klipperViewModel.showPopUp("success", gettext("Save Config"), gettext("File saved."));
self.loadedConfig = editor.session.getValue(); //set loaded config to current for resetting dirtyEditor
if (closing) {
editordialog.modal('hide');
}
if (self.settings.settings.plugins.klipper.configuration.restart_onsave() == true) {
self.klipperViewModel.requestRestart();
}
} else {
showMessageDialog(
gettext('File not saved!'),
{
title: gettext("Save Config"),
onclose: function () { self.editorFocusDelay(1000); }
}
);
}
});
};
if (self.settings.settings.plugins.klipper.configuration.parse_check() == true) {
self.checkSyntax().then((syntaxOK) => {
// check Syntax and wait for response
self.checkSyntax().then((syntaxOK) => {
if (syntaxOK === false) {
// Ask if we should save a faulty config anyway
self.askSaveFaulty().then((areWeSaving) => {
if (areWeSaving === false) {
// Not saving
showMessageDialog(
gettext('Faulty config not saved!'),
{
@ -256,16 +235,26 @@ $(function () {
}
);
} else {
saveRequest();
// Save anyway
self.saveRequest(closing);
}
});
} else {
saveRequest();
// Syntax is ok
self.saveRequest(closing);
}
});
} else {
saveRequest();
} else {
self.saveRequest(closing);
}
}
} else {
showMessageDialog(
gettext("No filename set"),
{
title: gettext("Save Config")
}
);
}
};
@ -305,7 +294,8 @@ $(function () {
};
self.reloadFromFile = function () {
OctoPrint.plugins.klipper.getCfg(self.CfgFilename())
if (self.CfgFilename() != "") {
OctoPrint.plugins.klipper.getCfg(self.CfgFilename())
.done(function (response) {
self.klipperViewModel.consoleMessage("debug", "reloadFromFile done");
if (response.response.text != "") {
@ -334,9 +324,16 @@ $(function () {
}
);
});
} else {
showMessageDialog(
gettext("No filename set"),
{
title: gettext("Reload File")
}
);
}
};
self.onStartup = function () {
ace.config.set("basePath", "plugin/klipper/static/js/lib/ace/");
editor = ace.edit("plugin-klipper-config");
@ -365,6 +362,32 @@ $(function () {
}
);
};
self.saveRequest = function (closing) {
self.klipperViewModel.consoleMessage("debug", "SaveCfg start");
OctoPrint.plugins.klipper.saveCfg(editor.session.getValue(), self.CfgFilename())
.done(function (response) {
if (response.saved === true) {
self.klipperViewModel.showPopUp("success", gettext("Save Config"), gettext("File saved."));
self.loadedConfig = editor.session.getValue(); //set loaded config to current for resetting dirtyEditor
if (closing) {
editordialog.modal('hide');
}
if (self.settings.settings.plugins.klipper.configuration.restart_onsave() == true) {
self.klipperViewModel.requestRestart();
}
} else {
showMessageDialog(
gettext('File not saved!'),
{
title: gettext("Save Config"),
onclose: function () { self.editorFocusDelay(1000); }
}
);
}
});
};
}
OCTOPRINT_VIEWMODELS.push({

View File

@ -85,7 +85,7 @@ $(function () {
OctoPrint.plugins.klipper.listCfg().done(function (response) {
self.klipperViewModel.consoleMessage("debug", "listCfgFiles done");
self.configs.updateItems(response.files);
self.PathToConfigs("Path: "+ response.path);
self.PathToConfigs(gettext("Path: ") + response.path);
self.configs.resetPage();
});
};

View File

@ -264,7 +264,6 @@
<button class="btn btn-small"
data-bind="click: removeMarkedFiles, enable: markedForFileRemove().length > 0">{{ _('Delete selected') }}
</button>
<p class="klipper-inline" data-bind="text: PathToConfigs" title="{{ _('Path to the config files.')}}"></p>
</div>
<div class="pull-right">
<div class="btn-group">
@ -283,6 +282,7 @@
</div>
</div>
</div>
<p class="klipper-inline" data-bind="text: PathToConfigs" title="{{ _('Path to the config files.')}}"></p>
<div class="scroll-y">
<table class="table table-striped table-hover table-condensed table-hover table-fixed" id="klipper_cfg_files">
<thead>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoKlipper 0.3.8.2\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2021-11-03 11:12+0100\n"
"POT-Creation-Date: 2021-11-07 22:51+0100\n"
"PO-Revision-Date: 2021-05-13 17:32+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@ -37,39 +37,63 @@ msgstr "Sie sind dabei Klipper neu zu starten!"
#: octoprint_klipper/__init__.py:636
msgid "This will stop ongoing prints!"
msgstr "Dies wird angehende Aufträge abbrechen!"
msgstr "Dies wird laufende Aufträge abbrechen!"
#: octoprint_klipper/cfgUtils.py:97
#: octoprint_klipper/cfgUtils.py:86
msgid "Error: Klipper config file not found at:"
msgstr "Fehler: Klipper Konfigurationsdatei nicht gefunden:"
#: octoprint_klipper/cfgUtils.py:89
msgid "IOError:"
msgstr "IOFehler"
#: octoprint_klipper/cfgUtils.py:96
msgid "Decode Error:"
msgstr "Dekodierungsfehler:"
#: octoprint_klipper/cfgUtils.py:100
msgid "Please convert your config files to utf-8!"
msgstr "Bitte die Konfigurationsdateien nach utf-8 konvertieren!"
#: octoprint_klipper/cfgUtils.py:102
msgid ""
"Or you can also paste your config \n"
"into the Editor and save it."
msgstr ""
"Sie können auch die Konfiguration \n"
"in den Editor einfügen und dann speichern."
#: octoprint_klipper/cfgUtils.py:109
msgid "File not found!"
msgstr "Datei nicht gefunden!"
#: octoprint_klipper/static/js/klipper.js:172
#: octoprint_klipper/static/js/klipper.js:185
#: octoprint_klipper/templates/klipper_sidebar.jinja2:11
msgid "Go to OctoKlipper Tab"
msgstr "Gehe zum OctoKlipper Reiter"
#: octoprint_klipper/static/js/klipper.js:290
#: octoprint_klipper/static/js/klipper.js:305
msgid "Restarted Klipper"
msgstr "Klipper neu gestartet"
#: octoprint_klipper/static/js/klipper.js:298
#: octoprint_klipper/static/js/klipper.js:313
msgid "All ongoing Prints will be stopped!"
msgstr "Alle laufende Drucke werden gestoppt!"
#: octoprint_klipper/static/js/klipper.js:303
#: octoprint_klipper/static/js/klipper.js:318
msgid "Restart Klipper?"
msgstr "Klipper neu starten?"
#: octoprint_klipper/static/js/klipper.js:305
#: octoprint_klipper/static/js/klipper.js:320
#: octoprint_klipper/templates/klipper_tab_main.jinja2:39
msgid "Restart"
msgstr "Neustart"
#: octoprint_klipper/static/js/klipper.js:305
#: octoprint_klipper/static/js/klipper.js:320
msgid "Restart and don't ask this again."
msgstr "Neu starten und dies nicht wieder nachfragen."
#: octoprint_klipper/static/js/klipper_backup.js:126
#: octoprint_klipper/static/js/klipper_backup.js:110
#: octoprint_klipper/static/js/klipper_settings.js:117
#, python-format
msgid ""
@ -79,78 +103,78 @@ msgstr ""
"Konnte config %(name)s nicht löschen. </p><p> Bitte im octoprint.log "
"nachsehen für weitere Details.</p>"
#: octoprint_klipper/static/js/klipper_backup.js:129
#: octoprint_klipper/static/js/klipper_backup.js:113
#: octoprint_klipper/static/js/klipper_settings.js:120
msgid "Could not remove config"
msgstr "Konnte Konfiguration nicht löschen"
#: octoprint_klipper/static/js/klipper_backup.js:138
#: octoprint_klipper/static/js/klipper_backup.js:122
#, python-format
msgid "You are about to delete backuped config file \"%(name)s\"."
msgid "You are about to delete backed config file \"%(name)s\"."
msgstr "Sie sind dabei die gesicherte Konfigurationsdatei \"%(name)s\" zu löschen."
#: octoprint_klipper/static/js/klipper_backup.js:154
#: octoprint_klipper/static/js/klipper_backup.js:138
msgid "This will overwrite any file with the same name on the configpath."
msgstr ""
"Dies wird jede Datei mit dem gleichen Namen im Konfigurationsordner "
"überschreiben."
#: octoprint_klipper/static/js/klipper_backup.js:157
#: octoprint_klipper/static/js/klipper_backup.js:141
msgid "Are you sure you want to restore now?"
msgstr "Sind sie sicher jetzt wiederherzustellen?"
#: octoprint_klipper/static/js/klipper_backup.js:159
#: octoprint_klipper/static/js/klipper_backup.js:143
#: octoprint_klipper/static/js/klipper_editor.js:158
msgid "Proceed"
msgstr "Weiter"
#: octoprint_klipper/static/js/klipper_backup.js:184
#: octoprint_klipper/static/js/klipper_backup.js:168
#, python-format
msgid "You are about to restore %(count)d backuped config files."
msgid "You are about to restore %(count)d backed config files."
msgstr ""
"Sie sind dabei %(count)d gesicherte Konfigurationsdateien "
"wiederherzustellen."
#: octoprint_klipper/static/js/klipper_backup.js:199
#: octoprint_klipper/static/js/klipper_backup.js:183
#, python-format
msgid "You are about to delete %(count)d backuped config files."
msgid "You are about to delete %(count)d backed config files."
msgstr "Sie sind dabei %(count)d gesicherte Konfigurationsdateien zu löschen."
#: octoprint_klipper/static/js/klipper_backup.js:209
#: octoprint_klipper/static/js/klipper_backup.js:193
msgid "Restoring klipper config files"
msgstr "Stelle Klipper Konfigdatei wieder her"
#: octoprint_klipper/static/js/klipper_backup.js:211
#: octoprint_klipper/static/js/klipper_backup.js:195
#, python-format
msgid "Restoring %(count)d backuped config files..."
msgid "Restoring %(count)d backed config files..."
msgstr "Stelle %(count)d gesicherte Konfigurationsdateien wieder her."
#: octoprint_klipper/static/js/klipper_backup.js:220
#: octoprint_klipper/static/js/klipper_backup.js:204
#, python-format
msgid "Restored %(filename)s..."
msgstr "%(filename)s wiederhergestellt..."
#: octoprint_klipper/static/js/klipper_backup.js:231
#: octoprint_klipper/static/js/klipper_backup.js:215
#, python-format
msgid "Restoring of %(filename)s failed, continuing..."
msgstr "Wiederherstellung von Datei %(filename)s gescheitert, setze fort..."
#: octoprint_klipper/static/js/klipper_backup.js:264
#: octoprint_klipper/static/js/klipper_backup.js:248
msgid "Deleting backup files"
msgstr "Lösche gesicherte Dateien"
#: octoprint_klipper/static/js/klipper_backup.js:265
#: octoprint_klipper/static/js/klipper_backup.js:249
#, python-format
msgid "Deleting %(count)d backup files..."
msgid "Deleting %(count)d backed files..."
msgstr "Lösche %(count)d gesicherte Konfigurationsdateien..."
#: octoprint_klipper/static/js/klipper_backup.js:273
#: octoprint_klipper/static/js/klipper_backup.js:257
#: octoprint_klipper/static/js/klipper_settings.js:176
#, python-format
msgid "Deleted %(filename)s..."
msgstr "%(filename)s gelöscht..."
#: octoprint_klipper/static/js/klipper_backup.js:279
#: octoprint_klipper/static/js/klipper_backup.js:263
#: octoprint_klipper/static/js/klipper_settings.js:186
#, python-format
msgid "Deleting of %(filename)s failed, continuing..."
@ -218,38 +242,49 @@ msgstr "Syntaxprüfung"
msgid "SyntaxCheck OK"
msgstr "Syntaxprüfung OK"
#: octoprint_klipper/static/js/klipper_editor.js:226
#: octoprint_klipper/static/js/klipper_editor.js:238
#: octoprint_klipper/static/js/klipper_editor.js:254
#: octoprint_klipper/static/js/klipper_editor.js:231
msgid "Faulty config not saved!"
msgstr "Fehlerhafte Datei nicht gespeichert!"
#: octoprint_klipper/static/js/klipper_editor.js:233
#: octoprint_klipper/static/js/klipper_editor.js:255
#: octoprint_klipper/static/js/klipper_editor.js:372
#: octoprint_klipper/static/js/klipper_editor.js:384
#: octoprint_klipper/templates/klipper_editor.jinja2:40
msgid "Save Config"
msgstr "Speichere Konfig"
#: octoprint_klipper/static/js/klipper_editor.js:226
msgid "File saved."
msgstr "Datei gespeichert."
#: octoprint_klipper/static/js/klipper_editor.js:253
#: octoprint_klipper/static/js/klipper_editor.js:329
msgid "No filename set"
msgstr "Dateiname nicht angegeben"
#: octoprint_klipper/static/js/klipper_editor.js:236
msgid "File not saved!"
msgstr "Datei nicht gespeichert."
#: octoprint_klipper/static/js/klipper_editor.js:252
msgid "Faulty config not saved!"
msgstr "Fehlerhafte Datei nicht gespeichert!"
#: octoprint_klipper/static/js/klipper_editor.js:315
#: octoprint_klipper/static/js/klipper_editor.js:333
#: octoprint_klipper/static/js/klipper_editor.js:305
#: octoprint_klipper/static/js/klipper_editor.js:323
#: octoprint_klipper/static/js/klipper_editor.js:331
msgid "Reload File"
msgstr "Datei neuladen"
#: octoprint_klipper/static/js/klipper_editor.js:319
#: octoprint_klipper/static/js/klipper_editor.js:309
msgid "Reload Config"
msgstr "Datei neuladen"
#: octoprint_klipper/static/js/klipper_editor.js:319
#: octoprint_klipper/static/js/klipper_editor.js:309
msgid "File reloaded."
msgstr "Datei neugeladen."
#: octoprint_klipper/static/js/klipper_editor.js:372
msgid "File saved."
msgstr "Datei gespeichert."
#: octoprint_klipper/static/js/klipper_editor.js:382
msgid "File not saved!"
msgstr "Datei nicht gespeichert."
#: octoprint_klipper/static/js/klipper_settings.js:88
msgid "Path: "
msgstr "Pfad: "
#: octoprint_klipper/static/js/klipper_settings.js:129
#, python-format
msgid "You are about to delete config file \"%(name)s\"."
@ -811,4 +846,3 @@ msgstr ""
#: octoprint_klipper/templates/klipper_tab_main.jinja2:67
msgid "Analyze Klipper Log"
msgstr "Analysiere Klipperlog"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoKlipper 0.3.8.2\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2021-11-03 11:12+0100\n"
"POT-Creation-Date: 2021-11-07 22:51+0100\n"
"PO-Revision-Date: 2021-05-13 17:32+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@ -37,39 +37,63 @@ msgstr "Sie sind dabei Klipper neu zu starten!"
#: octoprint_klipper/__init__.py:636
msgid "This will stop ongoing prints!"
msgstr "Dies wird angehende Aufträge abbrechen!"
msgstr "Dies wird laufende Aufträge abbrechen!"
#: octoprint_klipper/cfgUtils.py:97
#: octoprint_klipper/cfgUtils.py:86
msgid "Error: Klipper config file not found at:"
msgstr "Fehler: Klipper Konfigurationsdatei nicht gefunden:"
#: octoprint_klipper/cfgUtils.py:89
msgid "IOError:"
msgstr "IOFehler"
#: octoprint_klipper/cfgUtils.py:96
msgid "Decode Error:"
msgstr "Dekodierungsfehler:"
#: octoprint_klipper/cfgUtils.py:100
msgid "Please convert your config files to utf-8!"
msgstr "Bitte die Konfigurationsdateien nach utf-8 konvertieren!"
#: octoprint_klipper/cfgUtils.py:102
msgid ""
"Or you can also paste your config \n"
"into the Editor and save it."
msgstr ""
"Sie können auch die Konfiguration \n"
"in den Editor einfügen und dann speichern."
#: octoprint_klipper/cfgUtils.py:109
msgid "File not found!"
msgstr "Datei nicht gefunden!"
#: octoprint_klipper/static/js/klipper.js:172
#: octoprint_klipper/static/js/klipper.js:185
#: octoprint_klipper/templates/klipper_sidebar.jinja2:11
msgid "Go to OctoKlipper Tab"
msgstr "Gehe zum OctoKlipper Reiter"
#: octoprint_klipper/static/js/klipper.js:290
#: octoprint_klipper/static/js/klipper.js:305
msgid "Restarted Klipper"
msgstr "Klipper neu gestartet"
#: octoprint_klipper/static/js/klipper.js:298
#: octoprint_klipper/static/js/klipper.js:313
msgid "All ongoing Prints will be stopped!"
msgstr "Alle laufende Drucke werden gestoppt!"
#: octoprint_klipper/static/js/klipper.js:303
#: octoprint_klipper/static/js/klipper.js:318
msgid "Restart Klipper?"
msgstr "Klipper neu starten?"
#: octoprint_klipper/static/js/klipper.js:305
#: octoprint_klipper/static/js/klipper.js:320
#: octoprint_klipper/templates/klipper_tab_main.jinja2:39
msgid "Restart"
msgstr "Neustart"
#: octoprint_klipper/static/js/klipper.js:305
#: octoprint_klipper/static/js/klipper.js:320
msgid "Restart and don't ask this again."
msgstr "Neu starten und dies nicht wieder nachfragen."
#: octoprint_klipper/static/js/klipper_backup.js:126
#: octoprint_klipper/static/js/klipper_backup.js:110
#: octoprint_klipper/static/js/klipper_settings.js:117
#, python-format
msgid ""
@ -79,78 +103,78 @@ msgstr ""
"Konnte config %(name)s nicht löschen. </p><p> Bitte im octoprint.log "
"nachsehen für weitere Details.</p>"
#: octoprint_klipper/static/js/klipper_backup.js:129
#: octoprint_klipper/static/js/klipper_backup.js:113
#: octoprint_klipper/static/js/klipper_settings.js:120
msgid "Could not remove config"
msgstr "Konnte Konfiguration nicht löschen"
#: octoprint_klipper/static/js/klipper_backup.js:138
#: octoprint_klipper/static/js/klipper_backup.js:122
#, python-format
msgid "You are about to delete backuped config file \"%(name)s\"."
msgid "You are about to delete backed config file \"%(name)s\"."
msgstr "Sie sind dabei die gesicherte Konfigurationsdatei \"%(name)s\" zu löschen."
#: octoprint_klipper/static/js/klipper_backup.js:154
#: octoprint_klipper/static/js/klipper_backup.js:138
msgid "This will overwrite any file with the same name on the configpath."
msgstr ""
"Dies wird jede Datei mit dem gleichen Namen im Konfigurationsordner "
"überschreiben."
#: octoprint_klipper/static/js/klipper_backup.js:157
#: octoprint_klipper/static/js/klipper_backup.js:141
msgid "Are you sure you want to restore now?"
msgstr "Sind sie sicher jetzt wiederherzustellen?"
#: octoprint_klipper/static/js/klipper_backup.js:159
#: octoprint_klipper/static/js/klipper_backup.js:143
#: octoprint_klipper/static/js/klipper_editor.js:158
msgid "Proceed"
msgstr "Weiter"
#: octoprint_klipper/static/js/klipper_backup.js:184
#: octoprint_klipper/static/js/klipper_backup.js:168
#, python-format
msgid "You are about to restore %(count)d backuped config files."
msgid "You are about to restore %(count)d backed config files."
msgstr ""
"Sie sind dabei %(count)d gesicherte Konfigurationsdateien "
"wiederherzustellen."
#: octoprint_klipper/static/js/klipper_backup.js:199
#: octoprint_klipper/static/js/klipper_backup.js:183
#, python-format
msgid "You are about to delete %(count)d backuped config files."
msgid "You are about to delete %(count)d backed config files."
msgstr "Sie sind dabei %(count)d gesicherte Konfigurationsdateien zu löschen."
#: octoprint_klipper/static/js/klipper_backup.js:209
#: octoprint_klipper/static/js/klipper_backup.js:193
msgid "Restoring klipper config files"
msgstr "Stelle Klipper Konfigdatei wieder her"
#: octoprint_klipper/static/js/klipper_backup.js:211
#: octoprint_klipper/static/js/klipper_backup.js:195
#, python-format
msgid "Restoring %(count)d backuped config files..."
msgid "Restoring %(count)d backed config files..."
msgstr "Stelle %(count)d gesicherte Konfigurationsdateien wieder her."
#: octoprint_klipper/static/js/klipper_backup.js:220
#: octoprint_klipper/static/js/klipper_backup.js:204
#, python-format
msgid "Restored %(filename)s..."
msgstr "%(filename)s wiederhergestellt..."
#: octoprint_klipper/static/js/klipper_backup.js:231
#: octoprint_klipper/static/js/klipper_backup.js:215
#, python-format
msgid "Restoring of %(filename)s failed, continuing..."
msgstr "Wiederherstellung von Datei %(filename)s gescheitert, setze fort..."
#: octoprint_klipper/static/js/klipper_backup.js:264
#: octoprint_klipper/static/js/klipper_backup.js:248
msgid "Deleting backup files"
msgstr "Lösche gesicherte Dateien"
#: octoprint_klipper/static/js/klipper_backup.js:265
#: octoprint_klipper/static/js/klipper_backup.js:249
#, python-format
msgid "Deleting %(count)d backup files..."
msgid "Deleting %(count)d backed files..."
msgstr "Lösche %(count)d gesicherte Konfigurationsdateien..."
#: octoprint_klipper/static/js/klipper_backup.js:273
#: octoprint_klipper/static/js/klipper_backup.js:257
#: octoprint_klipper/static/js/klipper_settings.js:176
#, python-format
msgid "Deleted %(filename)s..."
msgstr "%(filename)s gelöscht..."
#: octoprint_klipper/static/js/klipper_backup.js:279
#: octoprint_klipper/static/js/klipper_backup.js:263
#: octoprint_klipper/static/js/klipper_settings.js:186
#, python-format
msgid "Deleting of %(filename)s failed, continuing..."
@ -218,38 +242,49 @@ msgstr "Syntaxprüfung"
msgid "SyntaxCheck OK"
msgstr "Syntaxprüfung OK"
#: octoprint_klipper/static/js/klipper_editor.js:226
#: octoprint_klipper/static/js/klipper_editor.js:238
#: octoprint_klipper/static/js/klipper_editor.js:254
#: octoprint_klipper/static/js/klipper_editor.js:231
msgid "Faulty config not saved!"
msgstr "Fehlerhafte Datei nicht gespeichert!"
#: octoprint_klipper/static/js/klipper_editor.js:233
#: octoprint_klipper/static/js/klipper_editor.js:255
#: octoprint_klipper/static/js/klipper_editor.js:372
#: octoprint_klipper/static/js/klipper_editor.js:384
#: octoprint_klipper/templates/klipper_editor.jinja2:40
msgid "Save Config"
msgstr "Speichere Konfig"
#: octoprint_klipper/static/js/klipper_editor.js:226
msgid "File saved."
msgstr "Datei gespeichert."
#: octoprint_klipper/static/js/klipper_editor.js:253
#: octoprint_klipper/static/js/klipper_editor.js:329
msgid "No filename set"
msgstr "Dateiname nicht angegeben"
#: octoprint_klipper/static/js/klipper_editor.js:236
msgid "File not saved!"
msgstr "Datei nicht gespeichert."
#: octoprint_klipper/static/js/klipper_editor.js:252
msgid "Faulty config not saved!"
msgstr "Fehlerhafte Datei nicht gespeichert!"
#: octoprint_klipper/static/js/klipper_editor.js:315
#: octoprint_klipper/static/js/klipper_editor.js:333
#: octoprint_klipper/static/js/klipper_editor.js:305
#: octoprint_klipper/static/js/klipper_editor.js:323
#: octoprint_klipper/static/js/klipper_editor.js:331
msgid "Reload File"
msgstr "Datei neuladen"
#: octoprint_klipper/static/js/klipper_editor.js:319
#: octoprint_klipper/static/js/klipper_editor.js:309
msgid "Reload Config"
msgstr "Datei neuladen"
#: octoprint_klipper/static/js/klipper_editor.js:319
#: octoprint_klipper/static/js/klipper_editor.js:309
msgid "File reloaded."
msgstr "Datei neugeladen."
#: octoprint_klipper/static/js/klipper_editor.js:372
msgid "File saved."
msgstr "Datei gespeichert."
#: octoprint_klipper/static/js/klipper_editor.js:382
msgid "File not saved!"
msgstr "Datei nicht gespeichert."
#: octoprint_klipper/static/js/klipper_settings.js:88
msgid "Path: "
msgstr "Pfad: "
#: octoprint_klipper/static/js/klipper_settings.js:129
#, python-format
msgid "You are about to delete config file \"%(name)s\"."
@ -811,4 +846,3 @@ msgstr ""
#: octoprint_klipper/templates/klipper_tab_main.jinja2:67
msgid "Analyze Klipper Log"
msgstr "Analysiere Klipperlog"

View File

@ -7,9 +7,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoKlipper 0.3.9rc4\n"
"Project-Id-Version: OctoKlipper 0.3.9rc5\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2021-11-03 11:12+0100\n"
"POT-Creation-Date: 2021-11-07 22:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -38,37 +38,59 @@ msgstr ""
msgid "This will stop ongoing prints!"
msgstr ""
#: octoprint_klipper/cfgUtils.py:97
#: octoprint_klipper/cfgUtils.py:86
msgid "Error: Klipper config file not found at:"
msgstr ""
#: octoprint_klipper/cfgUtils.py:89
msgid "IOError:"
msgstr ""
#: octoprint_klipper/cfgUtils.py:96
msgid "Decode Error:"
msgstr ""
#: octoprint_klipper/cfgUtils.py:100
msgid "Please convert your config files to utf-8!"
msgstr ""
#: octoprint_klipper/cfgUtils.py:102
msgid ""
"Or you can also paste your config \n"
"into the Editor and save it."
msgstr ""
#: octoprint_klipper/cfgUtils.py:109
msgid "File not found!"
msgstr ""
#: octoprint_klipper/static/js/klipper.js:172
#: octoprint_klipper/static/js/klipper.js:185
#: octoprint_klipper/templates/klipper_sidebar.jinja2:11
msgid "Go to OctoKlipper Tab"
msgstr ""
#: octoprint_klipper/static/js/klipper.js:290
#: octoprint_klipper/static/js/klipper.js:305
msgid "Restarted Klipper"
msgstr ""
#: octoprint_klipper/static/js/klipper.js:298
#: octoprint_klipper/static/js/klipper.js:313
msgid "All ongoing Prints will be stopped!"
msgstr ""
#: octoprint_klipper/static/js/klipper.js:303
#: octoprint_klipper/static/js/klipper.js:318
msgid "Restart Klipper?"
msgstr ""
#: octoprint_klipper/static/js/klipper.js:305
#: octoprint_klipper/static/js/klipper.js:320
#: octoprint_klipper/templates/klipper_tab_main.jinja2:39
msgid "Restart"
msgstr ""
#: octoprint_klipper/static/js/klipper.js:305
#: octoprint_klipper/static/js/klipper.js:320
msgid "Restart and don't ask this again."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:126
#: octoprint_klipper/static/js/klipper_backup.js:110
#: octoprint_klipper/static/js/klipper_settings.js:117
#, python-format
msgid ""
@ -76,74 +98,74 @@ msgid ""
"details.</p>"
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:129
#: octoprint_klipper/static/js/klipper_backup.js:113
#: octoprint_klipper/static/js/klipper_settings.js:120
msgid "Could not remove config"
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:138
#: octoprint_klipper/static/js/klipper_backup.js:122
#, python-format
msgid "You are about to delete backuped config file \"%(name)s\"."
msgid "You are about to delete backed config file \"%(name)s\"."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:154
#: octoprint_klipper/static/js/klipper_backup.js:138
msgid "This will overwrite any file with the same name on the configpath."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:157
#: octoprint_klipper/static/js/klipper_backup.js:141
msgid "Are you sure you want to restore now?"
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:159
#: octoprint_klipper/static/js/klipper_backup.js:143
#: octoprint_klipper/static/js/klipper_editor.js:158
msgid "Proceed"
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:184
#: octoprint_klipper/static/js/klipper_backup.js:168
#, python-format
msgid "You are about to restore %(count)d backuped config files."
msgid "You are about to restore %(count)d backed config files."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:199
#: octoprint_klipper/static/js/klipper_backup.js:183
#, python-format
msgid "You are about to delete %(count)d backuped config files."
msgid "You are about to delete %(count)d backed config files."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:209
#: octoprint_klipper/static/js/klipper_backup.js:193
msgid "Restoring klipper config files"
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:211
#: octoprint_klipper/static/js/klipper_backup.js:195
#, python-format
msgid "Restoring %(count)d backuped config files..."
msgid "Restoring %(count)d backed config files..."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:220
#: octoprint_klipper/static/js/klipper_backup.js:204
#, python-format
msgid "Restored %(filename)s..."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:231
#: octoprint_klipper/static/js/klipper_backup.js:215
#, python-format
msgid "Restoring of %(filename)s failed, continuing..."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:264
#: octoprint_klipper/static/js/klipper_backup.js:248
msgid "Deleting backup files"
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:265
#: octoprint_klipper/static/js/klipper_backup.js:249
#, python-format
msgid "Deleting %(count)d backup files..."
msgid "Deleting %(count)d backed files..."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:273
#: octoprint_klipper/static/js/klipper_backup.js:257
#: octoprint_klipper/static/js/klipper_settings.js:176
#, python-format
msgid "Deleted %(filename)s..."
msgstr ""
#: octoprint_klipper/static/js/klipper_backup.js:279
#: octoprint_klipper/static/js/klipper_backup.js:263
#: octoprint_klipper/static/js/klipper_settings.js:186
#, python-format
msgid "Deleting of %(filename)s failed, continuing..."
@ -211,38 +233,49 @@ msgstr ""
msgid "SyntaxCheck OK"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:226
#: octoprint_klipper/static/js/klipper_editor.js:238
#: octoprint_klipper/static/js/klipper_editor.js:254
#: octoprint_klipper/static/js/klipper_editor.js:231
msgid "Faulty config not saved!"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:233
#: octoprint_klipper/static/js/klipper_editor.js:255
#: octoprint_klipper/static/js/klipper_editor.js:372
#: octoprint_klipper/static/js/klipper_editor.js:384
#: octoprint_klipper/templates/klipper_editor.jinja2:40
msgid "Save Config"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:226
msgid "File saved."
#: octoprint_klipper/static/js/klipper_editor.js:253
#: octoprint_klipper/static/js/klipper_editor.js:329
msgid "No filename set"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:236
msgid "File not saved!"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:252
msgid "Faulty config not saved!"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:315
#: octoprint_klipper/static/js/klipper_editor.js:333
#: octoprint_klipper/static/js/klipper_editor.js:305
#: octoprint_klipper/static/js/klipper_editor.js:323
#: octoprint_klipper/static/js/klipper_editor.js:331
msgid "Reload File"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:319
#: octoprint_klipper/static/js/klipper_editor.js:309
msgid "Reload Config"
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:319
#: octoprint_klipper/static/js/klipper_editor.js:309
msgid "File reloaded."
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:372
msgid "File saved."
msgstr ""
#: octoprint_klipper/static/js/klipper_editor.js:382
msgid "File not saved!"
msgstr ""
#: octoprint_klipper/static/js/klipper_settings.js:88
msgid "Path: "
msgstr ""
#: octoprint_klipper/static/js/klipper_settings.js:129
#, python-format
msgid "You are about to delete config file \"%(name)s\"."