--- /dev/null
+extract:
+ pybabel --verbose extract --sort-by-file --project=FBA --version=0.1.0 --mapping-file=babel.cfg --output-file=./i18n/messages.pot .
--- /dev/null
+[jinja2: **/templates/**.html]
+encoding = utf-8
from pathlib import Path
import fastapi
+
from fastapi import Request, HTTPException, Query
from fastapi.responses import JSONResponse
from fastapi.responses import PlainTextResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
+from babel.support import Translations
+from jinja2 import Environment
+
import requests
import uvicorn
name="static",
)
+translations = Translations.load("i18n", ["de", "en"])
+env = Environment(extensions=["jinja2.ext.i18n"])
+env.install_gettext_translations(translations)
+
templates = Jinja2Templates(directory="templates")
@router.get(config.get("base_url") + "/api/info.json", response_class=JSONResponse)
--- /dev/null
+# Translations template for FBA.
+# Copyright (C) 2023 Free Software Foundation
+# This file is distributed under the same license as the FBA project.
+# Roland Häder <roland@mxchange.org>, 2023.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FBA 0.1.0\n"
+"Report-Msgid-Bugs-To: roland@mxchange.org\n"
+"POT-Creation-Date: 2023-08-08 14:00+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Roland Häder <roland@mxchange.org>\n"
+"Language-Team: English/German <roland@mxchange.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.12.1\n"
+
+#: templates/base.html:9
+msgid "RSS Feed for latest blocked instances"
+msgstr ""
+
+#: templates/base.html:17
+msgid "Page has no header"
+msgstr ""
+
+#: templates/base.html:21
+msgid "Page has no content!"
+msgstr ""
+
+#: templates/base.html:26
+msgid "Source code"
+msgstr ""
+
+#: templates/base.html:31
+msgid "No slogan was found!"
+msgstr ""
+
+#: templates/views/index.html:4 templates/views/infos.html:114
+#: templates/views/list.html:79 templates/views/scoreboard.html:130
+msgid "Index"
+msgstr ""
+
+#: templates/views/index.html:7
+msgid "Welcome to FBA"
+msgstr ""
+
+#: templates/views/index.html:14
+msgid "Choose an option"
+msgstr ""
+
+#: templates/views/index.html:22
+msgid "Enter a domain:"
+msgstr ""
+
+#: templates/views/index.html:26 templates/views/index.html:34
+#: templates/views/index.html:44 templates/views/index.html:51
+msgid "Submit"
+msgstr ""
+
+#: templates/views/index.html:30
+msgid "Enter a reason:"
+msgstr ""
+
+#: templates/views/index.html:40
+msgid "Reverse search:"
+msgstr ""
+
+#: templates/views/index.html:48
+msgid "Info of a domain:"
+msgstr ""
+
+#: templates/views/index.html:58
+msgid "Scoreboards:"
+msgstr ""
+
+#: templates/views/index.html:60
+msgid "Defederating instances"
+msgstr ""
+
+#: templates/views/index.html:61
+msgid "Defederated instances"
+msgstr ""
+
+#: templates/views/index.html:62
+msgid "Referencing instances"
+msgstr ""
+
+#: templates/views/index.html:63
+msgid "Used software"
+msgstr ""
+
+#: templates/views/index.html:64
+msgid "Commands"
+msgstr ""
+
+#: templates/views/index.html:65
+msgid "Error codes"
+msgstr ""
+
+#: templates/views/index.html:66
+msgid "Detection modes"
+msgstr ""
+
+#: templates/views/index.html:67
+msgid "Average peers"
+msgstr ""
+
+#: templates/views/index.html:68
+msgid "Obfuscating software"
+msgstr ""
+
+#: templates/views/index.html:69 templates/views/scoreboard.html:8
+#: templates/views/scoreboard.html:39
+msgid "Obfuscation statistics"
+msgstr ""
+
+#: templates/views/index.html:70
+msgid "Block level statistics"
+msgstr ""
+
+#: templates/views/index.html:76
+msgid "Infos:"
+msgstr ""
+
+#: templates/views/index.html:80
+msgid "Known instances:"
+msgstr ""
+
+#: templates/views/index.html:81
+msgid "Supported instances:"
+msgstr ""
+
+#: templates/views/index.html:82
+msgid "Blocks recorded:"
+msgstr ""
+
+#: templates/views/index.html:83
+msgid "Erroneous instances:"
+msgstr ""
+
+#: templates/views/infos.html:4
+#, python-format
+msgid "Infos on domain %(domain)s"
+msgstr ""
+
+#: templates/views/infos.html:7
+#, python-format
+msgid "Infos on %(domain)s"
+msgstr ""
+
+#: templates/views/infos.html:14
+msgid "Instance information"
+msgstr ""
+
+#: templates/views/infos.html:20
+msgid "Domain name:"
+msgstr ""
+
+#: templates/views/infos.html:25
+msgid "Domain hash:"
+msgstr ""
+
+#: templates/views/infos.html:30
+msgid "Software:"
+msgstr ""
+
+#: templates/views/infos.html:35
+msgid "Originating instance:"
+msgstr ""
+
+#: templates/views/infos.html:40
+msgid "Command:"
+msgstr ""
+
+#: templates/views/infos.html:45
+msgid "Detection mode:"
+msgstr ""
+
+#: templates/views/infos.html:50
+msgid "NodeInfo URL:"
+msgstr ""
+
+#: templates/views/infos.html:55
+msgid "Total peers:"
+msgstr ""
+
+#: templates/views/infos.html:60
+msgid "Total blocks:"
+msgstr ""
+
+#: templates/views/infos.html:65
+msgid "Obfuscated blocks:"
+msgstr ""
+
+#: templates/views/infos.html:70
+msgid "Has obfuscated block list:"
+msgstr ""
+
+#: templates/views/infos.html:71
+msgid "Yes"
+msgstr ""
+
+#: templates/views/infos.html:71
+msgid "No"
+msgstr ""
+
+#: templates/views/infos.html:75
+msgid "First seen:"
+msgstr ""
+
+#: templates/views/infos.html:80
+msgid "Last updated:"
+msgstr ""
+
+#: templates/views/infos.html:85
+msgid "Last nodeinfo fetched:"
+msgstr ""
+
+#: templates/views/infos.html:90
+msgid "Last blocks fetched:"
+msgstr ""
+
+#: templates/views/infos.html:95
+msgid "Last instances fetched:"
+msgstr ""
+
+#: templates/views/infos.html:100
+msgid "Last status code:"
+msgstr ""
+
+#: templates/views/infos.html:105
+msgid "Last error details:"
+msgstr ""
+
+#: templates/views/list.html:4
+#, python-format
+msgid " - Detection mode %(value)s"
+msgstr ""
+
+#: templates/views/list.html:5
+#, python-format
+msgid " - Used software %(value)s"
+msgstr ""
+
+#: templates/views/list.html:6
+#, python-format
+msgid " - Command %(value)s"
+msgstr ""
+
+#: templates/views/list.html:12
+#, python-format
+msgid "Instances detected by method %(value)s"
+msgstr ""
+
+#: templates/views/list.html:14
+#, python-format
+msgid "Instances using software %(value)s"
+msgstr ""
+
+#: templates/views/list.html:16
+#, python-format
+msgid "Instances found by command %(value)s"
+msgstr ""
+
+#: templates/views/list.html:18
+#, python-format
+msgid "Instances originated from %(value)s"
+msgstr ""
+
+#: templates/views/list.html:20 templates/views/scoreboard.html:43
+#, python-format
+msgid "mode=%(mode)s not supported"
+msgstr ""
+
+#: templates/views/list.html:27
+msgid "Maximum amount reached!"
+msgstr ""
+
+#: templates/views/list.html:29
+msgid ""
+"Please note that the maximum allowed amount is only returned, the "
+"blocker/blocked/reason might be more.\n"
+" Paging support is not finished yet."
+msgstr ""
+
+#: templates/views/list.html:37
+msgid "Domain"
+msgstr ""
+
+#: templates/views/list.html:38
+msgid "Origin"
+msgstr ""
+
+#: templates/views/list.html:39 templates/views/scoreboard.html:53
+msgid "Software"
+msgstr ""
+
+#: templates/views/list.html:40 templates/views/scoreboard.html:55
+msgid "Detection mode"
+msgstr ""
+
+#: templates/views/list.html:41
+msgid "Command"
+msgstr ""
+
+#: templates/views/list.html:42
+msgid "First added"
+msgstr ""
+
+#: templates/views/list.html:43
+msgid "Last updated"
+msgstr ""
+
+#: templates/views/scoreboard.html:5
+#, python-format
+msgid "TOP %(amount)s used software"
+msgstr ""
+
+#: templates/views/scoreboard.html:6 templates/views/scoreboard.html:33
+msgid "Detection mode statistics"
+msgstr ""
+
+#: templates/views/scoreboard.html:7
+#, python-format
+msgid "TOP %(amount)s block level statistics"
+msgstr ""
+
+#: templates/views/scoreboard.html:9 templates/views/scoreboard.html:37
+#, python-format
+msgid "TOP %(amount)s obfuscating software"
+msgstr ""
+
+#: templates/views/scoreboard.html:10 templates/views/scoreboard.html:35
+#, python-format
+msgid "TOP %(amount)s average peer count"
+msgstr ""
+
+#: templates/views/scoreboard.html:11
+msgid "t}} commands"
+msgstr ""
+
+#: templates/views/scoreboard.html:12
+msgid "t}} error codes"
+msgstr ""
+
+#: templates/views/scoreboard.html:13
+msgid "t}} referencing instances"
+msgstr ""
+
+#: templates/views/scoreboard.html:14
+msgid "t}} deferated instances"
+msgstr ""
+
+#: templates/views/scoreboard.html:15
+msgid "t}} deferating instances"
+msgstr ""
+
+#: templates/views/scoreboard.html:21
+#, python-format
+msgid "Top %(amount)s defederating instances"
+msgstr ""
+
+#: templates/views/scoreboard.html:23
+#, python-format
+msgid "Top %(amount)s defederated instances"
+msgstr ""
+
+#: templates/views/scoreboard.html:25
+#, python-format
+msgid "Top %(amount)s referencing instances"
+msgstr ""
+
+#: templates/views/scoreboard.html:27
+#, python-format
+msgid "Top %(amount)s used software"
+msgstr ""
+
+#: templates/views/scoreboard.html:29
+#, python-format
+msgid "TOP %(amount)s commands"
+msgstr ""
+
+#: templates/views/scoreboard.html:31
+#, python-format
+msgid "TOP %(amount)s error codes"
+msgstr ""
+
+#: templates/views/scoreboard.html:41
+#, python-format
+msgid "TOP %(amount)s block levels"
+msgstr ""
+
+#: templates/views/scoreboard.html:54
+msgid "Obfuscation status"
+msgstr ""
+
+#: templates/views/scoreboard.html:56
+msgid "Error code"
+msgstr ""
+
+#: templates/views/scoreboard.html:57
+msgid "Instance"
+msgstr ""
+
+#: templates/views/scoreboard.html:61
+msgid "References"
+msgstr ""
+
+#: templates/views/scoreboard.html:62
+msgid "Average"
+msgstr ""
+
+#: templates/views/scoreboard.html:63
+msgid "Total"
+msgstr ""
+
+#: templates/views/scoreboard.html:64
+msgid "Blocks"
+msgstr ""
+
+#: templates/views/scoreboard.html:101
+msgid "Error codes:"
+msgstr ""
+
+#: templates/views/scoreboard.html:103
+msgid ""
+"Error code 999 is fake and covers a lot of reasons why the "
+"domain/instance is not reachable. Mostly that the domain is not "
+"resolvable or the server refused connection."
+msgstr ""
+
+#: templates/views/scoreboard.html:108
+msgid "Detection modes:"
+msgstr ""
+
+#: templates/views/scoreboard.html:110
+msgid "Detection is done in following order:"
+msgstr ""
+
+#: templates/views/scoreboard.html:113
+msgid ""
+"<code>/.well-known/nodeinfo</code> was reachable and software type was "
+"found in nodeinfo response"
+msgstr ""
+
+#: templates/views/scoreboard.html:114
+msgid "Node information was found by probing for well-known URLs"
+msgstr ""
+
+#: templates/views/scoreboard.html:115
+msgid "Meta data <code>generator</code> was found in HTML code"
+msgstr ""
+
+#: templates/views/scoreboard.html:116
+msgid "Meta data <code>og:platform</code> was found in HTML code"
+msgstr ""
+
+#: templates/views/scoreboard.html:117
+msgid "Meta data <code>og:site_name</code> was found in HTML code"
+msgstr ""
+
+#: templates/views/scoreboard.html:118
+msgid "the instance was not reachable or the used software was not stated"
+msgstr ""
+
+#: templates/views/scoreboard.html:118 templates/widgets/list_links.html:4
+msgid "None"
+msgstr ""
+
+#: templates/views/scoreboard.html:123
+msgid "Obfuscation status:"
+msgstr ""
+
+#: templates/views/scoreboard.html:125
+msgid "Only supported networks are counted here."
+msgstr ""
+
+#: templates/views/scoreboard.html:126
+msgid "<b>None</b> means not determined yet or erroneous."
+msgstr ""
+
+#: templates/widgets/links.html:2
+#, python-format
+msgid "Search %(domain)s"
+msgstr ""
+
+#: templates/widgets/links.html:3
+#, python-format
+msgid "Reverse search %(domain)s"
+msgstr ""
+
+#: templates/widgets/links.html:4 templates/widgets/list_links.html:2
+#, python-format
+msgid "Information on domain %(domain)s"
+msgstr ""
+
+#: templates/widgets/links.html:5
+#, python-format
+msgid "Instances from origin %(domain)s"
+msgstr ""
+
+#: templates/widgets/links.html:6
+#, python-format
+msgid "Visit website at %(domain)s"
+msgstr ""
+
argparse
atoma
+babel
beautifulsoup4
markdown
reqto
<base href="{{base_url}}" />
- <link rel="alternate" type="application/rss+xml" title="RSS Feed for latest blocked instances" href="rss" />
+ <link rel="alternate" type="application/rss+xml" title="{% trans %}RSS Feed for latest blocked instances{% endtrans %}" href="rss" />
{% block rss %}{% endblock %}
<link rel="stylesheet" type="text/css" href="static/css/{{theme}}.css?v=0.0.2" media="all" />
<body>
<div id="header">
- {% block header %}<h1>Page has no header</h1>{% endblock %}
+ {% block header %}<h1>{% trans %}Page has no header{% endtrans %}</h1>{% endblock %}
</div>
<div id="content">
- {% block content %}Page has no content!{% endblock %}
+ {% block content %}{% trans %}Page has no content!{% endtrans %}{% endblock %}
</div>
<div id="footer">
{% block footer %}
- Source code:
+ {% trans %}Source code{% endtrans %}:
<a href="https://git.mxchange.org/?p=fba.git;a=summary" rel="source" target="_blank">git.mxchange.org</a><br /><br />
{% if slogan %}
{{slogan}}
{% else %}
- <b>No slogan was found!</b>
+ <b>{% trans %}No slogan was found!{% endtrans %}</b>
{% endif %}
{% endblock %}
</div>
{% extends "base.html" %}
-{% block title %}Index{% endblock %}
+{% block title %}
+ {% trans %}Index{% endtrans %}
+{% endblock %}
-{% block header %}<h1>Welcome to FBA</h1>{% endblock %}
+{% block header %}<h1>{% trans %}Welcome to FBA{% endtrans %}</h1>{% endblock %}
{% block content %}
<table class="index-table">
<thead>
<tr>
<th colspan="2">
- <h3>Choose an option</h3>
+ <h3>{% trans %}Choose an option{% endtrans %}</h3>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
- <h3>Enter a domain:</h3>
+ <h3>{% trans %}Enter a domain:{% endtrans %}</h3>
<form action="top">
<input type="hidden" name="mode" value="domain" />
<input type="text" name="value" placeholder="example.com" required="required" />
- <input type="submit" value="Submit" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" />
</form>
</td>
<td>
- <h3>Enter a reason:</h3>
+ <h3>{% trans %}Enter a reason:{% endtrans %}</h3>
<form action="top">
<input type="hidden" name="mode" value="reason" />
<input type="text" name="value" placeholder="free speech" required="required" />
- <input type="submit" value="Submit" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" />
</form>
</td>
</tr>
<tr>
<td>
- <h3>Reverse search:</h3>
+ <h3>{% trans %}Reverse search:{% endtrans %}</h3>
<form action="top">
<input type="hidden" name="mode" value="reverse" />
<input type="text" name="value" placeholder="example.com" required="required" />
- <input type="submit" value="Submit" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" />
</form>
</td>
<td>
- <h3>Info of a domain:</h3>
+ <h3>{% trans %}Info of a domain:{% endtrans %}</h3>
<form action="infos">
<input type="text" name="domain" placeholder="example.com" required="required" />
- <input type="submit" value="Submit" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" />
</form>
</td>
</tr>
</tbody>
</table>
- <h2>Scoreboards:</h2>
+ <h2>{% trans %}Scoreboards:{% endtrans %}</h2>
<ul class="nav">
- <li><a href="scoreboard?mode=blocker&amount=50">Defederating instances</a></li>
- <li><a href="scoreboard?mode=blocked&amount=50">Defederated instances</a></li>
- <li><a href="scoreboard?mode=reference&amount=50">Referencing instances</a></li>
- <li><a href="scoreboard?mode=software&amount=50">Used software</a></li>
- <li><a href="scoreboard?mode=original_software&amount=50">... original</a></li>
- <li><a href="scoreboard?mode=command&amount=20">Commands</a></li>
- <li><a href="scoreboard?mode=error_code&amount=50">Error codes</a></li>
- <li><a href="scoreboard?mode=detection_mode&amount=10">Detection modes</a></li>
- <li><a href="scoreboard?mode=avg_peers&amount=50">Average peers</a></li>
- <li><a href="scoreboard?mode=avg_blocks&amount=50">Average blocks</a></li>
- <li><a href="scoreboard?mode=obfuscator&amount=10">Obfuscating software</a></li>
- <li><a href="scoreboard?mode=obfuscation&amount=10">Obfuscation statistics</a></li>
- <li><a href="scoreboard?mode=block_level&amount=20">Block level statistics</a></li>
+ <li><a href="scoreboard?mode=blocker&amount=50">{% trans %}Defederating instances{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=blocked&amount=50">{% trans %}Defederated instances{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=reference&amount=50">{% trans %}Referencing instances{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=software&amount=50">{% trans %}Used software{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=original_software&amount=50">{% trans %}... original{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=command&amount=20">{% trans %}Commands{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=error_code&amount=50">{% trans %}Error codes{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=detection_mode&amount=10">{% trans %}Detection modes{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=avg_peers&amount=50">{% trans %}Average peers{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=obfuscator&amount=10">{% trans %}Obfuscating software{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=obfuscation&amount=10">{% trans %}Obfuscation statistics{% endtrans %}</a></li>
+ <li><a href="scoreboard?mode=block_level&amount=20">{% trans %}Block level statistics{% endtrans %}</a></li>
</ul>
- <h2>Recently ...:</h2>
+ <h2>{% trans %}Recently ...:{% endtrans %}</h2>
<ul class="nav">
- <li><a href="list?mode=added&value=1&amount=50">50 added instances</a></li>
- <li><a href="list?mode=updated&value=1&amount=50">50 updated instances</a></li>
+ <li><a href="list?mode=added&value=1&amount=50">{% trans %}50 added instances{% endtrans %}</a></li>
+ <li><a href="list?mode=updated&value=1&amount=50">{% trans %}50 updated instances{% endtrans %}</a></li>
</ul>
{% endblock %}
+
{% block footer %}
<div class="notice">
- <h3>Infos:</h3>
+ <h3>{% trans %}Infos:{% endtrans %}</h3>
<table>
<thead>
<tr>
- <th title="This respresents the total count of records in table 'instances'">Total websites:</th>
- <th>Supported instances:</th>
- <th>Blocks recorded:</th>
- <th>Erroneous instances:</th>
+ <th title="{% trans %}This respresents the total count of records in table 'instances'.{% endtrans %}">{% trans %}Total websites:{% endtrans %}</th>
+ <th>{% trans %}Supported instances:{% endtrans %}</th>
+ <th>{% trans %}Blocks recorded:{% endtrans %}</th>
+ <th>{% trans %}Erroneous instances:{% endtrans %}</th>
</tr>
</thead>
{% extends "base.html" %}
-{% block title %}Infos on domain {{domain}}{% endblock %}
+{% block title %}
+ {% trans %}Infos on domain {{domain}}{% endtrans %}
+{% endblock %}
-{% block header %}<h1>Infos on {{domain}}</h1>{% endblock %}
+{% block header %}<h1>{% trans %}Infos on {{domain}}{% endtrans %}</h1>{% endblock %}
{% block content %}
<div class="infos">
<table class="table-with-rows">
<thead>
<th colspan="2">
- <h3>Instance information</h3>
+ <h3>{% trans %}Instance information{% endtrans %}</h3>
</th>
</thead>
<tbody>
<tr>
- <td>Domain name:</td>
+ <td>{% trans %}Domain name:{% endtrans %}</td>
<td>{% with domain=instance['domain'] %}{% include "widgets/links.html" %}{% endwith %}</td>
</tr>
<tr>
- <td>Domain hash:</td>
+ <td>{% trans %}Domain hash:{% endtrans %}</td>
<td>{{instance['hash']}}</td>
</tr>
<tr>
- <td>Original software:</td>
+ <td>{% trans %}Original software:{% endtrans %}</td>
<td>
{% if instance['original_software'] != None %}
<a href="list?mode=original_software&value={{instance['original_software']}}&amount=50">{{instance['original_software']}}</a>
</tr>
<tr>
- <td>Aliased software:</td>
+ <td>{% trans %}Aliased software:{% endtrans %}</td>
<td>
{% if instance['software'] != None %}
<a href="list?mode=software&value={{instance['software']}}&amount=50">{{instance['software']}}</a>
</tr>
<tr>
- <td>Originating instance:</td>
+ <td>{% trans %}Originating instance:{% endtrans %}</td>
<td>
{% if instance['origin'] != None %}
{% with domain=instance['origin'] %}{% include "widgets/links.html" %}{% endwith %}
</tr>
<tr>
- <td>Command:</td>
+ <td>{% trans %}Command:{% endtrans %}</td>
<td>
<code>{{instance['command']}}</code> -
- <a href="list?mode=command&value={{instance['command']}}&amount=50">Show</a>
+ <a href="list?mode=command&value={{instance['command']}}&amount=50">{% trans %}Show{% endtrans %}</a>
</td>
</tr>
<tr>
- <td>Detection mode:</td>
+ <td>{% trans %}Detection mode:{% endtrans %}</td>
<td>
{% if instance['detection_mode'] != None %}
<a href="list?mode=detection_mode&value={{instance['detection_mode']}}&amount=50">{{instance['detection_mode']}}</a>
</tr>
<tr>
- <td>NodeInfo URL:</td>
+ <td>{% trans %}NodeInfo URL:{% endtrans %}</td>
<td>{{instance['nodeinfo_url']}}</td>
</tr>
<tr>
- <td>Total peers:</td>
+ <td>{% trans %}Total peers:{% endtrans %}</td>
<td>{{instance['total_peers']}}</td>
</tr>
<tr>
- <td>Total blocks:</td>
+ <td>{% trans %}Total blocks:{% endtrans %}</td>
<td>{{instance['total_blocks']}}</td>
</tr>
<tr>
- <td>Last response time:</td>
+ <td>{% trans %}Last response time:{% endtrans %}</td>
<td>{{'%0.2f'|format(instance['last_response_time']|float)}}</td>
</tr>
<tr>
- <td>Obfuscated blocks:</td>
+ <td>{% trans %}Obfuscated blocks:{% endtrans %}</td>
<td>{{instance['obfuscated_blocks']}}</td>
</tr>
<tr>
- <td>Has obfuscated block list:</td>
- <td>{% if instance['has_obfuscation']%}Yes{%elif not instance['has_obfuscation']%}No{%else%}-{%endif%}</td>
+ <td>{% trans %}Has obfuscated block list:{% endtrans %}</td>
+ <td>{% if instance['has_obfuscation']%}{% trans %}Yes{% endtrans %}{%elif not instance['has_obfuscation']%}{% trans %}No{% endtrans %}{%else%}-{%endif%}</td>
</tr>
<tr>
- <td>First seen:</td>
+ <td>{% trans %}First seen:{% endtrans %}</td>
<td>{{instance['first_seen']}}</td>
</tr>
<tr>
- <td>Last updated:</td>
+ <td>{% trans %}Last updated:{% endtrans %}</td>
<td>{{instance['last_updated']}}</td>
</tr>
<tr>
- <td>Last nodeinfo fetched:</td>
+ <td>{% trans %}Last nodeinfo fetched:{% endtrans %}</td>
<td>{{instance['last_nodeinfo']}}</td>
</tr>
<tr>
- <td>Last blocks fetched:</td>
+ <td>{% trans %}Last blocks fetched:{% endtrans %}</td>
<td>{{instance['last_blocked']}}</td>
</tr>
<tr>
- <td>Last instances fetched:</td>
+ <td>{% trans %}Last instances fetched:{% endtrans %}</td>
<td>{{instance['last_instance_fetch']}}</td>
</tr>
<tr>
- <td>Last status code:</td>
+ <td>{% trans %}Last status code:{% endtrans %}</td>
<td>{{instance['last_status_code']}}</td>
</tr>
<tr>
- <td>Last error details:</td>
+ <td>{% trans %}Last error details:{% endtrans %}</td>
<td>{{instance['last_error_details']}}</td>
</tr>
</tbody>
{% endblock %}
{% block footer %}
- <a href="{{base_url}}/">Index</a> /
+ <a href="{{base_url}}/">{% trans %}Index{% endtrans %}</a> /
{{ super() }}
{% endblock %}
{% extends "base.html" %}
{% block title %}
- {% if mode == 'detection_mode' %} Detection mode {{value}}
- {% elif mode == 'original_software' %} Original software {{value}}
- {% elif mode == 'software' %} Used software {{value}}
- {% elif mode == 'command' %} Command {{value}}
- {% elif mode == 'added' %} {{amount}} recently added instances
- {% elif mode == 'updated' %} {{amount}} recently updated instances
+ {% if mode == 'detection_mode' %}{% trans %}Detection mode {{value}}{% endtrans %}
+ {% elif mode == 'original_software' %}{% trans %}Original software {{value}}{% endtrans %}
+ {% elif mode == 'software' %}{% trans %}Used software {{value}}{% endtrans %}
+ {% elif mode == 'command' %}{% trans %}Command {{value}}{% endtrans %}
+ {% elif mode == 'added' %}{% trans %}{{amount}} recently added instances{% endtrans %}
+ {% elif mode == 'updated' %}{% trans %}{{amount}} recently updated instances{% endtrans %}
{% endif %}
{% endblock %}
{% block header %}
{% if mode == 'detection_mode' %}
- <h1>Instances detected by method {{value}}</h1>
+ <h1>{% trans %}Instances detected by method {{value}}{% endtrans %}</h1>
{% elif mode == 'original_software' %}
- <h1>Original software name {{value}}</h1>
+ <h1>{% trans %}Original software name {{value}}{% endtrans %}</h1>
{% elif mode == 'software' %}
- <h1>Instances using software {{value}}</h1>
+ <h1>{% trans %}Instances using software {{value}}{% endtrans %}</h1>
{% elif mode == 'command' %}
- <h1>Instances found by command {{value}}</h1>
+ <h1>{% trans %}Instances found by command {{value}}{% endtrans %}</h1>
{% elif mode == 'origin' %}
- <h1>Instances originated from {{value}}</h1>
+ <h1>{% trans %}Instances originated from {{value}}{% endtrans %}</h1>
{% elif mode == 'added' %}
- <h1>{{amount}} recently added instances</h1>
+ <h1>{% trans %}{{amount}} recently added instances{% endtrans %}</h1>
{% elif mode == 'updated' %}
- <h1>{{amount}} recently updated instances</h1>
+ <h1>{% trans %}{{amount}} recently updated instances{% endtrans %}</h1>
{% else %}
- <h1 style="color: red">mode={{mode}} not supported</h1>
+ <h1 style="color: red">{% trans %}mode={{mode}} not supported{% endtrans %}</h1>
{% endif %}
{% endblock %}
{% block content %}
{% if amount == found %}
<div class="notice">
- <h3>Maximum amount reached!</h3>
+ <h3>{% trans %}Maximum amount reached!{% endtrans %}</h3>
<div>
- Please note that the maximum allowed amount is only returned, the blocker/blocked/reason might be more.
- Paging support is not finished yet.
+ {% trans %}Please note that the maximum allowed amount is only returned, the blocker/blocked/reason might be more.
+ Paging support is not finished yet.{% endtrans %}
</div>
</div>
{% endif %}
<table class="table-with-rows">
<thead>
- <th>Domain</th>
- <th>Origin</th>
- <th title="Aliased software name">Software</th>
- <th title="Original software name">Original</th>
- <th>Detection mode</th>
- <th>Command</th>
- <th>Total peers</th>
- <th>Total blocks</th>
- <th>Response time</th>
+ <th>{% trans %}Domain{% endtrans %}</th>
+ <th>{% trans %}Origin{% endtrans %}</th>
+ <th title="{% trans %}Aliased software name{% endtrans %}">{% trans %}Software{% endtrans %}</th>
+ <th title="{% trans %}Original software name{% endtrans %}">{% trans %}Original{% endtrans %}</th>
+ <th>{% trans %}Detection mode{% endtrans %}</th>
+ <th>{% trans %}Command{% endtrans %}</th>
+ <th>{% trans %}Total peers{% endtrans %}</th>
+ <th>{% trans %}Total blocks{% endtrans %}</th>
+ <th>{% trans %}Response time{% endtrans %}</th>
<th>
{% if mode != "added" %}
- <a href="{{base_url}}/list?mode=added&value=1&amount={{amount}}">First added</a>
+ <a href="{{base_url}}/list?mode=added&value=1&amount={{amount}}">{% trans %}First added{% endtrans %}</a>
{% else %}
- First added
+ {% trans %}First added{% endtrans %}
{% endif %}
</th>
<th>
{% if mode != "updated" %}
- <a href="{{base_url}}/list?mode=updated&value=1&amount={{amount}}">Last updated</a>
+ <a href="{{base_url}}/list?mode=updated&value=1&amount={{amount}}">{% trans %}Last updated{% endtrans %}</a>
{% else %}
- Last updated
+ {% trans %}Last updated{% endtrans %}
{% endif %}
</th>
</thead>
{% block footer %}
<div class="notice">
- <h3>Please note:</h3>
+ <h3>{% trans %}Please note:{% endtrans %}</h3>
<ul>
- <li>Total peer and block count are much lower than you might find on the individual instance.</li>
- <li>This has the simple reason that this instance count does not include blacklisted instances.</li>
+ <li>{% trans %}Total peer and block count are much lower than you might find on the individual instance.{% endtrans %}</li>
+ <li>{% trans %}This has the simple reason that this instance count does not include blacklisted instances.{% endtrans %}</li>
</ul>
</div>
- <a href="{{base_url}}/">Index</a> /
+ <a href="{{base_url}}/">{% trans %}Index{% endtrans %}</a> /
{{ super() }}
{% endblock %}
{% block title %}
Scoreboard -
- {% if mode == 'original_software' %}TOP {{amount}} original software
- {% elif mode == 'software' %}TOP {{amount}} aliased software
- {% elif mode == 'detection_mode' %}Detection mode statistics
- {% elif mode == 'block_level' %}TOP {{amount}} block level statistics
- {% elif mode == 'obfuscation' %}Obfuscation statistics
- {% elif mode == 'obfuscator' %}TOP {{amount}} obfuscating software
- {% elif mode == 'avg_peers' %}TOP {{amount}} average peer count
- {% elif mode == 'avg_blocks' %}TOP {{amount}} average block count
- {% elif mode == 'command' %}TOP {{amount}} commands
- {% elif mode == 'error_code' %}TOP {{amount}} error codes
- {% elif mode == 'reference' %}TOP {{amount}} referencing instances
- {% elif mode == 'blocked' %}TOP {{amount}} deferated instances
- {% elif mode == 'blocker' %}TOP {{amount}} deferating instances
+ {% if mode == 'original_software' %}{% trans %}TOP {{amount}} original software{% endtrans %}
+ {% elif mode == 'software' %}{% trans %}TOP {{amount}} used software{% endtrans %}
+ {% elif mode == 'detection_mode' %}{% trans %}Detection mode statistics{% endtrans %}
+ {% elif mode == 'block_level' %}{% trans %}TOP {{amount}} block level statistics{% endtrans %}
+ {% elif mode == 'obfuscation' %}{% trans %}Obfuscation statistics{% endtrans %}
+ {% elif mode == 'obfuscator' %}{% trans %}TOP {{amount}} obfuscating software{% endtrans %}
+ {% elif mode == 'avg_peers' %}{% trans %}TOP {{amount}} average peer count{% endtrans %}
+ {% elif mode == 'avg_blocks' %}{% trans %}TOP {{amount}} average block count{% endtrans %}
+ {% elif mode == 'command' %}{% trans %}t}} commands{% endtrans %}
+ {% elif mode == 'error_code' %}{% trans %}t}} error codes{% endtrans %}
+ {% elif mode == 'reference' %}{% trans %}t}} referencing instances{% endtrans %}
+ {% elif mode == 'blocked' %}{% trans %}t}} deferated instances{% endtrans %}
+ {% elif mode == 'blocker' %}{% trans %}t}} deferating instances{% endtrans %}
{% endif %}
{% endblock %}
{% block header %}
{% if mode == 'blocker' %}
- <h1>Top {{amount}} defederating instances</h1>
+ <h1>{% trans %}Top {{amount}} defederating instances{% endtrans %}</h1>
{% elif mode == 'blocked' %}
- <h1>Top {{amount}} defederated instances</h1>
+ <h1>{% trans %}Top {{amount}} defederated instances{% endtrans %}</h1>
{% elif mode == 'reference' %}
- <h1>Top {{amount}} referencing instances</h1>
+ <h1>{% trans %}Top {{amount}} referencing instances{% endtrans %}</h1>
{% elif mode == 'original_software' %}
- <h1>Top {{amount}} original software names</h1>
+ <h1>{% trans %}Top {{amount}} original software names{% endtrans %}</h1>
{% elif mode == 'software' %}
- <h1>Top {{amount}} aliased software</h1>
+ <h1>{% trans %}Top {{amount}} used software{% endtrans %}</h1>
{% elif mode == 'command' %}
- <h1>TOP {{amount}} commands</h1>
+ <h1>{% trans %}TOP {{amount}} commands{% endtrans %}</h1>
{% elif mode == 'error_code' %}
- <h1>TOP {{amount}} error codes</h1>
+ <h1>{% trans %}TOP {{amount}} error codes{% endtrans %}</h1>
{% elif mode == 'detection_mode' %}
- <h1>Detection mode statistics</h1>
+ <h1>{% trans %}Detection mode statistics{% endtrans %}</h1>
{% elif mode == 'avg_peers' %}
- <h1>TOP {{amount}} average peer count</h1>
+ <h1>{% trans %}TOP {{amount}} average peer count{% endtrans %}</h1>
{% elif mode == 'avg_blocks' %}
- <h1>TOP {{amount}} average block count</h1>
+ <h1>{% trans %}TOP {{amount}} average block count{% endtrans %}</h1>
{% elif mode == 'obfuscator' %}
- <h1>TOP {{amount}} obfuscating software</h1>
+ <h1>{% trans %}TOP {{amount}} obfuscating software{% endtrans %}</h1>
{% elif mode == 'obfuscation' %}
- <h1>Obfuscation statistics</h1>
+ <h1>{% trans %}Obfuscation statistics{% endtrans %}</h1>
{% elif mode == 'block_level' %}
- <h1>TOP {{amount}} block levels</h1>
+ <h1>{% trans %}TOP {{amount}} block levels{% endtrans %}</h1>
{% else %}
- <h1 style="color: red">mode={{mode}} not supported</h1>
+ <h1 style="color: red">{% trans %}mode={{mode}} not supported{% endtrans %}</h1>
{% endif %}
{% endblock %}
<thead>
<th>№</th>
<th>
- {% if mode in ('original_software', 'software', 'avg_peers', 'avg_blocks', 'obfuscator') %}Software
- {% elif mode == 'obfuscation' %}Obfuscation status
- {% elif mode == 'detection_mode' %}Detection mode
- {% elif mode == 'error_code' %}Error code
- {% else %}Instance
+ {% if mode in ('original_software', 'software', 'avg_peers', 'avg_blocks', 'obfuscator') %}{% trans %}Software{% endtrans %}
+ {% elif mode == 'obfuscation' %}{% trans %}Obfuscation status{% endtrans %}
+ {% elif mode == 'detection_mode' %}{% trans %}Detection mode{% endtrans %}
+ {% elif mode == 'error_code' %}{% trans %}Error code{% endtrans %}
+ {% else %}{% trans %}Instance{% endtrans %}
{% endif %}
</th>
<th>
- {% if mode == 'reference' %}References
- {% elif mode in('avg_peers', 'avg_blocks') %}Average
- {% elif mode in('original_software', 'software', 'error_code', 'obfuscator', 'obfuscation', 'block_level', 'detection_mode', 'command') %}Total
- {% else %}Blocks
+ {% if mode == 'reference' %}{% trans %}References{% endtrans %}
+ {% elif mode == 'avg_peers' %}{% trans %}Average{% endtrans %}
+ {% elif mode in('software', 'error_code', 'obfuscator', 'obfuscation', 'block_level', 'detection_mode', 'command') %}{% trans %}Total{% endtrans %}
+ {% else %}{% trans %}Blocks{% endtrans %}
{% endif %}
</th>
</thead>
{% block footer %}
{% if mode == 'error_code' %}
<div class="notice">
- <h3>Error codes:</h3>
+ <h3>{% trans %}Error codes:{% endtrans %}</h3>
<ul>
- <li>Error code 999 is fake and covers a lot of reasons why the domain/instance is not reachable. Mostly that the domain is not resolvable or the server refused connection.</li>
+ <li>{% trans %}Error code 999 is fake and covers a lot of reasons why the domain/instance is not reachable. Mostly that the domain is not resolvable or the server refused connection.{% endtrans %}</li>
</ul>
</div>
{% elif mode == 'detection_mode' %}
<div class="notice">
- <h3>Detection modes:</h3>
+ <h3>{% trans %}Detection modes:{% endtrans %}</h3>
<div>
- Detection is done in following order:
+ {% trans %}Detection is done in following order:{% endtrans %}
</div>
<ol>
- <li><b>AUTO_DISCOVERY</b>: <code>/.well-known/nodeinfo</code> was reachable and software type was found in nodeinfo response</li>
- <li><b>STATIC_CHECK</b>: Node information was found by probing for well-known URLs</li>
- <li><b>PLATFORM</b>: Meta data <code>og:platform</code> was found in HTML code</li>
- <li><b>GENERATOR</b>: Meta data <code>generator</code> was found in HTML code</li>
- <li><b>APP_NAME</b>: Meta data <code>application-name</code> was found in HTML code</li>
- <li><b>SITE_NAME</b>: Meta data <code>og:site_name</code> was found in HTML code</li>
- <li><b>None</b>: the instance was not reachable or the used software was not stated</li>
+ <li><b>AUTO_DISCOVERY</b>: {% trans %}<code>/.well-known/nodeinfo</code> was reachable and software type was found in nodeinfo response{% endtrans %}</li>
+ <li><b>STATIC_CHECK</b>: {% trans %}Node information was found by probing for well-known URLs{% endtrans %}</li>
+ <li><b>PLATFORM</b>: {% trans %}Meta data <code>og:platform</code> was found in HTML code{% endtrans %}</li>
+ <li><b>GENERATOR</b>: {% trans %}Meta data <code>generator</code> was found in HTML code{% endtrans %}</li>
+ <li><b>APP_NAME</b>: {% transd %}Meta data <code>application-name</code> was found in HTML code{% endtrans %}</li>
+ <li><b>SITE_NAME</b>: {% trans %}Meta data <code>og:site_name</code> was found in HTML code{% endtrans %}</li>
+ <li><b>{% trans %}None{% endtrans %}</b>: {% trans %}the instance was not reachable or the used software was not stated{% endtrans %}</li>
</ol>
</div>
{% elif mode == 'obfuscation' %}
<div class="notice">
- <h3>Obfuscation status:</h3>
+ <h3>{% trans %}Obfuscation status:{% endtrans %}</h3>
<ul>
- <li>Only supported networks are counted here.</li>
- <li><b>None</b> means not determined yet or erroneous.</li>
+ <li>{% trans %}Only supported networks are counted here.{% endtrans %}</li>
+ <li>{% trans %}<b>None</b> means not determined yet or erroneous.{% endtrans %}</li>
</ul>
</div>
{% endif %}
- <a href="{{base_url}}/">Index</a> /
+ <a href="{{base_url}}/">{% trans %}Index{% endtrans %}</a> /
{{ super() }}
{% endblock %}
{% extends "base.html" %}
{% block title %}
- {% if mode == 'domain' %} Instances that block {{value}}
- {% elif mode == 'reverse' %} Instances that are blocked by {{value}}
- {% elif mode == 'reason' %} Instances having block reason {{value}}
+ {% if mode == 'domain' %}{% trans %}Instances that block {{value}}{% endtrans %}
+ {% elif mode == 'reverse' %}{% trans %}Instances that are blocked by {{value}}{% endtrans %}
+ {% elif mode == 'reason' %}{% trans %}Instances having block reason {{value}}{% endtrans %}
{% endif %}
{% endblock %}
{% block rss %}
{{ super() }}
{% if mode == 'domain' %}
- <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocked domain {{value}}" href="rss?domain={{value}}" />
+ <link rel="alternate" type="application/rss+xml" title="{% trans %}RSS Feed for blocked domain {{value}}{% endtrans %}" href="rss?domain={{value}}" />
{% elif mode == 'reverse' %}
- <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocking domain {{value}}" href="rss?reverse={{value}}" />
+ <link rel="alternate" type="application/rss+xml" title="{% trans %}RSS Feed for blocking domain {{value}}{% endtrans %}" href="rss?reverse={{value}}" />
{% endif %}
{% endblock %}
{% block header %}
{% if mode == 'reason' %}
- <h1>Instances that use "{{value}}" in their reason</h1>
+ <h1>{% trans %}Instances that use "{{value}}" in their reason{% endtrans %}</h1>
{% elif mode == 'reverse' %}
- <h1>Instances that are blocked by {{value}}</h1>
+ <h1>{% trans %}Instances that are blocked by {{value}}{% trans %}</h1>
{% elif mode == 'domain' %}
- <h1>Instances that block {{value}}</h1>
+ <h1>{% trans %}Instances that block {{value}}{% endtrans %}</h1>
{% endif %}
{% endblock %}
{% block content %}
{% if amount == found %}
<div class="notice">
- <h3>Maximum amount reached!</h3>
+ <h3>{% trans %}Maximum amount reached!{% endtrans %}</h3>
<div>
- Please note that the maximum allowed amount is only returned, the blocker/blocked/reason might be more.
- Paging support is not finished yet.
+ {% trans %}Please note that the maximum allowed amount is only returned, the blocker/blocked/reason might be more.
+ Paging support is not finished yet.{% endtrans %}
</div>
</div>
{% endif %}
<h2>{{block_level}} ({{blocklist[block_level]|length}})</h2>
<table class="table-with-rows">
<thead>
- <th>Blocker</th>
- <th>{% if block_level == 'accept' %}Accepted{% else %}Blocked{% endif %}</th>
- <th>Reason</th>
- <th>First added</th>
- <th>Last seen</th>
+ <th>{% trans %}Blocker{% endtrans %}</th>
+ <th>{% if block_level == 'accept' %}{% trans %}Accepted{% endtrans %}{% else %}{% trans %}Blocked{% endtrans %}{% endif %}</th>
+ <th>{% trans %}Reason{% endtrans %}</th>
+ <th>{% trans %}First added{% endtrans %}</th>
+ <th>{% trans %}Last seen{% trans %}</th>
</thead>
<tbody>
</div>
{% endfor %}
{% endblock %}
+
{% block footer %}
- <a href="{{base_url}}/">Index</a> /
+ <a href="{{base_url}}/">{% trans %}Index{% endtrans %}</a> /
{{ super() }}
{% endblock %}
{% if domain != None %}
- [<a class="listlink" href="top?mode=domain&value={{domain}}" title="Search {{domain}}">D</a>]
- [<a class="listlink" href="top?mode=reverse&value={{domain}}" title="Reverse search {{domain}}">R</a>]
- [<a class="listlink" href="infos?domain={{domain}}" title="Information on domain {{domain}}">I</a>]
- [<a class="listlink" href="list?mode=origin&value={{domain}}&amount=500" title="Instances from origin {{domain}}">O</a>]
- <a href="https://{{domain}}" target="_blank" rel="nofollow noopener noreferrer" title="Visit website at {{domain}}">{{domain}}</a>
+ [<a class="listlink" href="top?mode=domain&value={{domain}}" title="{% trans %}Search {{domain}}{% endtrans %}">D</a>]
+ [<a class="listlink" href="top?mode=reverse&value={{domain}}" title="{% trans %}Reverse search {{domain}}{% endtrans %}">R</a>]
+ [<a class="listlink" href="infos?domain={{domain}}" title="{% trans %}Information on domain {{domain}}{% endtrans %}">I</a>]
+ [<a class="listlink" href="list?mode=origin&value={{domain}}&amount=500" title="{% trans %}Instances from origin {{domain}}{% endtrans %}">O</a>]
+ <a href="https://{{domain}}" target="_blank" rel="nofollow noopener noreferrer" title="{% trans %}Visit website at {{domain}}{% endtrans %}">{{domain}}</a>
{% else %}
-
{% endif %}
{% if value != None %}
- <a href="list?mode={{mode}}&value={{value}}&amount={{amount}}" title="Information on domain {{domain}}">{{value}}</a>
+ <a href="list?mode={{mode}}&value={{value}}&amount={{amount}}" title="{% trans %}Information on domain {{domain}}{% endtrans %}">{{value}}</a>
{% else %}
- None
+ {% trans %}None{% endtrans %}
{% endif %}