From e20c0c29a77eaa28a1bb1157d2e184ab2a129cc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 6 Jun 2023 12:53:36 +0200 Subject: [PATCH] Continued: - maybe this floods your output a little ... - but still I need to find missing translations --- fba/fba.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fba/fba.py b/fba/fba.py index 6d93fe0..c1c47e9 100644 --- a/fba/fba.py +++ b/fba/fba.py @@ -81,6 +81,7 @@ language_mapping = { "Silenced instances" : "Silenced servers", "Suspended instances" : "Suspended servers", "Limited instances" : "Limited servers", + "Filtered media" : "Filtered media", # Mappuing German -> English "Gesperrte Server" : "Suspended servers", "Gefilterte Medien" : "Filtered media", @@ -1257,6 +1258,8 @@ def get_mastodon_blocks(domain: str) -> dict: if header_text in language_mapping: # DEBUG: print(f"DEBUG: header_text='{header_text}'") header_text = language_mapping[header_text] + else: + print(f"WARNING: header_text='{header_text}' not found in language mapping table") if header_text in blocks or header_text.lower() in blocks: # replaced find_next_siblings with find_all_next to account for instances that e.g. hide lists in dropdown menu @@ -1268,6 +1271,8 @@ def get_mastodon_blocks(domain: str) -> dict: "reason": tidyup_domain(line.find_all("td")[1].text), } ) + else: + print(f"WARNING: header_text='{header_text}' not found in blocks()={len(blocks)}") # DEBUG: print("DEBUG: Returning blocks for domain:", domain) return { -- 2.39.5