Add transcript links to podcast screen

main
Bob Mottram 2022-05-03 12:55:16 +01:00
parent 39bf952003
commit 9897b67f21
23 changed files with 76 additions and 22 deletions

View File

@ -550,5 +550,6 @@
"Common emoji": "الرموز التعبيرية الشائعة", "Common emoji": "الرموز التعبيرية الشائعة",
"Copy and paste into your text": "نسخ ولصق في النص الخاص بك", "Copy and paste into your text": "نسخ ولصق في النص الخاص بك",
"shrug": "هز كتفيه", "shrug": "هز كتفيه",
"DM warning": "لا يتم تشفير الرسائل المباشرة من طرف إلى طرف. لا تشارك أي معلومات حساسة للغاية هنا." "DM warning": "لا يتم تشفير الرسائل المباشرة من طرف إلى طرف. لا تشارك أي معلومات حساسة للغاية هنا.",
"Transcript": "نص"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoji comú", "Common emoji": "Emoji comú",
"Copy and paste into your text": "Copia i enganxa al teu text", "Copy and paste into your text": "Copia i enganxa al teu text",
"shrug": "arronsar les espatlles", "shrug": "arronsar les espatlles",
"DM warning": "Els missatges directes no estan xifrats d'extrem a extrem. No compartiu cap informació molt sensible aquí." "DM warning": "Els missatges directes no estan xifrats d'extrem a extrem. No compartiu cap informació molt sensible aquí.",
"Transcript": "Transcripció"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoji cyffredin", "Common emoji": "Emoji cyffredin",
"Copy and paste into your text": "Copïwch a gludwch i'ch testun", "Copy and paste into your text": "Copïwch a gludwch i'ch testun",
"shrug": "shrug", "shrug": "shrug",
"DM warning": "Nid yw negeseuon uniongyrchol wedi'u hamgryptio o'r dechrau i'r diwedd. Peidiwch â rhannu unrhyw wybodaeth hynod sensitif yma." "DM warning": "Nid yw negeseuon uniongyrchol wedi'u hamgryptio o'r dechrau i'r diwedd. Peidiwch â rhannu unrhyw wybodaeth hynod sensitif yma.",
"Transcript": "Trawsgrifiad"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Gewöhnliches Emoji", "Common emoji": "Gewöhnliches Emoji",
"Copy and paste into your text": "Kopieren und in Ihren Text einfügen", "Copy and paste into your text": "Kopieren und in Ihren Text einfügen",
"shrug": "zucken", "shrug": "zucken",
"DM warning": "Direktnachrichten sind nicht Ende-zu-Ende verschlüsselt. Geben Sie hier keine hochsensiblen Informationen weiter." "DM warning": "Direktnachrichten sind nicht Ende-zu-Ende verschlüsselt. Geben Sie hier keine hochsensiblen Informationen weiter.",
"Transcript": "Abschrift"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Κοινά emoji", "Common emoji": "Κοινά emoji",
"Copy and paste into your text": "Αντιγράψτε και επικολλήστε στο κείμενό σας", "Copy and paste into your text": "Αντιγράψτε και επικολλήστε στο κείμενό σας",
"shrug": "σήκωμα των ώμων", "shrug": "σήκωμα των ώμων",
"DM warning": "Τα άμεσα μηνύματα δεν είναι κρυπτογραφημένα από άκρο σε άκρο. Μην μοιράζεστε καμία εξαιρετικά ευαίσθητη πληροφορία εδώ." "DM warning": "Τα άμεσα μηνύματα δεν είναι κρυπτογραφημένα από άκρο σε άκρο. Μην μοιράζεστε καμία εξαιρετικά ευαίσθητη πληροφορία εδώ.",
"Transcript": "Αντίγραφο"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Common emoji", "Common emoji": "Common emoji",
"Copy and paste into your text": "Copy and paste into your text", "Copy and paste into your text": "Copy and paste into your text",
"shrug": "shrug", "shrug": "shrug",
"DM warning": "Direct messages are not end-to-end encrypted. Do not share any highly sensitive information here." "DM warning": "Direct messages are not end-to-end encrypted. Do not share any highly sensitive information here.",
"Transcript": "Transcript"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoticonos comunes", "Common emoji": "Emoticonos comunes",
"Copy and paste into your text": "Copia y pega en tu texto", "Copy and paste into your text": "Copia y pega en tu texto",
"shrug": "encogimiento de hombros", "shrug": "encogimiento de hombros",
"DM warning": "Los mensajes directos no están cifrados de extremo a extremo. No comparta ninguna información altamente confidencial aquí." "DM warning": "Los mensajes directos no están cifrados de extremo a extremo. No comparta ninguna información altamente confidencial aquí.",
"Transcript": "Transcripción"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Émoji commun", "Common emoji": "Émoji commun",
"Copy and paste into your text": "Copiez et collez dans votre texte", "Copy and paste into your text": "Copiez et collez dans votre texte",
"shrug": "hausser les épaules", "shrug": "hausser les épaules",
"DM warning": "Les messages directs ne sont pas chiffrés de bout en bout. Ne partagez aucune information hautement sensible ici." "DM warning": "Les messages directs ne sont pas chiffrés de bout en bout. Ne partagez aucune information hautement sensible ici.",
"Transcript": "Transcription"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoji coitianta", "Common emoji": "Emoji coitianta",
"Copy and paste into your text": "Cóipeáil agus greamaigh isteach i do théacs", "Copy and paste into your text": "Cóipeáil agus greamaigh isteach i do théacs",
"shrug": "shrug", "shrug": "shrug",
"DM warning": "Níl teachtaireachtaí díreacha criptithe ó cheann go ceann. Ná roinn aon fhaisnéis an-íogair anseo." "DM warning": "Níl teachtaireachtaí díreacha criptithe ó cheann go ceann. Ná roinn aon fhaisnéis an-íogair anseo.",
"Transcript": "Athscríbhinn"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "आम इमोजी", "Common emoji": "आम इमोजी",
"Copy and paste into your text": "अपने टेक्स्ट में कॉपी और पेस्ट करें", "Copy and paste into your text": "अपने टेक्स्ट में कॉपी और पेस्ट करें",
"shrug": "कंधे उचकाने की क्रिया", "shrug": "कंधे उचकाने की क्रिया",
"DM warning": "डायरेक्ट मैसेज एंड-टू-एंड एन्क्रिप्टेड नहीं होते हैं। यहां कोई अति संवेदनशील जानकारी साझा न करें।" "DM warning": "डायरेक्ट मैसेज एंड-टू-एंड एन्क्रिप्टेड नहीं होते हैं। यहां कोई अति संवेदनशील जानकारी साझा न करें।",
"Transcript": "प्रतिलिपि"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoji comuni", "Common emoji": "Emoji comuni",
"Copy and paste into your text": "Copia e incolla nel tuo testo", "Copy and paste into your text": "Copia e incolla nel tuo testo",
"shrug": "scrollare le spalle", "shrug": "scrollare le spalle",
"DM warning": "I messaggi diretti non sono crittografati end-to-end. Non condividere qui alcuna informazione altamente sensibile." "DM warning": "I messaggi diretti non sono crittografati end-to-end. Non condividere qui alcuna informazione altamente sensibile.",
"Transcript": "Trascrizione"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "一般的な絵文字", "Common emoji": "一般的な絵文字",
"Copy and paste into your text": "コピーしてテキストに貼り付けます", "Copy and paste into your text": "コピーしてテキストに貼り付けます",
"shrug": "肩をすくめる", "shrug": "肩をすくめる",
"DM warning": "ダイレクトメッセージはエンドツーエンドで暗号化されません。 ここでは機密性の高い情報を共有しないでください。" "DM warning": "ダイレクトメッセージはエンドツーエンドで暗号化されません。 ここでは機密性の高い情報を共有しないでください。",
"Transcript": "トランスクリプト"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "일반적인 이모티콘", "Common emoji": "일반적인 이모티콘",
"Copy and paste into your text": "텍스트에 복사하여 붙여넣기", "Copy and paste into your text": "텍스트에 복사하여 붙여넣기",
"shrug": "어깨를 으쓱하다", "shrug": "어깨를 으쓱하다",
"DM warning": "다이렉트 메시지는 종단 간 암호화되지 않습니다. 여기에 매우 민감한 정보를 공유하지 마십시오." "DM warning": "다이렉트 메시지는 종단 간 암호화되지 않습니다. 여기에 매우 민감한 정보를 공유하지 마십시오.",
"Transcript": "성적 증명서"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emojiyên hevpar", "Common emoji": "Emojiyên hevpar",
"Copy and paste into your text": "Di nivîsa xwe de kopî bikin û bixin", "Copy and paste into your text": "Di nivîsa xwe de kopî bikin û bixin",
"shrug": "şuştin", "shrug": "şuştin",
"DM warning": "Peyamên rasterast bi dawî-bi-dawî ne şîfrekirî ne. Li vir agahdariya pir hesas parve nekin." "DM warning": "Peyamên rasterast bi dawî-bi-dawî ne şîfrekirî ne. Li vir agahdariya pir hesas parve nekin.",
"Transcript": "Transcript"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Gemeenschappelijke emoji", "Common emoji": "Gemeenschappelijke emoji",
"Copy and paste into your text": "Kopieer en plak in je tekst", "Copy and paste into your text": "Kopieer en plak in je tekst",
"shrug": "schouderophalend", "shrug": "schouderophalend",
"DM warning": "Directe berichten zijn niet end-to-end versleuteld. Deel hier geen zeer gevoelige informatie." "DM warning": "Directe berichten zijn niet end-to-end versleuteld. Deel hier geen zeer gevoelige informatie.",
"Transcript": "Vertaling"
} }

