Highlight organisations and groups

main
bashrc 2026-02-26 11:06:46 +00:00
parent 41d395c87d
commit a5b935f9a5
30 changed files with 129 additions and 40 deletions

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "تحذير: رابط خطير محتمل",
"Mutual": "مشترك",
"Bot": "الروبوت",
"Show Map": "عرض الخريطة"
"Show Map": "عرض الخريطة",
"Organisation": "منظمة",
"Group": "مجموعة"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "সতর্কতা: সম্ভাব্য বিপজ্জনক লিঙ্ক",
"Mutual": "পারস্পরিক",
"Bot": "রোবট",
"Show Map": "মানচিত্র দেখান"
"Show Map": "মানচিত্র দেখান",
"Organisation": "সংগঠন",
"Group": "গ্রুপ"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Avís: Possible enllaç perillós",
"Mutual": "Mútua",
"Bot": "Bot",
"Show Map": "Mostra el mapa"
"Show Map": "Mostra el mapa",
"Organisation": "Organització",
"Group": "Grup"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Rhybudd: Cyswllt peryglus posibl",
"Mutual": "Cydfuddiannol",
"Bot": "Bot",
"Show Map": "Dangos Map"
"Show Map": "Dangos Map",
"Organisation": "Sefydliad",
"Group": "Grŵp"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Warnung: Möglicher gefährlicher Link",
"Mutual": "Gegenseitig",
"Bot": "Roboter",
"Show Map": "Karte anzeigen"
"Show Map": "Karte anzeigen",
"Organisation": "Organisation",
"Group": "Gruppe"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Προειδοποίηση: Πιθανός επικίνδυνος σύνδεσμος",
"Mutual": "Αμοιβαίος",
"Bot": "Ρομπότ",
"Show Map": "Εμφάνιση Χάρτη"
"Show Map": "Εμφάνιση Χάρτη",
"Organisation": "Οργάνωση",
"Group": "Ομάδα"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Warning: Possible dangerous link",
"Mutual": "Mutual",
"Bot": "Bot",
"Show Map": "Show Map"
"Show Map": "Show Map",
"Organisation": "Organisation",
"Group": "Group"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Advertencia: Posible enlace peligroso",
"Mutual": "Mutual",
"Bot": "Bot",
"Show Map": "Mostrar mapa"
"Show Map": "Mostrar mapa",
"Organisation": "Organización",
"Group": "Grupo"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "هشدار: احتمال لینک خطرناک",
"Mutual": "متقابل",
"Bot": "ربات",
"Show Map": "نمایش نقشه"
"Show Map": "نمایش نقشه",
"Organisation": "سازمان",
"Group": "گروه"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Varoitus: Mahdollisesti vaarallinen linkki",
"Mutual": "Keskinäinen",
"Bot": "Robotti",
"Show Map": "Näytä kartta"
"Show Map": "Näytä kartta",
"Organisation": "Organisaatio",
"Group": "Ryhmä"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Avertissement : lien potentiellement dangereux",
"Mutual": "Mutuelle",
"Bot": "Bot",
"Show Map": "Afficher la carte"
"Show Map": "Afficher la carte",
"Organisation": "Organisation",
"Group": "Groupe"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Rabhadh: Nasc contúirteach féideartha",
"Mutual": "Frithpháirteach",
"Bot": "Róbat",
"Show Map": "Taispeáin Léarscáil"
"Show Map": "Taispeáin Léarscáil",
"Organisation": "Eagraíocht",
"Group": "Grúpa"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "אזהרה: קישור מסוכן אפשרי",
"Mutual": "הֲדָדִי",
"Bot": "רוֹבּוֹט",
"Show Map": "הצג מפה"
"Show Map": "הצג מפה",
"Organisation": "אִרגוּן",
"Group": "קְבוּצָה"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "चेतावनी: संभावित खतरनाक लिंक",
"Mutual": "आपसी",
"Bot": "रोबोट",
"Show Map": "नक्शा दिखाएं"
"Show Map": "नक्शा दिखाएं",
"Organisation": "संगठन",
"Group": "समूह"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Attenzione: possibile collegamento pericoloso",
"Mutual": "Reciproca",
"Bot": "Bot",
"Show Map": "Mostra mappa"
"Show Map": "Mostra mappa",
"Organisation": "Organizzazione",
"Group": "Gruppo"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "警告: 危険なリンクの可能性があります",
"Mutual": "共通の",
"Bot": "ロボット",
"Show Map": "地図を表示"
"Show Map": "地図を表示",
"Organisation": "組織",
"Group": "グループ"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "경고: 위험한 링크가 있을 수 있습니다",
"Mutual": "상호간의",
"Bot": "기계 인간",
"Show Map": "지도 표시"
"Show Map": "지도 표시",
"Organisation": "조직",
"Group": "그룹"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Hişyarî: Girêdaneke gengaz a xeternak",
"Mutual": "Beramberî",
"Bot": "Bot",
"Show Map": "Nexşeya Nîşan Bide"
"Show Map": "Nexşeya Nîşan Bide",
"Organisation": "Sazûman",
"Group": "Kom"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Waarschuwing: Mogelijk gevaarlijke link",
"Mutual": "Wederzijds",
"Bot": "Bot",
"Show Map": "Kaart weergeven"
"Show Map": "Kaart weergeven",
"Organisation": "Organisatie",
"Group": "Groep"
}

