From 718b4b35d1fda948209926cbc5a0b1b8fe654226 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 6 Aug 2017 13:10:51 +1000 Subject: [PATCH] don't translate js console msgs --- aqt/webview.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aqt/webview.py b/aqt/webview.py index d16b307e7..31022ff96 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -50,9 +50,10 @@ class AnkiWebPage(QWebEnginePage): self.profile().scripts().insert(script) def javaScriptConsoleMessage(self, lvl, msg, line, srcID): - sys.stdout.write( - (_("JS error on line %(a)d: %(b)s") % - dict(a=line, b=msg+"\n"))) + # not translated because console usually not visible, + # and may only accept ascii text + sys.stdout.write("JS error on line %(a)d: %(b)s" % + dict(a=line, b=msg+"\n")) def acceptNavigationRequest(self, url, navType, isMainFrame): if not isMainFrame: