Show profile summary on replies for improved context

main
Bob Mottram 2023-11-24 14:25:57 +00:00
parent 9491d06a7f
commit ef3c241e85
28 changed files with 89 additions and 27 deletions

View File

@ -640,5 +640,6 @@
"places": "أماكن",
"offline": "غير متصل على الانترنت",
"Mutuals": "التعاضد",
"Public replies default to unlisted scope": "الردود العامة افتراضية للنطاق غير المدرج"
"Public replies default to unlisted scope": "الردود العامة افتراضية للنطاق غير المدرج",
"About the author": "عن المؤلف"
}

View File

@ -640,5 +640,6 @@
"places": "জায়গা",
"offline": "অফলাইন",
"Mutuals": "পারস্পরিক",
"Public replies default to unlisted scope": "অতালিকাভুক্ত সুযোগে সর্বজনীন উত্তর ডিফল্ট"
"Public replies default to unlisted scope": "অতালিকাভুক্ত সুযোগে সর্বজনীন উত্তর ডিফল্ট",
"About the author": "লেখক সম্পর্কে"
}

View File

@ -640,5 +640,6 @@
"places": "llocs",
"offline": "fora de línia",
"Mutuals": "Mútues",
"Public replies default to unlisted scope": "Les respostes públiques són per defecte a l'abast no llistat"
"Public replies default to unlisted scope": "Les respostes públiques són per defecte a l'abast no llistat",
"About the author": "Sobre lautor"
}

View File

@ -640,5 +640,6 @@
"places": "lleoedd",
"offline": "all-lein",
"Mutuals": "Cydfuddiol",
"Public replies default to unlisted scope": "Ymatebion cyhoeddus rhagosodedig i gwmpas heb ei restru"
"Public replies default to unlisted scope": "Ymatebion cyhoeddus rhagosodedig i gwmpas heb ei restru",
"About the author": "Am yr awdur"
}

View File

@ -640,5 +640,6 @@
"places": "setzt",
"offline": "offline",
"Mutuals": "Gegenseitigkeitsgesellschaften",
"Public replies default to unlisted scope": "Öffentliche Antworten werden standardmäßig auf den nicht aufgeführten Bereich übertragen"
"Public replies default to unlisted scope": "Öffentliche Antworten werden standardmäßig auf den nicht aufgeführten Bereich übertragen",
"About the author": "Über den Autor"
}

View File

@ -640,5 +640,6 @@
"places": "μέρη",
"offline": "εκτός σύνδεσης",
"Mutuals": "Αμοιβαία",
"Public replies default to unlisted scope": "Οι δημόσιες απαντήσεις από προεπιλογή στο μη καταχωρισμένο εύρος"
"Public replies default to unlisted scope": "Οι δημόσιες απαντήσεις από προεπιλογή στο μη καταχωρισμένο εύρος",
"About the author": "Σχετικά με τον Συγγραφέα"
}

View File

@ -640,5 +640,6 @@
"places": "places",
"offline": "offline",
"Mutuals": "Mutuals",
"Public replies default to unlisted scope": "Public replies default to unlisted scope"
"Public replies default to unlisted scope": "Public replies default to unlisted scope",
"About the author": "About the author"
}

View File

@ -640,5 +640,6 @@
"places": "lugares",
"offline": "desconectada",
"Mutuals": "Mutuales",
"Public replies default to unlisted scope": "Las respuestas públicas tienen por defecto un alcance no listado"
"Public replies default to unlisted scope": "Las respuestas públicas tienen por defecto un alcance no listado",
"About the author": "Sobre el Autor"
}

View File

@ -640,5 +640,6 @@
"places": "مکان ها",
"offline": "آفلاین",
"Mutuals": "متقابل",
"Public replies default to unlisted scope": "پاسخ‌های عمومی به‌طور پیش‌فرض به محدوده فهرست نشده است"
"Public replies default to unlisted scope": "پاسخ‌های عمومی به‌طور پیش‌فرض به محدوده فهرست نشده است",
"About the author": "درباره نویسنده"
}

View File

@ -640,5 +640,6 @@
"places": "lieux",
"offline": "hors ligne",
"Mutuals": "Mutuelles",
"Public replies default to unlisted scope": "Les réponses publiques ont par défaut une portée non répertoriée"
"Public replies default to unlisted scope": "Les réponses publiques ont par défaut une portée non répertoriée",
"About the author": "A propos de l'auteur"
}

