Indicate scope of replies

merge-requests/30/head
Bob Mottram 2023-02-09 13:26:56 +00:00
parent 4929598d0a
commit 1cb2e62070
27 changed files with 100 additions and 11 deletions

View File

@ -194,6 +194,9 @@
"Ask a question": "طرح سؤال", "Ask a question": "طرح سؤال",
"Possible answers": "إجابات ممكنة", "Possible answers": "إجابات ممكنة",
"replying to": "الرد على", "replying to": "الرد على",
"publicly replying to": "الرد علنًا على",
"replying to followers": "الرد على المتابعين",
"replying unlisted": "الرد غير مدرج",
"replying to themselves": "الرد على أنفسهم", "replying to themselves": "الرد على أنفسهم",
"announces": "يعلن", "announces": "يعلن",
"Previous month": "الشهر الماضى", "Previous month": "الشهر الماضى",

View File

@ -194,6 +194,9 @@
"Ask a question": "প্রশ্ন জিজ্ঞাসা কর", "Ask a question": "প্রশ্ন জিজ্ঞাসা কর",
"Possible answers": "সম্ভাব্য উত্তর", "Possible answers": "সম্ভাব্য উত্তর",
"replying to": "এর জবাব", "replying to": "এর জবাব",
"publicly replying to": "প্রকাশ্যে উত্তর দিচ্ছেন",
"replying to followers": "অনুগামীদের উত্তর",
"replying unlisted": "অতালিকাভুক্ত উত্তর",
"replying to themselves": "নিজেদের জবাব দিচ্ছে", "replying to themselves": "নিজেদের জবাব দিচ্ছে",
"announces": "ঘোষণা করে", "announces": "ঘোষণা করে",
"Previous month": "পূর্ববর্তী মাস", "Previous month": "পূর্ববর্তী মাস",

View File

@ -194,6 +194,9 @@
"Ask a question": "Fer una pregunta", "Ask a question": "Fer una pregunta",
"Possible answers": "Respostes possibles", "Possible answers": "Respostes possibles",
"replying to": "responent", "replying to": "responent",
"publicly replying to": "responent públicament",
"replying to followers": "responent als seguidors",
"replying unlisted": "responent sense llistar",
"replying to themselves": "responent-se", "replying to themselves": "responent-se",
"announces": "anuncia", "announces": "anuncia",
"Previous month": "Mes anterior", "Previous month": "Mes anterior",

View File

@ -194,6 +194,9 @@
"Ask a question": "Gofyn cwestiwn", "Ask a question": "Gofyn cwestiwn",
"Possible answers": "Atebion posib", "Possible answers": "Atebion posib",
"replying to": "ateb i", "replying to": "ateb i",
"publicly replying to": "yn ateb yn gyhoeddus",
"replying to followers": "ateb i ddilynwyr",
"replying unlisted": "ateb heb ei restru",
"replying to themselves": "ateb iddynt eu hunain", "replying to themselves": "ateb iddynt eu hunain",
"announces": "yn cyhoeddi", "announces": "yn cyhoeddi",
"Previous month": "Y mis blaenorol", "Previous month": "Y mis blaenorol",

View File

@ -194,6 +194,9 @@
"Ask a question": "Stelle eine Frage", "Ask a question": "Stelle eine Frage",
"Possible answers": "Mögliche Antworten", "Possible answers": "Mögliche Antworten",
"replying to": "antworten auf", "replying to": "antworten auf",
"publicly replying to": "öffentlich antworten",
"replying to followers": "followern antworten",
"replying unlisted": "antworten nicht aufgeführt",
"replying to themselves": "sich selbst antworten", "replying to themselves": "sich selbst antworten",
"announces": "kündigt an", "announces": "kündigt an",
"Previous month": "Vorheriger Monat", "Previous month": "Vorheriger Monat",

View File

@ -194,6 +194,9 @@
"Ask a question": "Κάνε μια ερώτηση", "Ask a question": "Κάνε μια ερώτηση",
"Possible answers": "Πιθανές απαντήσεις", "Possible answers": "Πιθανές απαντήσεις",
"replying to": "απαντώντας σε", "replying to": "απαντώντας σε",
"publicly replying to": "απαντώντας δημόσια σε",
"replying to followers": "απαντώντας στους ακόλουθους",
"replying unlisted": "απαντώντας εκτός λίστας",
"replying to themselves": "απαντώντας στον εαυτό τους", "replying to themselves": "απαντώντας στον εαυτό τους",
"announces": "ανακοινώνει", "announces": "ανακοινώνει",
"Previous month": "Προηγούμενος μήνας", "Previous month": "Προηγούμενος μήνας",

