- """)
+ """))
def actionSidebarGetHtmlTag(self, to):
site = self.site
@@ -456,7 +469,7 @@ class UiWebsocketPlugin(object):
from util import helper
self.log.info("Downloading GeoLite2 City database...")
- self.cmd("notification", ["geolite-info", "Downloading GeoLite2 City database (one time only, ~20MB)...", 0])
+ self.cmd("notification", ["geolite-info", _["Downloading GeoLite2 City database (one time only, ~20MB)..."], 0])
db_urls = [
"https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz",
"https://raw.githubusercontent.com/texnikru/GeoLite2-Database/master/GeoLite2-City.mmdb.gz"
@@ -479,7 +492,7 @@ class UiWebsocketPlugin(object):
with gzip.GzipFile(fileobj=data) as gzip_file:
shutil.copyfileobj(gzip_file, open(db_path, "wb"))
- self.cmd("notification", ["geolite-done", "GeoLite2 City database downloaded!", 5000])
+ self.cmd("notification", ["geolite-done", _["GeoLite2 City database downloaded!"], 5000])
time.sleep(2) # Wait for notify animation
return True
except Exception, err:
@@ -487,7 +500,7 @@ class UiWebsocketPlugin(object):
pass
self.cmd("notification", [
"geolite-error",
- "GeoLite2 City database download error: %s! Please download and unpack to data dir: %s" % (err, db_urls[0]),
+ _["GeoLite2 City database download error: {}! Please download manually and unpack to data dir: {}"].format(err, db_urls[0]),
0
])
@@ -572,7 +585,7 @@ class UiWebsocketPlugin(object):
permissions = self.getPermissions(to)
if "Multiuser" in PluginManager.plugin_manager.plugin_names:
- self.cmd("notification", ["info", "This function is disabled on this proxy"])
+ self.cmd("notification", ["info", _["This function is disabled on this proxy"]])
return False
if "ADMIN" not in permissions: