Change label for icon when switching between show and hide

merge-requests/30/head
Bob Mottram 2024-05-13 16:57:11 +01:00
parent d17c0421ed
commit 7b8562972a
29 changed files with 68 additions and 33 deletions

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "عدم إظهار الردود المعززة", "Don't show boosted replies": "عدم إظهار الردود المعززة",
"Show quote posts": "إظهار المشاركات المقتبسة", "Show quote posts": "إظهار المشاركات المقتبسة",
"Link Trackers": "تعقب الارتباط", "Link Trackers": "تعقب الارتباط",
"Hide Announces": "إخفاء الإعلانات" "Hide Announces": "إخفاء الإعلانات",
"Show Announces": "عرض يعلن"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "বুস্ট করা উত্তর দেখাবেন না", "Don't show boosted replies": "বুস্ট করা উত্তর দেখাবেন না",
"Show quote posts": "উদ্ধৃত পোস্ট দেখান", "Show quote posts": "উদ্ধৃত পোস্ট দেখান",
"Link Trackers": "লিঙ্ক ট্র্যাকার", "Link Trackers": "লিঙ্ক ট্র্যাকার",
"Hide Announces": "ঘোষণা লুকান" "Hide Announces": "ঘোষণা লুকান",
"Show Announces": "ঘোষণা দেখান"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "No mostris respostes reforçades", "Don't show boosted replies": "No mostris respostes reforçades",
"Show quote posts": "Mostra les publicacions citades", "Show quote posts": "Mostra les publicacions citades",
"Link Trackers": "Seguidors d'enllaços", "Link Trackers": "Seguidors d'enllaços",
"Hide Announces": "Amaga els anuncis" "Hide Announces": "Amaga els anuncis",
"Show Announces": "Mostra Anuncia"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Peidiwch â dangos atebion cryfach", "Don't show boosted replies": "Peidiwch â dangos atebion cryfach",
"Show quote posts": "Dangos postiadau a ddyfynnwyd", "Show quote posts": "Dangos postiadau a ddyfynnwyd",
"Link Trackers": "Tracwyr Cyswllt", "Link Trackers": "Tracwyr Cyswllt",
"Hide Announces": "Cuddio Cyhoeddiadau" "Hide Announces": "Cuddio Cyhoeddiadau",
"Show Announces": "Sioe yn Cyhoeddi"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Keine geboosteten Antworten anzeigen", "Don't show boosted replies": "Keine geboosteten Antworten anzeigen",
"Show quote posts": "Zitierte Beiträge anzeigen", "Show quote posts": "Zitierte Beiträge anzeigen",
"Link Trackers": "Link-Tracker", "Link Trackers": "Link-Tracker",
"Hide Announces": "Ankündigungen ausblenden" "Hide Announces": "Ankündigungen ausblenden",
"Show Announces": "Ankündigungen anzeigen"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Μην εμφανίζετε ενισχυμένες απαντήσεις", "Don't show boosted replies": "Μην εμφανίζετε ενισχυμένες απαντήσεις",
"Show quote posts": "Εμφάνιση αναφερόμενων αναρτήσεων", "Show quote posts": "Εμφάνιση αναφερόμενων αναρτήσεων",
"Link Trackers": "Link Trackers", "Link Trackers": "Link Trackers",
"Hide Announces": "Απόκρυψη Ανακοινώνει" "Hide Announces": "Απόκρυψη Ανακοινώνει",
"Show Announces": "Εμφάνιση Ανακοινώνει"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Don't show boosted replies", "Don't show boosted replies": "Don't show boosted replies",
"Show quote posts": "Show quote posts", "Show quote posts": "Show quote posts",
"Link Trackers": "Link Trackers", "Link Trackers": "Link Trackers",
"Hide Announces": "Hide Announces" "Hide Announces": "Hide Announces",
"Show Announces": "Show Announces"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "No mostrar respuestas mejoradas", "Don't show boosted replies": "No mostrar respuestas mejoradas",
"Show quote posts": "Mostrar publicaciones citadas", "Show quote posts": "Mostrar publicaciones citadas",
"Link Trackers": "Rastreadores de enlaces", "Link Trackers": "Rastreadores de enlaces",
"Hide Announces": "Ocultar anuncios" "Hide Announces": "Ocultar anuncios",
"Show Announces": "Mostrar anuncios"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "پاسخ های تقویت شده را نشان ندهید", "Don't show boosted replies": "پاسخ های تقویت شده را نشان ندهید",
"Show quote posts": "نمایش پست های نقل شده", "Show quote posts": "نمایش پست های نقل شده",
"Link Trackers": "ردیاب های لینک", "Link Trackers": "ردیاب های لینک",
"Hide Announces": "پنهان کردن اعلام می کند" "Hide Announces": "پنهان کردن اعلام می کند",
"Show Announces": "نمایش اعلام می کند"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Ne pas afficher les réponses boostées", "Don't show boosted replies": "Ne pas afficher les réponses boostées",
"Show quote posts": "Afficher les articles cités", "Show quote posts": "Afficher les articles cités",
"Link Trackers": "Traqueurs de liens", "Link Trackers": "Traqueurs de liens",
"Hide Announces": "Masquer les annonces" "Hide Announces": "Masquer les annonces",
"Show Announces": "Afficher les annonces"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Ná taispeáin freagraí treisithe", "Don't show boosted replies": "Ná taispeáin freagraí treisithe",
"Show quote posts": "Taispeáin postálacha luaite", "Show quote posts": "Taispeáin postálacha luaite",
"Link Trackers": "Lorgairí Nasc", "Link Trackers": "Lorgairí Nasc",
"Hide Announces": "Folaigh Fógraí" "Hide Announces": "Folaigh Fógraí",
"Show Announces": "Taispeáin Fógraí"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "אל תראה תשובות מוגברות", "Don't show boosted replies": "אל תראה תשובות מוגברות",
"Show quote posts": "הצג פוסטים מצוטטים", "Show quote posts": "הצג פוסטים מצוטטים",
"Link Trackers": "מעקבי קישורים", "Link Trackers": "מעקבי קישורים",
"Hide Announces": "הסתר מכריז" "Hide Announces": "הסתר מכריז",
"Show Announces": "הצג מכריז"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "बढ़ाए गए उत्तर न दिखाएं", "Don't show boosted replies": "बढ़ाए गए उत्तर न दिखाएं",
"Show quote posts": "उद्धृत पोस्ट दिखाएँ", "Show quote posts": "उद्धृत पोस्ट दिखाएँ",
"Link Trackers": "लिंक ट्रैकर्स", "Link Trackers": "लिंक ट्रैकर्स",
"Hide Announces": "घोषणाएँ छुपाएँ" "Hide Announces": "घोषणाएँ छुपाएँ",
"Show Announces": "शो की घोषणा"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Non mostrare le risposte in evidenza", "Don't show boosted replies": "Non mostrare le risposte in evidenza",
"Show quote posts": "Mostra post citati", "Show quote posts": "Mostra post citati",
"Link Trackers": "Tracker dei collegamenti", "Link Trackers": "Tracker dei collegamenti",
"Hide Announces": "Nascondi annunci" "Hide Announces": "Nascondi annunci",
"Show Announces": "Mostra annunci"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "ブーストされた返信を表示しない", "Don't show boosted replies": "ブーストされた返信を表示しない",
"Show quote posts": "引用された投稿を表示", "Show quote posts": "引用された投稿を表示",
"Link Trackers": "リンクトラッカー", "Link Trackers": "リンクトラッカー",
"Hide Announces": "発表を隠す" "Hide Announces": "発表を隠す",
"Show Announces": "ショーアナウンス"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "홍보된 답글 표시 안함", "Don't show boosted replies": "홍보된 답글 표시 안함",
"Show quote posts": "인용된 게시물 표시", "Show quote posts": "인용된 게시물 표시",
"Link Trackers": "링크 추적기", "Link Trackers": "링크 추적기",
"Hide Announces": "발표 숨기기" "Hide Announces": "발표 숨기기",
"Show Announces": "쇼 발표"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Bersivên zêdekirî nîşan nedin", "Don't show boosted replies": "Bersivên zêdekirî nîşan nedin",
"Show quote posts": "Mesajên binavkirî nîşan bide", "Show quote posts": "Mesajên binavkirî nîşan bide",
"Link Trackers": "Link Trackers", "Link Trackers": "Link Trackers",
"Hide Announces": "Veşêre Daxuyan dike" "Hide Announces": "Veşêre Daxuyan dike",
"Show Announces": "Nîşan dide Ragihandin"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Geen gepromote antwoorden weergeven", "Don't show boosted replies": "Geen gepromote antwoorden weergeven",
"Show quote posts": "Toon geciteerde berichten", "Show quote posts": "Toon geciteerde berichten",
"Link Trackers": "Link-trackers", "Link Trackers": "Link-trackers",
"Hide Announces": "Aankondigingen verbergen" "Hide Announces": "Aankondigingen verbergen",
"Show Announces": "Toon aankondigingen"
} }