View File

@ -194,6 +194,9 @@
"Ask a question": "Ask a question", "Ask a question": "Ask a question",
"Possible answers": "Possible answers", "Possible answers": "Possible answers",
"replying to": "replying to", "replying to": "replying to",
"publicly replying to": "publicly replying to",
"replying to followers": "replying to followers",
"replying unlisted": "replying to unlisted",
"replying to themselves": "replying to themselves", "replying to themselves": "replying to themselves",
"announces": "announces", "announces": "announces",
"Previous month": "Previous month", "Previous month": "Previous month",

View File

@ -194,6 +194,9 @@
"Ask a question": "Haz una pregunta", "Ask a question": "Haz una pregunta",
"Possible answers": "Respuestas posibles", "Possible answers": "Respuestas posibles",
"replying to": "respondiendo a", "replying to": "respondiendo a",
"publicly replying to": "respondiendo públicamente a",
"replying to followers": "en respuesta a las seguidoras",
"replying unlisted": "respondiendo no listada",
"replying to themselves": "respondiéndose a sí mismo", "replying to themselves": "respondiéndose a sí mismo",
"announces": "anuncia", "announces": "anuncia",
"Previous month": "Mes anterior", "Previous month": "Mes anterior",

View File

@ -194,6 +194,9 @@
"Ask a question": "یه سوال بپرس", "Ask a question": "یه سوال بپرس",
"Possible answers": "پاسخ های ممکن", "Possible answers": "پاسخ های ممکن",
"replying to": "در حال پاسخ دادن به", "replying to": "در حال پاسخ دادن به",
"publicly replying to": "علنی پاسخ دادن به",
"replying to followers": "پاسخ به دنبال کنندگان",
"replying unlisted": "در حال پاسخ به فهرست نشده",
"replying to themselves": "به خودشان پاسخ می دهند", "replying to themselves": "به خودشان پاسخ می دهند",
"announces": "اعلام می کند", "announces": "اعلام می کند",
"Previous month": "ماه گذشته", "Previous month": "ماه گذشته",

View File

@ -194,6 +194,9 @@
"Ask a question": "Poser une question", "Ask a question": "Poser une question",
"Possible answers": "Des réponses possibles", "Possible answers": "Des réponses possibles",
"replying to": "répondre à", "replying to": "répondre à",
"publicly replying to": "répondre publiquement à",
"replying to followers": "répondre aux abonnés",
"replying unlisted": "réponse non répertoriée",
"replying to themselves": "se répondre à eux-mêmes", "replying to themselves": "se répondre à eux-mêmes",
"announces": "annonce", "announces": "annonce",
"Previous month": "Le mois précédent", "Previous month": "Le mois précédent",

View File

@ -194,6 +194,9 @@
"Ask a question": "Ceist a chur", "Ask a question": "Ceist a chur",
"Possible answers": "Freagraí féideartha", "Possible answers": "Freagraí féideartha",
"replying to": "ag freagairt", "replying to": "ag freagairt",
"publicly replying to": "ag freagairt go poiblí ar",
"replying to followers": "ag freagairt do leantóirí",
"replying unlisted": "freagra neamhliostaithe",
"replying to themselves": "ag freagairt dóibh féin", "replying to themselves": "ag freagairt dóibh féin",
"announces": "fógraíonn", "announces": "fógraíonn",
"Previous month": "An mhí roimhe seo", "Previous month": "An mhí roimhe seo",

View File

@ -194,6 +194,9 @@
"Ask a question": "प्रश्न पूछें", "Ask a question": "प्रश्न पूछें",
"Possible answers": "संभावित उत्तर", "Possible answers": "संभावित उत्तर",
"replying to": "करने के लिए जवाब दे", "replying to": "करने के लिए जवाब दे",
"publicly replying to": "सार्वजनिक रूप से जवाब दे रहा है",
"replying to followers": "अनुयायियों को जवाब देना",
"replying unlisted": "असूचीबद्ध उत्तर दे रहा है",
"replying to themselves": "खुद को जवाब दे", "replying to themselves": "खुद को जवाब दे",
"announces": "की घोषणा", "announces": "की घोषणा",
"Previous month": "पिछ्ला महिना", "Previous month": "पिछ्ला महिना",

View File

@ -194,6 +194,9 @@
"Ask a question": "Fai una domanda", "Ask a question": "Fai una domanda",
"Possible answers": "Possibili risposte", "Possible answers": "Possibili risposte",
"replying to": "rispondendo a", "replying to": "rispondendo a",
"publicly replying to": "rispondendo pubblicamente a",
"replying to followers": "rispondere ai follower",
"replying unlisted": "rispondendo non in elenco",
"replying to themselves": "rispondendo a se stessi", "replying to themselves": "rispondendo a se stessi",
"announces": "annuncia", "announces": "annuncia",
"Previous month": "Il mese scorso", "Previous month": "Il mese scorso",

View File

@ -194,6 +194,9 @@
"Ask a question": "質問する", "Ask a question": "質問する",
"Possible answers": "可能な答え", "Possible answers": "可能な答え",
"replying to": "に返信する", "replying to": "に返信する",
"publicly replying to": "公に返信する",
"replying to followers": "フォロワーへの返信",
"replying unlisted": "リストにない返信",
"replying to themselves": "自分に返信する", "replying to themselves": "自分に返信する",
"announces": "発表する", "announces": "発表する",
"Previous month": "前月", "Previous month": "前月",

View File

@ -194,6 +194,9 @@
"Ask a question": "질문하기", "Ask a question": "질문하기",
"Possible answers": "가능한 답변", "Possible answers": "가능한 답변",
"replying to": "답장", "replying to": "답장",
"publicly replying to": "공개적으로 답장",
"replying to followers": "팔로워에게 회신",
"replying unlisted": "목록에 없는 회신",
"replying to themselves": "스스로에게 답장", "replying to themselves": "스스로에게 답장",
"announces": "발표하다", "announces": "발표하다",
"Previous month": "지난달", "Previous month": "지난달",

View File

@ -194,6 +194,9 @@
"Ask a question": "Pirsek bipirsin", "Ask a question": "Pirsek bipirsin",
"Possible answers": "Bersivên gengaz", "Possible answers": "Bersivên gengaz",
"replying to": "bersivandin", "replying to": "bersivandin",
"publicly replying to": "bi raya giştî re bersiv dide",
"replying to followers": "bersiva şagirtan dide",
"replying unlisted": "bersivê nelîste",
"replying to themselves": "bersiva xwe didin", "replying to themselves": "bersiva xwe didin",
"announces": "îlan dike", "announces": "îlan dike",
"Previous month": "Meha berê", "Previous month": "Meha berê",

View File

@ -194,6 +194,9 @@
"Ask a question": "Een vraag stellen", "Ask a question": "Een vraag stellen",
"Possible answers": "Mogelijke antwoorden", "Possible answers": "Mogelijke antwoorden",
"replying to": "reageren op", "replying to": "reageren op",
"publicly replying to": "openbaar beantwoorden",
"replying to followers": "reageren op volgers",
"replying unlisted": "niet vermeld reageren",
"replying to themselves": "zichzelf beantwoorden", "replying to themselves": "zichzelf beantwoorden",
"announces": "kondigt aan", "announces": "kondigt aan",
"Previous month": "Vorige maand", "Previous month": "Vorige maand",

View File

@ -190,6 +190,9 @@
"Ask a question": "Ask a question", "Ask a question": "Ask a question",
"Possible answers": "Possible answers", "Possible answers": "Possible answers",
"replying to": "replying to", "replying to": "replying to",
"publicly replying to": "publicly replying to",
"replying to followers": "replying to followers",
"replying unlisted": "replying unlisted",
"replying to themselves": "replying to themselves", "replying to themselves": "replying to themselves",
"announces": "announces", "announces": "announces",
"Previous month": "Previous month", "Previous month": "Previous month",

View File

