Warning about following

merge-requests/30/head
Bob Mottram 2023-08-29 18:14:06 +01:00
parent 73cc5443f0
commit 6d7e714f92
29 changed files with 71 additions and 30 deletions

View File

@ -3671,7 +3671,9 @@ class PubServer(BaseHTTPRequestHandler):
base_dir,
users_path,
options_actor,
options_avatar_url).encode('utf-8')
options_avatar_url,
chooser_nickname,
domain).encode('utf-8')
msglen = len(msg)
self._set_headers('text/html', msglen,
cookie, calling_domain, False)
@ -3689,7 +3691,9 @@ class PubServer(BaseHTTPRequestHandler):
base_dir,
users_path,
options_actor_moved,
options_avatar_url).encode('utf-8')
options_avatar_url,
chooser_nickname,
domain).encode('utf-8')
if msg:
msglen = len(msg)
self._set_headers('text/html', msglen,

View File

@ -632,5 +632,6 @@
"Chat link": "رابط الدردشة",
"Clear Cache": "مسح ذاكرة التخزين المؤقت",
"Block military instances": "منع الحالات العسكرية",
"Display on your public profile": "عرض على ملفك الشخصي العام"
"Display on your public profile": "عرض على ملفك الشخصي العام",
"FollowWarning": "تحذير: قد يكون هذا المثيل يمنعك"
}

View File

@ -632,5 +632,6 @@
"Chat link": "চ্যাট লিঙ্ক",
"Clear Cache": "ক্যাশে সাফ করুন",
"Block military instances": "সামরিক দৃষ্টান্ত ব্লক করুন",
"Display on your public profile": "আপনার পাবলিক প্রোফাইলে প্রদর্শন করুন"
"Display on your public profile": "আপনার পাবলিক প্রোফাইলে প্রদর্শন করুন",
"FollowWarning": "সতর্কতা: এই উদাহরণটি আপনাকে অবরুদ্ধ করতে পারে"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Enllaç de xat",
"Clear Cache": "Netejar memòria cau",
"Block military instances": "Bloquejar instàncies militars",
"Display on your public profile": "Mostra al teu perfil públic"
"Display on your public profile": "Mostra al teu perfil públic",
"FollowWarning": "ADVERTIMENT: aquesta instància pot estar bloquejant-vos"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Dolen sgwrs",
"Clear Cache": "Clirio Cache",
"Block military instances": "Rhwystro achosion milwrol",
"Display on your public profile": "Arddangos ar eich proffil cyhoeddus"
"Display on your public profile": "Arddangos ar eich proffil cyhoeddus",
"FollowWarning": "RHYBUDD: efallai bod yr achos hwn yn eich rhwystro"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Chat-Link",
"Clear Cache": "Cache leeren",
"Block military instances": "Militärische Instanzen blockieren",
"Display on your public profile": "Anzeige in Ihrem öffentlichen Profil"
"Display on your public profile": "Anzeige in Ihrem öffentlichen Profil",
"FollowWarning": "ACHTUNG: Diese Instanz blockiert Sie möglicherweise"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Σύνδεσμος συνομιλίας",
"Clear Cache": "Εκκαθάριση προσωρινής μνήμης",
"Block military instances": "Αποκλεισμός στρατιωτικών περιπτώσεων",
"Display on your public profile": "Εμφάνιση στο δημόσιο προφίλ σας"
"Display on your public profile": "Εμφάνιση στο δημόσιο προφίλ σας",
"FollowWarning": "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: αυτή η περίπτωση μπορεί να σας μπλοκάρει"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Chat link",
"Clear Cache": "Clear Cache",
"Block military instances": "Block military instances",
"Display on your public profile": "Display on your public profile"
"Display on your public profile": "Display on your public profile",
"FollowWarning": "WARNING: this instance may be blocking you"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Enlace de chat",
"Clear Cache": "Limpiar cache",
"Block military instances": "Bloquear instancias militares",
"Display on your public profile": "Mostrar en su perfil público"
"Display on your public profile": "Mostrar en su perfil público",
"FollowWarning": "ADVERTENCIA: esta instancia puede estar bloqueándote"
}

View File