View File

@ -640,5 +640,6 @@
"places": "áiteanna",
"offline": "as líne",
"Mutuals": "Comhpháirteacha",
"Public replies default to unlisted scope": "Freagraí poiblí réamhshocraithe ar scóip neamhliostaithe"
"Public replies default to unlisted scope": "Freagraí poiblí réamhshocraithe ar scóip neamhliostaithe",
"About the author": "Faoin tÚdar"
}

View File

@ -640,5 +640,6 @@
"places": "מקומות",
"offline": "במצב לא מקוון",
"Mutuals": "הדדיות",
"Public replies default to unlisted scope": "תשובות ציבוריות כברירת מחדל להיקף לא רשום"
"Public replies default to unlisted scope": "תשובות ציבוריות כברירת מחדל להיקף לא רשום",
"About the author": "על הסופר"
}

View File

@ -640,5 +640,6 @@
"places": "स्थानों",
"offline": "ऑफलाइन",
"Mutuals": "पारस्परिक",
"Public replies default to unlisted scope": "सार्वजनिक उत्तर डिफ़ॉल्ट रूप से असूचीबद्ध दायरे में आते हैं"
"Public replies default to unlisted scope": "सार्वजनिक उत्तर डिफ़ॉल्ट रूप से असूचीबद्ध दायरे में आते हैं",
"About the author": "लेखक के बारे में"
}

View File

@ -640,5 +640,6 @@
"places": "luoghi",
"offline": "disconnessa",
"Mutuals": "Mutui",
"Public replies default to unlisted scope": "Per impostazione predefinita, le risposte pubbliche hanno un ambito non elencato"
"Public replies default to unlisted scope": "Per impostazione predefinita, le risposte pubbliche hanno un ambito non elencato",
"About the author": "Circa l'autore"
}

View File

@ -640,5 +640,6 @@
"places": "場所",
"offline": "オフライン",
"Mutuals": "相互作用",
"Public replies default to unlisted scope": "パブリック返信はデフォルトで非公開スコープになります"
"Public replies default to unlisted scope": "パブリック返信はデフォルトで非公開スコープになります",
"About the author": "著者について"
}

View File

@ -640,5 +640,6 @@
"places": "장소",
"offline": "오프라인",
"Mutuals": "상호",
"Public replies default to unlisted scope": "공개 답글은 기본적으로 비공개 범위로 설정됩니다."
"Public replies default to unlisted scope": "공개 답글은 기본적으로 비공개 범위로 설정됩니다.",
"About the author": "저자에 대해"
}

View File

@ -640,5 +640,6 @@
"places": "cihên",
"offline": "offline",
"Mutuals": "Mutuals",
"Public replies default to unlisted scope": "Bersivên gelemperî ji bo çarçoveyek nelîstekirî xwerû dide"
"Public replies default to unlisted scope": "Bersivên gelemperî ji bo çarçoveyek nelîstekirî xwerû dide",
"About the author": "Di derbarê nivîskarê de"
}

View File

@ -640,5 +640,6 @@
"places": "plaatsen",
"offline": "offline",
"Mutuals": "Mutualiteiten",
"Public replies default to unlisted scope": "Openbare antwoorden hebben standaard een niet-vermeld bereik"
"Public replies default to unlisted scope": "Openbare antwoorden hebben standaard een niet-vermeld bereik",
"About the author": "Over de auteur"
}

View File

@ -636,5 +636,6 @@
"places": "places",
"offline": "offline",
"Mutuals": "Mutuals",
"Public replies default to unlisted scope": "Public replies default to unlisted scope"
"Public replies default to unlisted scope": "Public replies default to unlisted scope",
"About the author": "About the author"
}

View File

@ -640,5 +640,6 @@
"places": "miejsca",
"offline": "nieaktywny",
"Mutuals": "Wzajemne relacje",
"Public replies default to unlisted scope": "Odpowiedzi publiczne domyślnie mają zakres niepubliczny"
"Public replies default to unlisted scope": "Odpowiedzi publiczne domyślnie mają zakres niepubliczny",
"About the author": "O autorze"
}

View File

@ -640,5 +640,6 @@
"places": "lugares",
"offline": "desligada",
"Mutuals": "Mútuas",
"Public replies default to unlisted scope": "As respostas públicas são padronizadas para escopo não listado"
"Public replies default to unlisted scope": "As respostas públicas são padronizadas para escopo não listado",
"About the author": "Sobre o autor"
}

View File

@ -640,5 +640,6 @@
"places": "места",
"offline": "не в сети",
"Mutuals": "Взаимные отношения",
"Public replies default to unlisted scope": "Публичные ответы по умолчанию имеют скрытую область действия."
"Public replies default to unlisted scope": "Публичные ответы по умолчанию имеют скрытую область действия.",
"About the author": "Об авторе"
}

View File

@ -640,5 +640,6 @@
"places": "maeneo",
"offline": "nje ya mtandao",
"Mutuals": "Kuheshimiana",
"Public replies default to unlisted scope": "Majibu ya umma kwa chaguomsingi kwa upeo ambao haujaorodheshwa"
"Public replies default to unlisted scope": "Majibu ya umma kwa chaguomsingi kwa upeo ambao haujaorodheshwa",
"About the author": "Kuhusu mwandishi"
}

View File

@ -640,5 +640,6 @@
"places": "yer",
"offline": "çevrimdışı",
"Mutuals": "Karşılıklar",
"Public replies default to unlisted scope": "Genel yanıtlar varsayılan olarak liste dışı kapsama alınır"
"Public replies default to unlisted scope": "Genel yanıtlar varsayılan olarak liste dışı kapsama alınır",
"About the author": "Yazar hakkında"
}

View File

@ -640,5 +640,6 @@
"places": "місць",
"offline": "офлайн",
"Mutuals": "Мутуали",
"Public replies default to unlisted scope": "Загальнодоступні відповіді за умовчанням мають приватний обсяг"
"Public replies default to unlisted scope": "Загальнодоступні відповіді за умовчанням мають приватний обсяг",
"About the author": "Про автора"
}

View File

@ -640,5 +640,6 @@
"places": "ערטער",
"offline": "אָפפלינע",
"Mutuals": "קעגנצייַטיק",
"Public replies default to unlisted scope": "ציבור ענטפֿערס פעליקייַט צו אַנליסטעד פאַרנעם"
"Public replies default to unlisted scope": "ציבור ענטפֿערס פעליקייַט צו אַנליסטעד פאַרנעם",
"About the author": "וועגן דעם מחבר"
}

View File

@ -640,5 +640,6 @@
"places": "地方",
"offline": "离线",
"Mutuals": "互助基金",
"Public replies default to unlisted scope": "公开回复默认为不公开范围"
"Public replies default to unlisted scope": "公开回复默认为不公开范围",
"About the author": "关于作者"
}

View File

@ -8,6 +8,7 @@ __status__ = "Production"
__module_group__ = "Web Interface"
import os
from utils import dangerous_markup
from utils import remove_html
from utils import get_content_from_post
from utils import has_object_dict
@ -25,6 +26,7 @@ from utils import get_category_types
from utils import get_account_timezone
from utils import get_supported_languages
from utils import text_in_file
from utils import get_attributed_to
from webapp_utils import edit_check_box
from webapp_utils import get_buy_links
from webapp_utils import html_following_data_list
@ -41,6 +43,7 @@ from webapp_post import individual_post_as_html
from maps import get_map_preferences_url
from maps import get_map_preferences_coords
from maps import get_location_from_post
from cache import get_person_from_cache
def _html_new_post_drop_down(scope_icon: str, scope_description: str,
@ -435,6 +438,38 @@ def html_new_post(edit_post_params: {},
bold_reading, dogwhistles,
minimize_all_images, None,
buy_sites)
# about the author
if has_object_dict(post_json_object):
if post_json_object['object'].get('attributedTo'):
attrib_field = \
post_json_object['object']['attributedTo']
attrib_url = get_attributed_to(attrib_field)
if attrib_url:
reply_to_actor = \
get_person_from_cache(base_dir,
attrib_url,
person_cache)
if reply_to_actor:
summary = \
reply_to_actor['summary']
if summary:
if not dangerous_markup(summary,
False, []):
reply_to_description = \
summary
else:
reply_to_description = \
remove_html(summary)
about_author_str = \
translate['About the author']
new_post_text += \
'<div class="container">\n' + \
' <div class=' + \
'"post-title">\n' + \
' ' + about_author_str + \
'\n </div>\n' + \
' ' + reply_to_description + \
'\n</div>\n'
reply_str = '<input type="hidden" ' + \
'name="replyTo" value="' + in_reply_to + '">\n'