@ -194,6 +194,9 @@
"Ask a question": "Zadać pytanie", "Ask a question": "Zadać pytanie",
"Possible answers": "Możliwe odpowiedzi", "Possible answers": "Możliwe odpowiedzi",
"replying to": "odpowiadając na", "replying to": "odpowiadając na",
"publicly replying to": "publicznie odpowiadac na",
"replying to followers": "odpowiadanie obserwującym",
"replying unlisted": "odpowiadanie niepubliczne",
"replying to themselves": "odpowiadając sobie", "replying to themselves": "odpowiadając sobie",
"announces": "ogłasza", "announces": "ogłasza",
"Previous month": "Poprzedni miesiac", "Previous month": "Poprzedni miesiac",

View File

@ -194,6 +194,9 @@
"Ask a question": "Faça uma pergunta", "Ask a question": "Faça uma pergunta",
"Possible answers": "Possíveis respostas", "Possible answers": "Possíveis respostas",
"replying to": "respondendo a", "replying to": "respondendo a",
"publicly replying to": "respondendo publicamente a",
"replying to followers": "respondendo aos seguidores",
"replying unlisted": "respondendo não listado",
"replying to themselves": "respondendo a si mesmos", "replying to themselves": "respondendo a si mesmos",
"announces": "anuncia", "announces": "anuncia",
"Previous month": "Mês anterior", "Previous month": "Mês anterior",

View File

@ -194,6 +194,9 @@
"Ask a question": "Задайте вопрос", "Ask a question": "Задайте вопрос",
"Possible answers": "Возможные ответы", "Possible answers": "Возможные ответы",
"replying to": "отвечая на", "replying to": "отвечая на",
"publicly replying to": "публично отвечая на",
"replying to followers": "отвечаю подписчикам",
"replying unlisted": "ответ не в списке",
"replying to themselves": "отвечая на себя", "replying to themselves": "отвечая на себя",
"announces": "анонсов", "announces": "анонсов",
"Previous month": "Предыдущий месяц", "Previous month": "Предыдущий месяц",

View File

@ -194,6 +194,9 @@
"Ask a question": "Uliza Swali", "Ask a question": "Uliza Swali",
"Possible answers": "Majibu yawezekana", "Possible answers": "Majibu yawezekana",
"replying to": "kujibu kwa", "replying to": "kujibu kwa",
"publicly replying to": "kujibu hadharani",
"replying to followers": "kujibu wafuasi",
"replying unlisted": "kujibu bila kuorodheshwa",
"replying to themselves": "kujibu wenyewe", "replying to themselves": "kujibu wenyewe",
"announces": "inatangaza", "announces": "inatangaza",
"Previous month": "Mwezi uliopita", "Previous month": "Mwezi uliopita",

View File

@ -194,6 +194,9 @@
"Ask a question": "Bir soru sor", "Ask a question": "Bir soru sor",
"Possible answers": "Olası cevaplar", "Possible answers": "Olası cevaplar",
"replying to": "yanıtlamak", "replying to": "yanıtlamak",
"publicly replying to": "herkese açık olarak yanıtlama",
"replying to followers": "takipçilere cevap verme",
"replying unlisted": "liste dışı yanıtlama",
"replying to themselves": "kendilerine cevap vermek", "replying to themselves": "kendilerine cevap vermek",
"announces": "duyurur", "announces": "duyurur",
"Previous month": "Geçtiğimiz ay", "Previous month": "Geçtiğimiz ay",

View File

@ -194,6 +194,9 @@
"Ask a question": "Задайте питання", "Ask a question": "Задайте питання",
"Possible answers": "Можливі відповіді", "Possible answers": "Можливі відповіді",
"replying to": "відповідаючи на", "replying to": "відповідаючи на",
"publicly replying to": "публічно відповідаючи на",
"replying to followers": "відповідаючи підписникам",
"replying unlisted": "відповідати не в списку",
"replying to themselves": "відповідаючи собі", "replying to themselves": "відповідаючи собі",
"announces": "оголошує", "announces": "оголошує",
"Previous month": "Попередній місяць", "Previous month": "Попередній місяць",

View File

@ -194,6 +194,9 @@
"Ask a question": "פרעגן אַ קשיא", "Ask a question": "פרעגן אַ קשיא",
"Possible answers": "מעגלעך ענטפֿערס", "Possible answers": "מעגלעך ענטפֿערס",
"replying to": "ענטפערן צו", "replying to": "ענטפערן צו",
"publicly replying to": "עפנטלעך ענטפער צו",
"replying to followers": "ענטפער צו אנהענגערס",
"replying unlisted": "ענטפערן אַנליסטיד",
"replying to themselves": "ענטפערן צו זיך", "replying to themselves": "ענטפערן צו זיך",
"announces": "אַנאַונסיז", "announces": "אַנאַונסיז",
"Previous month": "פֿריִערדיקע חודש", "Previous month": "פֿריִערדיקע חודש",

