From 972c2823a01477c124ceb15c235f8e2801e0b416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 22 Mar 2018 14:21:20 +0100 Subject: [PATCH] Add missing _sprintf wrapper around messages Fixes #2499 --- src/octoprint/static/js/app/dataupdater.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/octoprint/static/js/app/dataupdater.js b/src/octoprint/static/js/app/dataupdater.js index 406df4690..54074ac8f 100644 --- a/src/octoprint/static/js/app/dataupdater.js +++ b/src/octoprint/static/js/app/dataupdater.js @@ -245,17 +245,17 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) { case "resend": case "timeout": { title = gettext("Communication error"); - text = gettext("There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s", payload); + text = _.sprintf(gettext("There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), payload); break; } case "connection": { title = gettext("Error connecting to printer"); - text = gettext("There was an error while trying to connect to your printer. Error: %(error)s", payload); + text = _.sprintf(gettext("There was an error while trying to connect to your printer. Error: %(error)s"), payload); break; } case "start_print": { title = gettext("Error starting a print"); - text = gettext("There was an error while trying to start a print job. Error: %(error)s", payload); + text = _.sprintf(gettext("There was an error while trying to start a print job. Error: %(error)s"), payload); break; } case "autodetect_port": @@ -265,7 +265,7 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) { } default: { title = gettext("Unknown error"); - text = gettext("There was an unknown error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s", payload); + text = _.sprintf(gettext("There was an unknown error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), payload); break; } }