View File

@ -666,5 +666,6 @@
"Don't show boosted replies": "Don't show boosted replies", "Don't show boosted replies": "Don't show boosted replies",
"Show quote posts": "Show quote posts", "Show quote posts": "Show quote posts",
"Link Trackers": "Link Trackers", "Link Trackers": "Link Trackers",
"Hide Announces": "Hide Announces" "Hide Announces": "Hide Announces",
"Show Announces": "Show Announces"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Nie pokazuj wzmocnionych odpowiedzi", "Don't show boosted replies": "Nie pokazuj wzmocnionych odpowiedzi",
"Show quote posts": "Pokaż cytowane posty", "Show quote posts": "Pokaż cytowane posty",
"Link Trackers": "Śledzenie linków", "Link Trackers": "Śledzenie linków",
"Hide Announces": "Ukryj ogłoszenia" "Hide Announces": "Ukryj ogłoszenia",
"Show Announces": "Pokaż ogłoszenia"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Não mostrar respostas otimizadas", "Don't show boosted replies": "Não mostrar respostas otimizadas",
"Show quote posts": "Mostrar postagens citadas", "Show quote posts": "Mostrar postagens citadas",
"Link Trackers": "Rastreadores de links", "Link Trackers": "Rastreadores de links",
"Hide Announces": "Ocultar anúncios" "Hide Announces": "Ocultar anúncios",
"Show Announces": "Mostrar anúncios"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Не показывать усиленные ответы", "Don't show boosted replies": "Не показывать усиленные ответы",
"Show quote posts": "Показать цитируемые сообщения", "Show quote posts": "Показать цитируемые сообщения",
"Link Trackers": "Трекеры ссылок", "Link Trackers": "Трекеры ссылок",
"Hide Announces": "Скрыть объявления" "Hide Announces": "Скрыть объявления",
"Show Announces": "Показать анонсы"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Usionyeshe majibu yaliyoboreshwa", "Don't show boosted replies": "Usionyeshe majibu yaliyoboreshwa",
"Show quote posts": "Onyesha machapisho yaliyonukuliwa", "Show quote posts": "Onyesha machapisho yaliyonukuliwa",
"Link Trackers": "Viunga vya Kufuatilia", "Link Trackers": "Viunga vya Kufuatilia",
"Hide Announces": "Ficha Matangazo" "Hide Announces": "Ficha Matangazo",
"Show Announces": "Onyesha Matangazo"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Öne çıkarılan yanıtları gösterme", "Don't show boosted replies": "Öne çıkarılan yanıtları gösterme",
"Show quote posts": "Alıntılanan gönderileri göster", "Show quote posts": "Alıntılanan gönderileri göster",
"Link Trackers": "Bağlantı İzleyiciler", "Link Trackers": "Bağlantı İzleyiciler",
"Hide Announces": "Duyuruları Gizle" "Hide Announces": "Duyuruları Gizle",
"Show Announces": "Duyuruları Göster"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "Не показувати посилені відповіді", "Don't show boosted replies": "Не показувати посилені відповіді",
"Show quote posts": "Показувати цитовані пости", "Show quote posts": "Показувати цитовані пости",
"Link Trackers": "Відстеження посилань", "Link Trackers": "Відстеження посилань",
"Hide Announces": "Приховати оголошення" "Hide Announces": "Приховати оголошення",
"Show Announces": "Показати оголошення"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "צי ניט ווייַזן בוסטיד ענטפֿערס", "Don't show boosted replies": "צי ניט ווייַזן בוסטיד ענטפֿערס",
"Show quote posts": "ווייַזן ציטירטע אַרטיקלען", "Show quote posts": "ווייַזן ציטירטע אַרטיקלען",
"Link Trackers": "לינק טראַקערז", "Link Trackers": "לינק טראַקערז",
"Hide Announces": "באַהאַלטן אַנאַונסיז" "Hide Announces": "באַהאַלטן אַנאַונסיז",
"Show Announces": "ווייַזן אַנאַונסיז"
} }

View File

@ -670,5 +670,6 @@
"Don't show boosted replies": "不显示强化回复", "Don't show boosted replies": "不显示强化回复",
"Show quote posts": "显示引用的帖子", "Show quote posts": "显示引用的帖子",
"Link Trackers": "链接跟踪器", "Link Trackers": "链接跟踪器",
"Hide Announces": "隐藏公告" "Hide Announces": "隐藏公告",
"Show Announces": "展会公告"
} }

View File

@ -47,7 +47,8 @@ def header_buttons_timeline(default_timeline: str,
follow_approvals: str, follow_approvals: str,
icons_as_buttons: bool, icons_as_buttons: bool,
access_keys: {}, access_keys: {},
is_text_browser: str) -> str: is_text_browser: str,
show_announces: bool) -> str:
"""Returns the header at the top of the timeline, containing """Returns the header at the top of the timeline, containing
buttons for inbox, outbox, search, calendar, etc buttons for inbox, outbox, search, calendar, etc
""" """
@ -324,20 +325,27 @@ def header_buttons_timeline(default_timeline: str,
if not features_header: if not features_header:
# the hide announces button # the hide announces button
if show_announces:
hide_announces_icon = 'repeat_inactive.png'
hide_announces_text = translate['Hide Announces']
else:
hide_announces_icon = 'repeat_inactive.png'
hide_announces_text = translate['Show Announces']
if not icons_as_buttons: if not icons_as_buttons:
tl_str += \ tl_str += \
' <a class="imageAnchor" href="' + \ ' <a class="imageAnchor" href="' + \
users_path + '/hideannounces" tabindex="3">' + \ users_path + '/hideannounces" tabindex="3">' + \
'<img loading="lazy" decoding="async" src="/icons' + \ '<img loading="lazy" decoding="async" src="/icons' + \
'/repeat_inactive.png" title="' + \ '/' + hide_announces_icon + '" title="' + \
translate['Hide Announces'] + \ hide_announces_text + \
'" alt="| ' + translate['Hide Announces'] + \ '" alt="| ' + translate['Hide Announces'] + \
'" class="timelineicon"/></a>\n' '" class="timelineicon"/></a>\n'
else: else:
tl_str += \ tl_str += \
'<a href="' + users_path + '/hideannounces' + \ '<a href="' + users_path + '/hideannounces' + \
'" tabindex="3"><button class="button">' + \ '" tabindex="3"><button class="button">' + \
'<span>' + translate['Hide Announces'] + \ '<span>' + hide_announces_text + \
'</span></button></a>' '</span></button></a>'
# the show/hide button, for a simpler header appearance # the show/hide button, for a simpler header appearance

View File

@ -820,7 +820,7 @@ def html_timeline(default_timeline: str,
new_calendar_event, calendar_path, new_calendar_event, calendar_path,
calendar_image, follow_approvals, calendar_image, follow_approvals,
icons_as_buttons, access_keys, icons_as_buttons, access_keys,
is_text_browser) is_text_browser, show_announces)
# start the timeline # start the timeline
tl_str += \ tl_str += \
@ -872,7 +872,7 @@ def html_timeline(default_timeline: str,
new_calendar_event, calendar_path, new_calendar_event, calendar_path,
calendar_image, follow_approvals, calendar_image, follow_approvals,
icons_as_buttons, access_keys, icons_as_buttons, access_keys,
is_text_browser) is_text_browser, show_announces)
tl_str += \ tl_str += \
' <div id="timelineposts" class="timeline-posts" ' + \ ' <div id="timelineposts" class="timeline-posts" ' + \