Fix typos
This commit is contained in:
parent
0bbf19aab9
commit
6f76383c56
56 changed files with 131 additions and 131 deletions
|
@ -80,7 +80,7 @@ class LocalAnnouncer(BroadcastServer.BroadcastServer):
|
|||
back = []
|
||||
sites = list(self.server.sites.values())
|
||||
|
||||
# Split adresses to group of 100 to avoid UDP size limit
|
||||
# Split addresses to group of 100 to avoid UDP size limit
|
||||
site_groups = [sites[i:i + 100] for i in range(0, len(sites), 100)]
|
||||
for site_group in site_groups:
|
||||
res = {}
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestAnnounceShare:
|
|||
tracker_storage.onTrackerFound("zero://%s:15441" % file_server.ip)
|
||||
assert peer.request("getTrackers")["trackers"] == []
|
||||
|
||||
# It needs to have at least one successfull announce to be shared to other peers
|
||||
# It needs to have at least one successful announce to be shared to other peers
|
||||
tracker_storage.onTrackerSuccess("zero://%s:15441" % file_server.ip, 1.0)
|
||||
assert peer.request("getTrackers")["trackers"] == ["zero://%s:15441" % file_server.ip]
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ class TestBigfile:
|
|||
|
||||
site.storage.delete(inner_path)
|
||||
|
||||
# Writing to end shold not take much longer, than writing to start
|
||||
# Writing to end should not take much longer, than writing to start
|
||||
assert time_write_end <= max(0.1, time_write_start * 1.1)
|
||||
|
||||
def testRangedFileRequest(self, file_server, site, site_temp):
|
||||
|
|
|
@ -202,9 +202,9 @@ class UiWebsocketPlugin(object):
|
|||
class SiteStoragePlugin(object):
|
||||
def updateDbFile(self, inner_path, file=None, cur=None):
|
||||
if file is not False: # File deletion always allowed
|
||||
# Find for bitcoin addresses in file path
|
||||
# Find bitcoin addresses in file path
|
||||
matches = re.findall("/(1[A-Za-z0-9]{26,35})/", inner_path)
|
||||
# Check if any of the adresses are in the mute list
|
||||
# Check if any of the addresses are in the mute list
|
||||
for auth_address in matches:
|
||||
if filter_storage.isMuted(auth_address):
|
||||
self.log.debug("Mute match: %s, ignoring %s" % (auth_address, inner_path))
|
||||
|
|
|
@ -144,7 +144,7 @@ class ContentFilterStorage(object):
|
|||
|
||||
return details
|
||||
|
||||
# Search and remove or readd files of an user
|
||||
# Search and remove or re-add files of a user
|
||||
def changeDbs(self, auth_address, action):
|
||||
self.log.debug("Mute action %s on user %s" % (action, auth_address))
|
||||
res = list(self.site_manager.list().values())[0].content_manager.contents.db.execute(
|
||||
|
|
|
@ -27,7 +27,7 @@ class TestCrypt:
|
|||
pub = ui_websocket.testAction("UserPublickey", 0)
|
||||
assert len(pub) == 44 # Compressed, b64 encoded publickey
|
||||
|
||||
# Different pubkey for specificed index
|
||||
# Different pubkey for specified index
|
||||
assert ui_websocket.testAction("UserPublickey", 1) != ui_websocket.testAction("UserPublickey", 0)
|
||||
|
||||
# Same publickey for same index
|
||||
|
|
|
@ -7,7 +7,7 @@ from Plugin import PluginManager
|
|||
from Config import config
|
||||
from Debug import Debug
|
||||
|
||||
# Keep archive open for faster reponse times for large sites
|
||||
# Keep archive open for faster response times for large sites
|
||||
archive_cache = {}
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ class UiRequestPlugin(object):
|
|||
if not os.path.isfile(archive_path):
|
||||
# Wait until file downloads
|
||||
result = site.needFile(archive_inner_path, priority=10)
|
||||
# Send virutal file path download finished event to remove loading screen
|
||||
# Send virtual file path download finished event to remove loading screen
|
||||
site.updateWebsocket(file_done=archive_inner_path)
|
||||
if not result:
|
||||
return self.error404(archive_inner_path)
|
||||
|
|
|
@ -81,7 +81,7 @@ class UiWebsocketPlugin(object):
|
|||
if not isinstance(row["date_added"], (int, float, complex)):
|
||||
self.log.debug("Invalid date_added from site %s: %r" % (address, row["date_added"]))
|
||||
continue
|
||||
if row["date_added"] > 1000000000000: # Formatted as millseconds
|
||||
if row["date_added"] > 1000000000000: # Formatted as milliseconds
|
||||
row["date_added"] = row["date_added"] / 1000
|
||||
if "date_added" not in row or row["date_added"] > time.time() + 120:
|
||||
self.log.debug("Newsfeed item from the future from from site %s" % address)
|
||||
|
|
|
@ -266,7 +266,7 @@ class ContentDbPlugin(object):
|
|||
self.log.debug("%s/%s peer number for %s site updated in %.3fs" % (num_updated, num_file, num_site, time.time() - s))
|
||||
|
||||
def queryDeletableFiles(self):
|
||||
# First return the files with atleast 10 seeder and not accessed in last week
|
||||
# First return the files with at least 10 seeders and not accessed in last week
|
||||
query = """
|
||||
SELECT * FROM file_optional
|
||||
WHERE peer > 10 AND %s
|
||||
|
@ -285,7 +285,7 @@ class ContentDbPlugin(object):
|
|||
|
||||
self.log.debug("queryDeletableFiles returning less-seeded files")
|
||||
|
||||
# Then return files less seeder but still not accessed in last week
|
||||
# Then return files with less seeders but still not accessed in last week
|
||||
query = """
|
||||
SELECT * FROM file_optional
|
||||
WHERE peer <= 10 AND %s
|
||||
|
@ -302,7 +302,7 @@ class ContentDbPlugin(object):
|
|||
break
|
||||
limit_start += 50
|
||||
|
||||
self.log.debug("queryDeletableFiles returning everyting")
|
||||
self.log.debug("queryDeletableFiles returning everything")
|
||||
|
||||
# At the end return all files
|
||||
query = """
|
||||
|
|
|
@ -398,7 +398,7 @@ class UiRequestPlugin(object):
|
|||
for part in self.renderMemory():
|
||||
yield part
|
||||
|
||||
gc.collect() # Implicit grabage collection
|
||||
gc.collect() # Implicit garbage collection
|
||||
yield "Done in %.1f" % (time.time() - s)
|
||||
|
||||
@helper.encodeResponse
|
||||
|
@ -437,7 +437,7 @@ class UiRequestPlugin(object):
|
|||
yield "- %s: %s<br>" % (attr, html.escape(str(getattr(obj, attr))))
|
||||
yield "<br>"
|
||||
|
||||
gc.collect() # Implicit grabage collection
|
||||
gc.collect() # Implicit garbage collection
|
||||
|
||||
@helper.encodeResponse
|
||||
def actionListobj(self):
|
||||
|
@ -505,7 +505,7 @@ class UiRequestPlugin(object):
|
|||
for obj, stat in sorted(list(ref_count.items()), key=lambda x: x[1][0], reverse=True)[0:30]: # Sorted by count
|
||||
yield " - %.1fkb = %s x %s<br>" % (stat[1], stat[0], html.escape(str(obj)))
|
||||
|
||||
gc.collect() # Implicit grabage collection
|
||||
gc.collect() # Implicit garbage collection
|
||||
|
||||
@helper.encodeResponse
|
||||
def actionGcCollect(self):
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"Use Tor bridges": "Tor bridge-ek használata",
|
||||
"Use obfuscated bridge relays to avoid network level Tor block (even slower)": "Tor elrejtő bridge-ek használata a hálózat szintű Tor tiltás megkerüléséhez (még lassabb)",
|
||||
|
||||
"Discover new peers using these adresses": "Új kapcsolat felfedezése ezen címek használatával",
|
||||
"Discover new peers using these addresses": "Új kapcsolat felfedezése ezen címek használatával",
|
||||
|
||||
"Trackers files": "Tracker file-ok",
|
||||
"Load additional list of torrent trackers dynamically, from a file": "További trackerek felfedezése dinamikusan, ezen file használatával",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"Use Tor bridges": "Użyj Tor bridges",
|
||||
"Use obfuscated bridge relays to avoid network level Tor block (even slower)": "Użyj obfuskacji, aby uniknąć blokowania Tor na poziomie sieci (jeszcze wolniejsze działanie)",
|
||||
"Trackers": "Trackery",
|
||||
"Discover new peers using these adresses": "Wykryj użytkowników korzystając z tych adresów trackerów",
|
||||
"Discover new peers using these addresses": "Wykryj użytkowników korzystając z tych adresów trackerów",
|
||||
|
||||
"Trackers files": "Pliki trackerów",
|
||||
"Load additional list of torrent trackers dynamically, from a file": "Dynamicznie wczytaj dodatkową listę trackerów z pliku .json",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"Use Tor bridges": "Usar pontes do Tor",
|
||||
"Use obfuscated bridge relays to avoid network level Tor block (even slower)": "Usar relays de ponte ofuscados para evitar o bloqueio de Tor de nível de rede (ainda mais lento)",
|
||||
|
||||
"Discover new peers using these adresses": "Descobrir novos peers usando estes endereços",
|
||||
"Discover new peers using these addresses": "Descobrir novos peers usando estes endereços",
|
||||
|
||||
"Trackers files": "Arquivos de trackers",
|
||||
"Load additional list of torrent trackers dynamically, from a file": "Carregar lista adicional de trackers de torrent dinamicamente, à partir de um arquivo",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"Use Tor bridges": "使用Tor网桥",
|
||||
"Use obfuscated bridge relays to avoid network level Tor block (even slower)": "使用混淆网桥中继,从而避免网络层Tor阻碍 (超级慢)",
|
||||
|
||||
"Discover new peers using these adresses": "使用这些地址发现新节点",
|
||||
"Discover new peers using these addresses": "使用这些地址发现新节点",
|
||||
|
||||
"Trackers files": "Trackers文件",
|
||||
"Load additional list of torrent trackers dynamically, from a file": "从一个文件中,动态加载额外的种子Trackers列表",
|
||||
|
|
|
@ -111,7 +111,7 @@ class ConfigStorage extends Class
|
|||
title: "Trackers"
|
||||
key: "trackers"
|
||||
type: "textarea"
|
||||
description: "Discover new peers using these adresses"
|
||||
description: "Discover new peers using these addresses"
|
||||
|
||||
section.items.push
|
||||
title: "Trackers files"
|
||||
|
|
|
@ -1427,7 +1427,7 @@
|
|||
title: "Trackers",
|
||||
key: "trackers",
|
||||
type: "textarea",
|
||||
description: "Discover new peers using these adresses"
|
||||
description: "Discover new peers using these addresses"
|
||||
});
|
||||
section.items.push({
|
||||
title: "Trackers files",
|
||||
|
|
|
@ -5299,7 +5299,7 @@
|
|||
var hist = doc.history, event, selAfter = doc.sel;
|
||||
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
|
||||
|
||||
// Verify that there is a useable event (so that ctrl-z won't
|
||||
// Verify that there is a usable event (so that ctrl-z won't
|
||||
// needlessly clear selection events)
|
||||
var i = 0;
|
||||
for (; i < source.length; i++) {
|
||||
|
@ -11370,7 +11370,7 @@
|
|||
});
|
||||
} else {
|
||||
if (startIndent.length > nextIndent.length) return;
|
||||
// This doesn't run if the next line immediatley indents, as it is
|
||||
// This doesn't run if the next line immediately indents, as it is
|
||||
// not clear of the users intention (new indented item or same level)
|
||||
if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;
|
||||
skipCount += 1;
|
||||
|
@ -14492,7 +14492,7 @@ var jsonlint=function(){var a=!0,b=!1,c={},d=function(){var a={trace:function(){
|
|||
// highlighted only if the selected text is a word. showToken, when enabled,
|
||||
// will cause the current token to be highlighted when nothing is selected.
|
||||
// delay is used to specify how much time to wait, in milliseconds, before
|
||||
// highlighting the matches. If annotateScrollbar is enabled, the occurences
|
||||
// highlighting the matches. If annotateScrollbar is enabled, the occurrences
|
||||
// will be highlighted on the scrollbar via the matchesonscrollbar addon.
|
||||
|
||||
(function(mod) {
|
||||
|
|
|
@ -5295,7 +5295,7 @@
|
|||
var hist = doc.history, event, selAfter = doc.sel;
|
||||
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
|
||||
|
||||
// Verify that there is a useable event (so that ctrl-z won't
|
||||
// Verify that there is a usable event (so that ctrl-z won't
|
||||
// needlessly clear selection events)
|
||||
var i = 0;
|
||||
for (; i < source.length; i++) {
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
});
|
||||
} else {
|
||||
if (startIndent.length > nextIndent.length) return;
|
||||
// This doesn't run if the next line immediatley indents, as it is
|
||||
// This doesn't run if the next line immediately indents, as it is
|
||||
// not clear of the users intention (new indented item or same level)
|
||||
if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;
|
||||
skipCount += 1;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// highlighted only if the selected text is a word. showToken, when enabled,
|
||||
// will cause the current token to be highlighted when nothing is selected.
|
||||
// delay is used to specify how much time to wait, in milliseconds, before
|
||||
// highlighting the matches. If annotateScrollbar is enabled, the occurences
|
||||
// highlighting the matches. If annotateScrollbar is enabled, the occurrences
|
||||
// will be highlighted on the scrollbar via the matchesonscrollbar addon.
|
||||
|
||||
(function(mod) {
|
||||
|
|
|
@ -90,7 +90,7 @@ class Text
|
|||
next_find = s2[next_find_i]
|
||||
|
||||
if extra_parts[next_find_i]
|
||||
extra_parts[next_find_i] = "" # Extra chars on the end doesnt matter
|
||||
extra_parts[next_find_i] = "" # Extra chars at the end don't matter
|
||||
extra_parts = (val for key, val of extra_parts)
|
||||
if next_find_i >= s2.length
|
||||
return extra_parts.length + extra_parts.join("").length
|
||||
|
|
|
@ -86,7 +86,7 @@ class PluginList extends Class
|
|||
)
|
||||
|
||||
else
|
||||
tag_update = h("span.version-missing", "(unable to get latest vesion: update site missing)")
|
||||
tag_update = h("span.version-missing", "(unable to get latest version: update site missing)")
|
||||
|
||||
tag_version = h("span.version",[
|
||||
"rev#{plugin.info.rev} ",
|
||||
|
|
|
@ -1400,7 +1400,7 @@
|
|||
}, "Update to rev" + plugin.site_info.rev);
|
||||
}
|
||||
} else {
|
||||
tag_update = h("span.version-missing", "(unable to get latest vesion: update site missing)");
|
||||
tag_update = h("span.version-missing", "(unable to get latest version: update site missing)");
|
||||
}
|
||||
tag_version = h("span.version", ["rev" + plugin.info.rev + " ", tag_update]);
|
||||
tag_source = h("div.source", [
|
||||
|
|
|
@ -14,7 +14,7 @@ class SiteManagerPlugin(object):
|
|||
dns_cache_path = "%s/dns_cache.json" % config.data_dir
|
||||
dns_cache = None
|
||||
|
||||
# Checks if its a valid address
|
||||
# Checks if it's a valid address
|
||||
def isAddress(self, address):
|
||||
if self.isDomain(address):
|
||||
return True
|
||||
|
@ -92,27 +92,27 @@ class SiteManagerPlugin(object):
|
|||
domain = domain.lower()
|
||||
if self.dns_cache == None:
|
||||
self.loadDnsCache()
|
||||
if domain.count(".") < 2: # Its a topleved request, prepend @. to it
|
||||
if domain.count(".") < 2: # It's a top-level request, prepend @. to it
|
||||
domain = "@."+domain
|
||||
|
||||
domain_details = self.dns_cache.get(domain)
|
||||
if domain_details and time.time() < domain_details[1]: # Found in cache and its not expired
|
||||
if domain_details and time.time() < domain_details[1]: # Found in cache and it's not expired
|
||||
return domain_details[0]
|
||||
else:
|
||||
# Resovle dns using dnschain
|
||||
# Resolve dns using dnschain
|
||||
thread_dnschain_info = gevent.spawn(self.resolveDomainDnschainInfo, domain)
|
||||
thread_dnschain_net = gevent.spawn(self.resolveDomainDnschainNet, domain)
|
||||
gevent.joinall([thread_dnschain_net, thread_dnschain_info]) # Wait for finish
|
||||
|
||||
if thread_dnschain_info.value and thread_dnschain_net.value: # Booth successfull
|
||||
if thread_dnschain_info.value and thread_dnschain_net.value: # Booth successful
|
||||
if thread_dnschain_info.value == thread_dnschain_net.value: # Same returned value
|
||||
return thread_dnschain_info.value
|
||||
else:
|
||||
log.error("Dns %s missmatch: %s != %s" % (domain, thread_dnschain_info.value, thread_dnschain_net.value))
|
||||
log.error("Dns %s mismatch: %s != %s" % (domain, thread_dnschain_info.value, thread_dnschain_net.value))
|
||||
|
||||
# Problem during resolve
|
||||
if domain_details: # Resolve failed, but we have it in the cache
|
||||
domain_details[1] = time.time()+60*60 # Dont try again for 1 hour
|
||||
domain_details[1] = time.time()+60*60 # Don't try again for 1 hour
|
||||
return domain_details[0]
|
||||
else: # Not found in cache
|
||||
self.dns_cache[domain] = [None, time.time()+60] # Don't check again for 1 min
|
||||
|
@ -136,7 +136,7 @@ class SiteManagerPlugin(object):
|
|||
def get(self, address):
|
||||
if self.sites == None: # Not loaded yet
|
||||
self.load()
|
||||
if self.isDomain(address): # Its looks like a domain
|
||||
if self.isDomain(address): # It looks like a domain
|
||||
address_resolved = self.resolveDomain(address)
|
||||
if address_resolved: # Domain found
|
||||
site = self.sites.get(address_resolved)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "UiPassword",
|
||||
"description": "Password based autentication on the web interface.",
|
||||
"description": "Password based authentication on the web interface.",
|
||||
"default": "disabled"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue