From 1c5e2f86e737f254695da41f76d3808a0aac47ad Mon Sep 17 00:00:00 2001 From: bashrc Date: Mon, 13 Apr 2026 16:33:05 +0100 Subject: [PATCH] Show podcast duration --- newswire.py | 3 +-- translations/ar.json | 3 ++- translations/bn.json | 3 ++- translations/ca.json | 3 ++- translations/cy.json | 3 ++- translations/de.json | 3 ++- translations/el.json | 3 ++- translations/en.json | 3 ++- translations/es.json | 3 ++- translations/fa.json | 3 ++- translations/fi.json | 3 ++- translations/fr.json | 3 ++- translations/ga.json | 3 ++- translations/he.json | 3 ++- translations/hi.json | 3 ++- translations/it.json | 3 ++- translations/ja.json | 3 ++- translations/ko.json | 3 ++- translations/ku.json | 3 ++- translations/nl.json | 3 ++- translations/oc.json | 3 ++- translations/pl.json | 3 ++- translations/pt.json | 3 ++- translations/ru.json | 3 ++- translations/sw.json | 3 ++- translations/tr.json | 3 ++- translations/uk.json | 3 ++- translations/yi.json | 3 ++- translations/zh.json | 3 ++- webapp_podcast.py | 11 +++++++++++ 30 files changed, 68 insertions(+), 30 deletions(-) diff --git a/newswire.py b/newswire.py index f6429db61..49b041fb4 100644 --- a/newswire.py +++ b/newswire.py @@ -672,8 +672,7 @@ def xml_podcast_to_dict(base_dir: str, xml_item: str, xml_str: str) -> {}: duration = duration.split('>')[1] if '<' in duration: duration = duration.split('<')[0] - if duration.isdigit(): - podcast_properties['duration'] = duration + podcast_properties['duration'] = duration # get the image for the podcast, if it exists podcast_episode_image = None diff --git a/translations/ar.json b/translations/ar.json index a6720d89f..02d17a6b9 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -767,5 +767,6 @@ "Bot": "الروبوت", "Show Map": "عرض الخريطة", "Organisation": "منظمة", - "Group": "مجموعة" + "Group": "مجموعة", + "minutes": "دقائق" } diff --git a/translations/bn.json b/translations/bn.json index 96247c758..7d887d6f7 100644 --- a/translations/bn.json +++ b/translations/bn.json @@ -767,5 +767,6 @@ "Bot": "রোবট", "Show Map": "মানচিত্র দেখান", "Organisation": "সংগঠন", - "Group": "গ্রুপ" + "Group": "গ্রুপ", + "minutes": "মিনিট" } diff --git a/translations/ca.json b/translations/ca.json index 3540f6d8a..c76c5e672 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Mostra el mapa", "Organisation": "Organització", - "Group": "Grup" + "Group": "Grup", + "minutes": "minuts" } diff --git a/translations/cy.json b/translations/cy.json index f85f3a77b..8597fd7c1 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Dangos Map", "Organisation": "Sefydliad", - "Group": "Grŵp" + "Group": "Grŵp", + "minutes": "munudau" } diff --git a/translations/de.json b/translations/de.json index 6c3330a52..59adbf3c0 100644 --- a/translations/de.json +++ b/translations/de.json @@ -767,5 +767,6 @@ "Bot": "Roboter", "Show Map": "Karte anzeigen", "Organisation": "Organisation", - "Group": "Gruppe" + "Group": "Gruppe", + "minutes": "minuten" } diff --git a/translations/el.json b/translations/el.json index d870eb7fe..c60082072 100644 --- a/translations/el.json +++ b/translations/el.json @@ -767,5 +767,6 @@ "Bot": "Ρομπότ", "Show Map": "Εμφάνιση Χάρτη", "Organisation": "Οργάνωση", - "Group": "Ομάδα" + "Group": "Ομάδα", + "minutes": "πρακτικά" } diff --git a/translations/en.json b/translations/en.json index 6d537db3b..9fe103c70 100644 --- a/translations/en.json +++ b/translations/en.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Show Map", "Organisation": "Organisation", - "Group": "Group" + "Group": "Group", + "minutes": "minutes" } diff --git a/translations/es.json b/translations/es.json index 28bac21bf..bda2d4598 100644 --- a/translations/es.json +++ b/translations/es.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Mostrar mapa", "Organisation": "Organización", - "Group": "Grupo" + "Group": "Grupo", + "minutes": "minutos" } diff --git a/translations/fa.json b/translations/fa.json index 07ea8c3d9..0147eb427 100644 --- a/translations/fa.json +++ b/translations/fa.json @@ -767,5 +767,6 @@ "Bot": "ربات", "Show Map": "نمایش نقشه", "Organisation": "سازمان", - "Group": "گروه" + "Group": "گروه", + "minutes": "دقیقه" } diff --git a/translations/fi.json b/translations/fi.json index b13af8e9b..e9db2e683 100644 --- a/translations/fi.json +++ b/translations/fi.json @@ -767,5 +767,6 @@ "Bot": "Robotti", "Show Map": "Näytä kartta", "Organisation": "Organisaatio", - "Group": "Ryhmä" + "Group": "Ryhmä", + "minutes": "minuuttia" } diff --git a/translations/fr.json b/translations/fr.json index deea8354a..3b40ccc23 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Afficher la carte", "Organisation": "Organisation", - "Group": "Groupe" + "Group": "Groupe", + "minutes": "minutes" } diff --git a/translations/ga.json b/translations/ga.json index beb59a1d2..34db01505 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -767,5 +767,6 @@ "Bot": "Róbat", "Show Map": "Taispeáin Léarscáil", "Organisation": "Eagraíocht", - "Group": "Grúpa" + "Group": "Grúpa", + "minutes": "nóiméad" } diff --git a/translations/he.json b/translations/he.json index efef62604..7e3c69b67 100644 --- a/translations/he.json +++ b/translations/he.json @@ -767,5 +767,6 @@ "Bot": "רוֹבּוֹט", "Show Map": "הצג מפה", "Organisation": "אִרגוּן", - "Group": "קְבוּצָה" + "Group": "קְבוּצָה", + "minutes": "פּרוֹטוֹקוֹל" } diff --git a/translations/hi.json b/translations/hi.json index 1f331abc4..236bab874 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -767,5 +767,6 @@ "Bot": "रोबोट", "Show Map": "नक्शा दिखाएं", "Organisation": "संगठन", - "Group": "समूह" + "Group": "समूह", + "minutes": "मिनट" } diff --git a/translations/it.json b/translations/it.json index 55bbe1536..65b787017 100644 --- a/translations/it.json +++ b/translations/it.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Mostra mappa", "Organisation": "Organizzazione", - "Group": "Gruppo" + "Group": "Gruppo", + "minutes": "minuti" } diff --git a/translations/ja.json b/translations/ja.json index a25c45c56..0bdf6a337 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -767,5 +767,6 @@ "Bot": "ロボット", "Show Map": "地図を表示", "Organisation": "組織", - "Group": "グループ" + "Group": "グループ", + "minutes": "分" } diff --git a/translations/ko.json b/translations/ko.json index f0e8221a8..8aa909970 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -767,5 +767,6 @@ "Bot": "기계 인간", "Show Map": "지도 표시", "Organisation": "조직", - "Group": "그룹" + "Group": "그룹", + "minutes": "분" } diff --git a/translations/ku.json b/translations/ku.json index d8fac73b9..5117270ef 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Nexşeya Nîşan Bide", "Organisation": "Sazûman", - "Group": "Kom" + "Group": "Kom", + "minutes": "deqîqe" } diff --git a/translations/nl.json b/translations/nl.json index 5ec626391..02a1fa5da 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Kaart weergeven", "Organisation": "Organisatie", - "Group": "Groep" + "Group": "Groep", + "minutes": "notulen" } diff --git a/translations/oc.json b/translations/oc.json index 79df16864..17ca6875c 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -763,5 +763,6 @@ "Bot": "Bot", "Show Map": "Show Map", "Organisation": "Organisation", - "Group": "Group" + "Group": "Group", + "minutes": "minutes" } diff --git a/translations/pl.json b/translations/pl.json index e28b5046d..63c9ee35e 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Pokaż mapę", "Organisation": "Organizacja", - "Group": "Grupa" + "Group": "Grupa", + "minutes": "protokół" } diff --git a/translations/pt.json b/translations/pt.json index 05483e513..0bbb0919a 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -767,5 +767,6 @@ "Bot": "Robô", "Show Map": "Mostrar mapa", "Organisation": "Organização", - "Group": "Grupo" + "Group": "Grupo", + "minutes": "minutos" } diff --git a/translations/ru.json b/translations/ru.json index 62c83ccab..4cf812b50 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -767,5 +767,6 @@ "Bot": "Робот", "Show Map": "Показать карту", "Organisation": "Организация", - "Group": "Группа" + "Group": "Группа", + "minutes": "минут" } diff --git a/translations/sw.json b/translations/sw.json index 771a25fd2..99e6ea321 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -767,5 +767,6 @@ "Bot": "Roboti", "Show Map": "Onyesha Ramani", "Organisation": "Shirika", - "Group": "Kundi" + "Group": "Kundi", + "minutes": "dakika" } diff --git a/translations/tr.json b/translations/tr.json index bd84fa9f1..7ab7e0c1a 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -767,5 +767,6 @@ "Bot": "Bot", "Show Map": "Haritayı Göster", "Organisation": "Organizasyon", - "Group": "Grup" + "Group": "Grup", + "minutes": "dakika" } diff --git a/translations/uk.json b/translations/uk.json index 5d0050279..a8609dde8 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -767,5 +767,6 @@ "Bot": "Робот", "Show Map": "Показати карту", "Organisation": "Організація", - "Group": "Група" + "Group": "Група", + "minutes": "хвилин" } diff --git a/translations/yi.json b/translations/yi.json index e1a468b60..48ff2fa6c 100644 --- a/translations/yi.json +++ b/translations/yi.json @@ -767,5 +767,6 @@ "Bot": "ראָבאָט", "Show Map": "ווייַזן מאַפּע", "Organisation": "אָרגאַניזאַציע", - "Group": "גרופּע" + "Group": "גרופּע", + "minutes": "מינוטן" } diff --git a/translations/zh.json b/translations/zh.json index 49368d878..f45514934 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -767,5 +767,6 @@ "Bot": "机器人", "Show Map": "显示地图", "Organisation": "组织", - "Group": "团体" + "Group": "团体", + "minutes": "分钟" } diff --git a/webapp_podcast.py b/webapp_podcast.py index ff3ba5d61..628f16d08 100644 --- a/webapp_podcast.py +++ b/webapp_podcast.py @@ -462,6 +462,17 @@ def html_podcast_episode(translate: {}, '

' + \ podcast_description + '

\n' + if podcast_properties.get('duration'): + if podcast_properties['duration'].isdigit(): + podcast_str += \ + '

' + \ + podcast_properties['duration'] + ' ' + \ + translate['minutes'] + '

\n' + else: + podcast_str += \ + '

' + \ + podcast_properties['duration'] + '

\n' + # donate button if podcast_properties.get('funding'): if podcast_properties['funding'].get('url'):