@ -632,5 +632,6 @@
"Chat link": "لینک چت",
"Clear Cache": "پاک کردن حافظه پنهان",
"Block military instances": "موارد نظامی را مسدود کنید",
"Display on your public profile": "نمایش در نمایه عمومی شما"
"Display on your public profile": "نمایش در نمایه عمومی شما",
"FollowWarning": "هشدار: این مورد ممکن است شما را مسدود کند"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Lien de discussion",
"Clear Cache": "Vider le cache",
"Block military instances": "Bloquer les instances militaires",
"Display on your public profile": "Afficher sur votre profil public"
"Display on your public profile": "Afficher sur votre profil public",
"FollowWarning": "ATTENTION : cette instance peut vous bloquer"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Nasc comhrá",
"Clear Cache": "Glan Taisce",
"Block military instances": "Bloc cásanna míleata",
"Display on your public profile": "Taispeáin ar do phróifíl phoiblí"
"Display on your public profile": "Taispeáin ar do phróifíl phoiblí",
"FollowWarning": "RABHADH: seans go bhfuil an cás seo ag cur bac ort"
}

View File

@ -632,5 +632,6 @@
"Chat link": "קישור לצ'אט",
"Clear Cache": "נקה מטמון",
"Block military instances": "חסום מקרים צבאיים",
"Display on your public profile": "הצג בפרופיל הציבורי שלך"
"Display on your public profile": "הצג בפרופיל הציבורי שלך",
"FollowWarning": "אזהרה: ייתכן שהמקרה הזה חוסם אותך"
}

View File

@ -632,5 +632,6 @@
"Chat link": "चैट लिंक",
"Clear Cache": "कैश को साफ़ करें",
"Block military instances": "सैन्य उदाहरणों को ब्लॉक करें",
"Display on your public profile": "अपनी सार्वजनिक प्रोफ़ाइल पर प्रदर्शित करें"
"Display on your public profile": "अपनी सार्वजनिक प्रोफ़ाइल पर प्रदर्शित करें",
"FollowWarning": "चेतावनी: यह उदाहरण आपको अवरुद्ध कर सकता है"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Collegamento alla chat",
"Clear Cache": "Cancella cache",
"Block military instances": "Blocca istanze militari",
"Display on your public profile": "Visualizza sul tuo profilo pubblico"
"Display on your public profile": "Visualizza sul tuo profilo pubblico",
"FollowWarning": "ATTENZIONE: questa istanza potrebbe bloccarti"
}

View File

@ -632,5 +632,6 @@
"Chat link": "チャットリンク",
"Clear Cache": "キャッシュの消去",
"Block military instances": "軍事インスタンスをブロックする",
"Display on your public profile": "公開プロフィールに表示する"
"Display on your public profile": "公開プロフィールに表示する",
"FollowWarning": "警告: このインスタンスはあなたをブロックしている可能性があります"
}

View File

@ -632,5 +632,6 @@
"Chat link": "채팅 링크",
"Clear Cache": "캐시 지우기",
"Block military instances": "군사 인스턴스 차단",
"Display on your public profile": "공개 프로필에 표시"
"Display on your public profile": "공개 프로필에 표시",
"FollowWarning": "경고: 이 인스턴스가 귀하를 차단하고 있을 수 있습니다."
}

View File

@ -632,5 +632,6 @@
"Chat link": "Lînka chatê",
"Clear Cache": "Cache paqij bike",
"Block military instances": "Mînakên leşkerî asteng bikin",
"Display on your public profile": "Li ser profîla xweya giştî nîşan bidin"
"Display on your public profile": "Li ser profîla xweya giştî nîşan bidin",
"FollowWarning": "HIŞYARÎ: dibe ku ev mînak we asteng bike"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Chat-link",
"Clear Cache": "Cache wissen",
"Block military instances": "Blokkeer militaire instanties",
"Display on your public profile": "Weergave op uw openbare profiel"
"Display on your public profile": "Weergave op uw openbare profiel",
"FollowWarning": "WAARSCHUWING: deze instantie blokkeert u mogelijk"
}

View File