View File

@ -194,6 +194,9 @@
"Ask a question": "问一个问题", "Ask a question": "问一个问题",
"Possible answers": "可能的答案", "Possible answers": "可能的答案",
"replying to": "回覆", "replying to": "回覆",
"publicly replying to": "公开回复",
"replying to followers": "回复关注者",
"replying unlisted": "回复不公开",
"replying to themselves": "回覆自己", "replying to themselves": "回覆自己",
"announces": "宣布", "announces": "宣布",
"Previous month": "前一个月", "Previous month": "前一个月",

View File

@ -1383,14 +1383,27 @@ def _reply_to_yourself_html(translate: {}) -> str:
return title_str return title_str
def _replying_to_with_scope(post_json_object: {}, translate: {}) -> str:
"""Returns the replying to string
"""
replying_to_str = 'replying to'
if is_followers_post(post_json_object):
replying_to_str = 'replying to followers'
elif is_public_post(post_json_object):
replying_to_str = 'publicly replying to'
elif is_unlisted_post(post_json_object):
replying_to_str = 'replying unlisted'
if translate.get(replying_to_str):
replying_to_str = translate[replying_to_str]
return replying_to_str
def _reply_to_unknown_html(translate: {}, def _reply_to_unknown_html(translate: {},
post_json_object: {}, post_json_object: {},
nickname: str) -> str: nickname: str) -> str:
"""Returns the html title for a reply to an unknown handle """Returns the html title for a reply to an unknown handle
""" """
replying_to_str = 'replying to' replying_to_str = _replying_to_with_scope(post_json_object, translate)
if translate.get(replying_to_str):
replying_to_str = translate[replying_to_str]
post_id = post_json_object['object']['inReplyTo'] post_id = post_json_object['object']['inReplyTo']
post_link = '/users/' + nickname + '?convthread=' + \ post_link = '/users/' + nickname + '?convthread=' + \
post_id.replace('/', '--') post_id.replace('/', '--')
@ -1420,9 +1433,7 @@ def _reply_with_unknown_path_html(translate: {},
"""Returns html title for a reply with an unknown path """Returns html title for a reply with an unknown path
eg. does not contain /statuses/ eg. does not contain /statuses/
""" """
replying_to_str = 'replying to' replying_to_str = _replying_to_with_scope(post_json_object, translate)
if translate.get(replying_to_str):
replying_to_str = translate[replying_to_str]
post_id = post_json_object['object']['inReplyTo'] post_id = post_json_object['object']['inReplyTo']
post_link = '/users/' + nickname + '?convthread=' + \ post_link = '/users/' + nickname + '?convthread=' + \
post_id.replace('/', '--') post_id.replace('/', '--')
@ -1438,12 +1449,11 @@ def _reply_with_unknown_path_html(translate: {},
def _get_reply_html(translate: {}, def _get_reply_html(translate: {},
in_reply_to: str, reply_display_name: str, in_reply_to: str, reply_display_name: str,
nickname: str) -> str: nickname: str,
post_json_object: {}) -> str:
"""Returns html title for a reply """Returns html title for a reply
""" """
replying_to_str = 'replying to' replying_to_str = _replying_to_with_scope(post_json_object, translate)
if translate.get(replying_to_str):
replying_to_str = translate[replying_to_str]
post_link = '/users/' + nickname + '?convthread=' + \ post_link = '/users/' + nickname + '?convthread=' + \
in_reply_to.replace('/', '--') in_reply_to.replace('/', '--')
return ' ' + \ return ' ' + \
@ -1551,7 +1561,8 @@ def _get_post_title_reply_html(base_dir: str,
_log_post_timing(enable_timing_log, post_start_time, '13.6') _log_post_timing(enable_timing_log, post_start_time, '13.6')
title_str += \ title_str += \
_get_reply_html(translate, in_reply_to, reply_display_name, nickname) _get_reply_html(translate, in_reply_to, reply_display_name,
nickname, post_json_object)
if mitm: if mitm:
title_str += _mitm_warning_html(translate) title_str += _mitm_warning_html(translate)