]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 6 Jun 2023 10:53:36 +0000 (12:53 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 6 Jun 2023 10:53:36 +0000 (12:53 +0200)
- maybe this floods your output a little ...
- but still I need to find missing translations

fba/fba.py

index 6d93fe018ed76966d79da5a7a647910e2371a34f..c1c47e9b290e44838b290190270b5ae6e365d847 100644 (file)
@@ -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 {