diff --git a/src/Ui/UiWebsocket.py b/src/Ui/UiWebsocket.py index e0dbf7df..98d72ed0 100644 --- a/src/Ui/UiWebsocket.py +++ b/src/Ui/UiWebsocket.py @@ -1,7 +1,6 @@ import json import time import sys -import hashlib import os import shutil import re @@ -18,6 +17,7 @@ from Translate import translate as _ from util import helper from Content.ContentManager import VerifyError, SignError + @PluginManager.acceptPlugins class UiWebsocket(object): @@ -97,8 +97,8 @@ class UiWebsocket(object): if ("0.0.0.0" == bind_ip or "*" == bind_ip) and (not whitelist): self.site.notifications.append([ "error", - _(u"You are not going to set up a public gateway. However, your Web UI is
" + \ - "open to the whole Internet.
" + \ + _(u"You are not going to set up a public gateway. However, your Web UI is
" + + "open to the whole Internet.
" + "Please check your configuration.") ]) @@ -436,7 +436,7 @@ class UiWebsocket(object): self.site.saveSettings() self.site.announce() - if not inner_path in self.site.content_manager.contents: + if inner_path not in self.site.content_manager.contents: return self.response(to, {"error": "File %s not found" % inner_path}) event_name = "publish %s %s" % (self.site.address, inner_path) @@ -941,10 +941,9 @@ class UiWebsocket(object): import Translate for translate in Translate.translates: translate.setLanguage(value) - self.cmd("notification", ["done", - _["You have successfully changed the web interface's language!"] + "
" + - _["Due to the browser's caching, the full transformation could take some minute."] - , 10000]) + message = _["You have successfully changed the web interface's language!"] + "
" + message += _["Due to the browser's caching, the full transformation could take some minute."] + self.cmd("notification", ["done", message, 10000]) config.language = value self.response(to, "ok")