View File

@ -546,5 +546,6 @@
"Common emoji": "Common emoji", "Common emoji": "Common emoji",
"Copy and paste into your text": "Copy and paste into your text", "Copy and paste into your text": "Copy and paste into your text",
"shrug": "shrug", "shrug": "shrug",
"DM warning": "Direct messages are not end-to-end encrypted. Do not share any highly sensitive information here." "DM warning": "Direct messages are not end-to-end encrypted. Do not share any highly sensitive information here.",
"Transcript": "Transcript"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Popularne emotikony", "Common emoji": "Popularne emotikony",
"Copy and paste into your text": "Skopiuj i wklej do swojego tekstu", "Copy and paste into your text": "Skopiuj i wklej do swojego tekstu",
"shrug": "wzruszać ramionami", "shrug": "wzruszać ramionami",
"DM warning": "Wiadomości na czacie nie są szyfrowane metodą end-to-end. Nie udostępniaj tutaj żadnych wysoce wrażliwych informacji." "DM warning": "Wiadomości na czacie nie są szyfrowane metodą end-to-end. Nie udostępniaj tutaj żadnych wysoce wrażliwych informacji.",
"Transcript": "Transkrypcja"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoji comum", "Common emoji": "Emoji comum",
"Copy and paste into your text": "Copie e cole no seu texto", "Copy and paste into your text": "Copie e cole no seu texto",
"shrug": "dar de ombros", "shrug": "dar de ombros",
"DM warning": "As mensagens diretas não são criptografadas de ponta a ponta. Não compartilhe nenhuma informação altamente sensível aqui." "DM warning": "As mensagens diretas não são criptografadas de ponta a ponta. Não compartilhe nenhuma informação altamente sensível aqui.",
"Transcript": "Transcrição"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Общие смайлики", "Common emoji": "Общие смайлики",
"Copy and paste into your text": "Скопируйте и вставьте в свой текст", "Copy and paste into your text": "Скопируйте и вставьте в свой текст",
"shrug": "пожимание плечами", "shrug": "пожимание плечами",
"DM warning": "Прямые сообщения не подвергаются сквозному шифрованию. Не делитесь здесь особо конфиденциальной информацией." "DM warning": "Прямые сообщения не подвергаются сквозному шифрованию. Не делитесь здесь особо конфиденциальной информацией.",
"Transcript": "Стенограмма"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Emoji ya kawaida", "Common emoji": "Emoji ya kawaida",
"Copy and paste into your text": "Nakili na ubandike kwenye maandishi yako", "Copy and paste into your text": "Nakili na ubandike kwenye maandishi yako",
"shrug": "piga mabega", "shrug": "piga mabega",
"DM warning": "Ujumbe wa moja kwa moja haujasimbwa kutoka mwisho hadi mwisho. Usishiriki maelezo yoyote nyeti sana hapa." "DM warning": "Ujumbe wa moja kwa moja haujasimbwa kutoka mwisho hadi mwisho. Usishiriki maelezo yoyote nyeti sana hapa.",
"Transcript": "Nakala"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "Звичайні емодзі", "Common emoji": "Звичайні емодзі",
"Copy and paste into your text": "Скопіюйте та вставте у свій текст", "Copy and paste into your text": "Скопіюйте та вставте у свій текст",
"shrug": "знизати плечима", "shrug": "знизати плечима",
"DM warning": "Прямі повідомлення не наскрізне шифруються. Не публікуйте тут дуже конфіденційну інформацію." "DM warning": "Прямі повідомлення не наскрізне шифруються. Не публікуйте тут дуже конфіденційну інформацію.",
"Transcript": "Стенограма"
} }