View File

@ -761,5 +761,7 @@
"Warning: Possible dangerous link": "Warning: Possible dangerous link",
"Mutual": "Mutual",
"Bot": "Bot",
"Show Map": "Show Map"
"Show Map": "Show Map",
"Organisation": "Organisation",
"Group": "Group"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Ostrzeżenie: Możliwe niebezpieczne łącze",
"Mutual": "Wzajemne",
"Bot": "Bot",
"Show Map": "Pokaż mapę"
"Show Map": "Pokaż mapę",
"Organisation": "Organizacja",
"Group": "Grupa"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Aviso: possível ligação perigosa",
"Mutual": "Mútua",
"Bot": "Robô",
"Show Map": "Mostrar mapa"
"Show Map": "Mostrar mapa",
"Organisation": "Organização",
"Group": "Grupo"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Внимание: возможная опасная ссылка",
"Mutual": "Взаимный",
"Bot": "Робот",
"Show Map": "Показать карту"
"Show Map": "Показать карту",
"Organisation": "Организация",
"Group": "Группа"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Onyo: Kiungo hatari kinachowezekana",
"Mutual": "Kuheshimiana",
"Bot": "Roboti",
"Show Map": "Onyesha Ramani"
"Show Map": "Onyesha Ramani",
"Organisation": "Shirika",
"Group": "Kundi"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Uyarı: Olası tehlikeli bağlantı",
"Mutual": "Karşılıklı",
"Bot": "Bot",
"Show Map": "Haritayı Göster"
"Show Map": "Haritayı Göster",
"Organisation": "Organizasyon",
"Group": "Grup"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "Попередження: Можливе небезпечне посилання",
"Mutual": "Взаємне",
"Bot": "Робот",
"Show Map": "Показати карту"
"Show Map": "Показати карту",
"Organisation": "Організація",
"Group": "Група"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "ווארענונג: מעגלעכער געפערלעכער פארבינדונג",
"Mutual": "קעגנצייַטיק",
"Bot": "ראָבאָט",
"Show Map": "ווייַזן מאַפּע"
"Show Map": "ווייַזן מאַפּע",
"Organisation": "אָרגאַניזאַציע",
"Group": "גרופּע"
}

View File

@ -765,5 +765,7 @@
"Warning: Possible dangerous link": "警告:可能存在危险链接",
"Mutual": "相互的",
"Bot": "机器人",
"Show Map": "显示地图"
"Show Map": "显示地图",
"Organisation": "组织",
"Group": "团体"
}

View File