@ -628,5 +628,6 @@
"Chat link": "Chat link",
"Clear Cache": "Clear Cache",
"Block military instances": "Block military instances",
"Display on your public profile": "Display on your public profile"
"Display on your public profile": "Display on your public profile",
"FollowWarning": "WARNING: this instance may be blocking you"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Link do czatu",
"Clear Cache": "Wyczyść pamięć podręczną",
"Block military instances": "Blokuj instancje wojskowe",
"Display on your public profile": "Wyświetlaj na swoim profilu publicznym"
"Display on your public profile": "Wyświetlaj na swoim profilu publicznym",
"FollowWarning": "OSTRZEŻENIE: ta instancja może Cię blokować"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Link de bate-papo",
"Clear Cache": "Limpar cache",
"Block military instances": "Bloquear instâncias militares",
"Display on your public profile": "Exibir em seu perfil público"
"Display on your public profile": "Exibir em seu perfil público",
"FollowWarning": "AVISO: esta instância pode estar bloqueando você"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Ссылка на чат",
"Clear Cache": "Очистить кэш",
"Block military instances": "Блокировать военные инстансы",
"Display on your public profile": "Отобразить в своем общедоступном профиле"
"Display on your public profile": "Отобразить в своем общедоступном профиле",
"FollowWarning": "ВНИМАНИЕ: этот экземпляр может блокировать вас."
}

View File

@ -632,5 +632,6 @@
"Chat link": "Kiungo cha gumzo",
"Clear Cache": "Futa Cache",
"Block military instances": "Zuia matukio ya kijeshi",
"Display on your public profile": "Onyesha kwenye wasifu wako wa umma"
"Display on your public profile": "Onyesha kwenye wasifu wako wa umma",
"FollowWarning": "ONYO: mfano huu unaweza kuwa unakuzuia"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Sohbet bağlantısı",
"Clear Cache": "Önbelleği Temizle",
"Block military instances": "Askeri örnekleri engelle",
"Display on your public profile": "Herkese açık profilinizde görüntüleyin"
"Display on your public profile": "Herkese açık profilinizde görüntüleyin",
"FollowWarning": "UYARI: bu örnek sizi engelliyor olabilir"
}

View File

@ -632,5 +632,6 @@
"Chat link": "Посилання на чат",
"Clear Cache": "Очистити кеш",
"Block military instances": "Блокувати військові інстанції",
"Display on your public profile": "Відображати у своєму публічному профілі"
"Display on your public profile": "Відображати у своєму публічному профілі",
"FollowWarning": "УВАГА: цей екземпляр може блокувати вас"
}

View File

@ -632,5 +632,6 @@
"Chat link": "שמועס לינק",
"Clear Cache": "קלאָר קאַש",
"Block military instances": "פאַרשפּאַרן מיליטעריש ינסטאַנסיז",
"Display on your public profile": "ווייַז אויף דיין עפנטלעך פּראָפיל"
"Display on your public profile": "ווייַז אויף דיין עפנטלעך פּראָפיל",
"FollowWarning": "ווארענונג: דעם בייַשפּיל קען פאַרשפּאַרן איר"
}

View File

@ -632,5 +632,6 @@
"Chat link": "聊天链接",
"Clear Cache": "קלאָר קאַש",
"Block military instances": "阻止军事实例",
"Display on your public profile": "显示在您的公开个人资料上"
"Display on your public profile": "显示在您的公开个人资料上",
"FollowWarning": "警告:此实例可能会阻止您"
}

View File

@ -18,6 +18,7 @@ from utils import get_config_param
from utils import get_alt_path
from utils import acct_dir
from utils import get_account_timezone
from utils import text_in_file
from webapp_utils import set_custom_background
from webapp_utils import html_header_with_external_style
from webapp_utils import html_footer
@ -203,7 +204,8 @@ def html_confirm_remove_shared_item(translate: {},
def html_confirm_follow(translate: {}, base_dir: str,
origin_path_str: str,
follow_actor: str,
follow_profile_url: str) -> str:
follow_profile_url: str,
nickname: str, domain: str) -> str:
"""Asks to confirm a follow
"""
follow_domain, _ = get_domain_from_actor(follow_actor)
@ -229,6 +231,14 @@ def html_confirm_follow(translate: {}, base_dir: str,
'src="' + follow_profile_url + '"/></a>\n'
follow_actor_nick = get_nickname_from_actor(follow_actor)
if follow_actor_nick and follow_domain:
send_block_filename = \
acct_dir(base_dir, nickname, domain) + '/send_blocks.txt'
if os.path.isfile(send_block_filename):
if text_in_file('://' + follow_domain,
send_block_filename, False):
follow_str += \
'<p class="followText"><b>' + \
translate['FollowWarning'] + '</b></p>\n'
follow_str += \
' <p class="followText">' + translate['Follow'] + ' ' + \
follow_actor_nick + '@' + follow_domain + ' ?</p>\n'