View File

@ -550,5 +550,6 @@
"Common emoji": "常见表情符号", "Common emoji": "常见表情符号",
"Copy and paste into your text": "复制并粘贴到您的文本中", "Copy and paste into your text": "复制并粘贴到您的文本中",
"shrug": "耸耸肩", "shrug": "耸耸肩",
"DM warning": "直接消息不是端到端加密的。 不要在这里分享任何高度敏感的信息。" "DM warning": "直接消息不是端到端加密的。 不要在这里分享任何高度敏感的信息。",
"Transcript": "成绩单"
} }

View File

@ -21,6 +21,35 @@ from webapp_utils import html_footer
from webapp_utils import html_keyboard_navigation from webapp_utils import html_keyboard_navigation
def _html_podcast_transcripts(podcast_properties: {}, translate: {}) -> str:
"""Returns html for transcripts of a podcast
"""
if not podcast_properties:
return ''
key = 'transcripts'
if not podcast_properties.get(key):
return ''
ctr = 1
html_str = ''
for transcript in podcast_properties[key]:
transcript_url = None
if podcast_properties[key].get('url'):
transcript_url = podcast_properties[key]['url']
elif podcast_properties[key].get('uri'):
transcript_url = podcast_properties[key]['uri']
if not transcript_url:
continue
if ctr > 1:
html_str += '<br>'
html_str += '<a href="' + transcript_url + '">'
html_str += translate['Transcript']
if ctr > 1:
html_str += ' ' + str(ctr)
html_str += '</a>\n'
ctr += 1
return html_str
def _html_podcast_social_interactions(podcast_properties: {}, def _html_podcast_social_interactions(podcast_properties: {},
translate: {}, translate: {},
nickname: str) -> str: nickname: str) -> str:
@ -282,6 +311,9 @@ def html_podcast_episode(css_cache: {}, translate: {},
'<span itemprop="headline">' + \ '<span itemprop="headline">' + \
podcast_title + \ podcast_title + \
'</span></label></p>\n' '</span></label></p>\n'
transcripts = _html_podcast_transcripts(podcast_properties, translate)
if transcripts:
podcast_str += '<p>' + transcripts + '</p>\n'
if newswire_item[4]: if newswire_item[4]:
podcast_description = \ podcast_description = \
html.unescape(urllib.parse.unquote_plus(newswire_item[4])) html.unescape(urllib.parse.unquote_plus(newswire_item[4]))