bin/proxy.py clean up

This commit is contained in:
Igor Chubin 2018-10-23 20:04:42 +02:00
parent 5353cc3a17
commit 10f5aa579c
2 changed files with 26 additions and 11 deletions

View file

@ -39,6 +39,10 @@ GEOLOCATOR_SERVICE = 'http://localhost:8004'
LISTEN_HOST = "" LISTEN_HOST = ""
LISTEN_PORT = 8002 LISTEN_PORT = 8002
PROXY_HOST = "127.0.0.1"
PROXY_PORT = 5001
PROXY_CACHEDIR = "api-cache"
MY_EXTERNAL_IP = '5.9.243.187' MY_EXTERNAL_IP = '5.9.243.187'
PLAIN_TEXT_AGENTS = [ PLAIN_TEXT_AGENTS = [
@ -53,6 +57,7 @@ PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation']
IP2LOCATION_KEY = '' IP2LOCATION_KEY = ''
def error(text): def error(text):
"log error `text` and raise a RuntimeError exception" "log error `text` and raise a RuntimeError exception"

View file

@ -1,19 +1,29 @@
# vim: set encoding=utf-8 # vim: fileencoding=utf-8
"""
Translation of almost everything.
"""
FULL_TRANSLATION = [ FULL_TRANSLATION = [
"de", "fr", "id", "it", "nb", "nl", "pl", "ru", "de", "fr", "id", "it", "nb", "nl", "pl", "ru",
] ]
PARTIAL_TRANSLATION = [ PARTIAL_TRANSLATION = [
"az", "be", "bg", "bs", "ca", "cy", "cs", "az", "be", "bg", "bs", "ca", "cy", "cs",
"da", "el", "eo", "es", "et", "fi", "da", "el", "eo", "es", "et", "fi",
"hi", "hr", "hu", "hy", "is", "hi", "hr", "hu", "hy", "is",
"ja", "jv", "ka", "kk", "ko", "ky", "lt", "ja", "jv", "ka", "kk", "ko", "ky", "lt",
"lv", "mk", "ml", "nl", "nn", "pt", "lv", "mk", "ml", "nl", "nn", "pt",
"ro", "sk", "sl", "sr", "sr-lat", "ro", "sk", "sl", "sr", "sr-lat",
"sv", "sw", "th", "tr", "te", "uk", "uz", "vi", "sv", "sw", "th", "tr", "te", "uk", "uz", "vi",
"zh", "zu", "zh", "zu",
"he", "he",
]
PROXY_LANGS = [
'az', 'bs', 'ca', 'cy', 'eo', 'he', 'hr',
'hy', 'id', 'is', 'it', 'ja',
'kk', 'lv', 'mk', 'nb', 'nn', 'sl', 'uz'
] ]