@ -1580,8 +1580,12 @@ def _get_post_title_announce_html(base_dir: str,
actor_type = get_actor_type(base_dir, attributed_to, person_cache)
bot_prefix = ''
if actor_type:
if actor_type != 'Person' or \
announce_nickname in chatbot_nicknames():
if actor_type in ('Organization', 'Organisation'):
bot_prefix = '<b>[' + translate['Organisation'] + ']</b> '
elif actor_type == 'Group':
bot_prefix = '<b>[' + translate['Group'] + ']</b> '
elif (actor_type != 'Person' or
announce_nickname in chatbot_nicknames()):
bot_prefix = '<b>[' + translate['Bot'] + ']</b> '
_log_post_timing(enable_timing_log, post_start_time, '13.3.1')
@ -1736,8 +1740,12 @@ def _get_reply_html(translate: {},
reply_nickname = ''
if '@' in reply_nickname:
reply_nickname = reply_handle.split('@')[0]
if actor_type != 'Person' or \
reply_nickname in chatbot_nicknames():
if actor_type in ('Organization', 'Organisation'):
bot_prefix = '<b>[' + translate['Organisation'] + ']</b> '
elif actor_type == 'Group':
bot_prefix = '<b>[' + translate['Group'] + ']</b> '
elif (actor_type != 'Person' or
reply_nickname in chatbot_nicknames()):
bot_prefix = '<b>[' + translate['Bot'] + ']</b> '
replying_to_str = _replying_to_with_scope(post_json_object, translate)
@ -2699,8 +2707,12 @@ def individual_post_as_html(signing_priv_key_pem: str,
actor_type = get_actor_type(base_dir, post_actor, person_cache)
bot_prefix = ''
if actor_type:
if actor_type != 'Person' or \
actor_nickname in chatbot_nicknames():
if actor_type in ('Organization', 'Organisation'):
bot_prefix = '<b>[' + translate['Organisation'] + ']</b> '
elif actor_type == 'Group':
bot_prefix = '<b>[' + translate['Group'] + ']</b> '
elif (actor_type != 'Person' or
actor_nickname in chatbot_nicknames()):
bot_prefix = '<b>[' + translate['Bot'] + ']</b> '
if display_name:

View File

@ -366,8 +366,15 @@ def html_profile_after_search(authorized: bool,
# is this a bot account?
if profile_json.get('type'):
if isinstance(profile_json['type'], str):
if profile_json['type'] != 'Person' or \
search_nickname in chatbot_nicknames():
if profile_json['type'] in ('Organization', 'Organisation'):
display_name = \
'<b>[' + translate['Organisation'] + ']</b> ' + \
display_name
elif profile_json['type'] == 'Group':
display_name = \
'<b>[' + translate['Group'] + ']</b> ' + display_name
elif (profile_json['type'] != 'Person' or
search_nickname in chatbot_nicknames()):
display_name = \
'<b>[' + translate['Bot'] + ']</b> ' + display_name
@ -1203,8 +1210,15 @@ def html_profile(signing_priv_key_pem: str,
# is this a bot account?
if profile_json.get('type'):
if isinstance(profile_json['type'], str):
if profile_json['type'] != 'Person' or \
nickname in chatbot_nicknames():
if profile_json['type'] in ('Organization', 'Organisation'):
display_name = \
'<b>[' + translate['Organisation'] + ']</b> ' + \
display_name
elif profile_json['type'] == 'Group':
display_name = \
'<b>[' + translate['Group'] + ']</b> ' + display_name
elif (profile_json['type'] != 'Person' or
nickname in chatbot_nicknames()):
display_name = \
'<b>[' + translate['Bot'] + ']</b> ' + display_name
@ -3943,8 +3957,15 @@ def _individual_follow_as_html(signing_priv_key_pem: str,
actor_nickname, domain,
display_name, False, translate)
actor_type = get_actor_type(base_dir, follow_url, person_cache)
if actor_type != 'Person' or \
actor_nickname in chatbot_nicknames():
if actor_type in ('Organization', 'Organisation'):
display_name = \
'<b>[' + translate['Organisation'] + ']</b> ' + \
display_name
elif actor_type == 'Group':
display_name = \
'<b>[' + translate['Group'] + ']</b> ' + display_name
elif (actor_type != 'Person' or
actor_nickname in chatbot_nicknames()):
display_name = \
'<b>[' + translate['Bot'] + ']</b> ' + display_name
title_str = display_name