77"""
88
99from flask import jsonify , render_template , request
10+ from flask_babel import _
1011
1112
1213def register_routes (app , auth , proxy_server , ProxyMonitor ):
@@ -29,7 +30,60 @@ def index():
2930 Returns:
3031 Response: Rendered HTML page.
3132 """
32- return render_template ("index.html" )
33+ translations = {
34+ "Next refresh in:" : _ ("Next refresh in:" ),
35+ "Loading..." : _ ("Loading..." ),
36+ "Main Process" : _ ("Main Process" ),
37+ "Subprocesses" : _ ("Subprocesses" ),
38+ "Status" : _ ("Status" ),
39+ "Configuration" : _ ("Configuration" ),
40+ "Active Connections" : _ ("Active Connections" ),
41+ "Search client or target..." : _ ("Search client or target..." ),
42+ "Blocked sites" : _ ("Blocked sites" ),
43+ "Blocked URLs" : _ ("Blocked URLs" ),
44+ "Add" : _ ("Add" ),
45+ "Add a domain or URL to block" : _ ("Add a domain or URL to block" ),
46+ "Domain" : _ ("Domain" ),
47+ "URL" : _ ("URL" ),
48+ "Value :" : _ ("Value :" ),
49+ "Filtering" : _ ("Filtering" ),
50+ "No active connections." : _ ("No active connections." ),
51+ "No blocked sites." : _ ("No blocked sites." ),
52+ "No URLs blocked." : _ ("No URLs blocked." ),
53+ "Error while deleting :" : _ ("Error while deleting :" ),
54+ "Error adding :" : _ ("Error adding :" ),
55+ "Please enter a value to block." : _ ("Please enter a value to block." ),
56+ "Network error" : _ ("Network error" ),
57+ "Error loading data:" : _ ("Error loading data:" ),
58+ "Name:" : _ ("Name:" ),
59+ "PID:" : _ ("PID:" ),
60+ "Status:" : _ ("Status:" ),
61+ "Start Time:" : _ ("Start Time:" ),
62+ "Client" : _ ("Client" ),
63+ "Target" : _ ("Target" ),
64+ "Sent" : _ ("Sent" ),
65+ "Received" : _ ("Received" ),
66+ "bytes" : _ ("bytes" ),
67+ "Port:" : _ ("Port:" ),
68+ "Flask Port:" : _ ("Flask Port:" ),
69+ "HTML 403:" : _ ("HTML 403:" ),
70+ "Filter Configuration" : _ ("Filter Configuration" ),
71+ "Blocked Sites File:" : _ ("Blocked Sites File:" ),
72+ "Blocked URL File:" : _ ("Blocked URL File:" ),
73+ "Filter Mode:" : _ ("Filter Mode:" ),
74+ "Logger Configuration" : _ ("Logger Configuration" ),
75+ "Access Log:" : _ ("Access Log:" ),
76+ "Block Log:" : _ ("Block Log:" ),
77+ "SSL Inspection" : _ ("SSL Inspection" ),
78+ "Inspect CA Cert:" : _ ("Inspect CA Cert:" ),
79+ "Inspect CA Key:" : _ ("Inspect CA Key:" ),
80+ "Inspect certs folder:" : _ ("Inspect certs folder:" ),
81+ "Cancel inspect:" : _ ("Cancel inspect:" ),
82+ "Action" : _ ("Action" ),
83+ "Unblock" : _ ("Unblock" ),
84+ "Network error:" : _ ("Network error" ),
85+ }
86+ return render_template ("index.html" , translations = translations )
3387
3488 @app .route ("/api/status" , methods = ["GET" ])
3589 @auth .login_required
0 commit comments