diff --git a/translations/ar.json b/translations/ar.json index 7bc139782..9ac84707f 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "قائمة بأسماء المطورين. واحد في كل سطر.", "devops": "devops", "Reject spam accounts": "رفض حسابات البريد العشوائي", - "User Manual": "دليل الاستخدام" + "User Manual": "دليل الاستخدام", + "Allow announces": "تعلن السماح" } diff --git a/translations/bn.json b/translations/bn.json index b455a0a9c..d1585defb 100644 --- a/translations/bn.json +++ b/translations/bn.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "ডেভপস ডাকনামের একটি তালিকা। প্রতি লাইনে একটি।", "devops": "devops", "Reject spam accounts": "স্প্যাম অ্যাকাউন্ট প্রত্যাখ্যান করুন", - "User Manual": "ব্যবহার বিধি" + "User Manual": "ব্যবহার বিধি", + "Allow announces": "ঘোষণার অনুমতি দিন" } diff --git a/translations/ca.json b/translations/ca.json index c3737d855..f8f89aaf0 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Una llista de sobrenoms de devops. Un per línia.", "devops": "devops", "Reject spam accounts": "Rebutja els comptes de correu brossa", - "User Manual": "Manual d'usuari" + "User Manual": "Manual d'usuari", + "Allow announces": "Permet anuncis" } diff --git a/translations/cy.json b/translations/cy.json index 3414d01be..b7fd46cd9 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Mae rhestr o devops llysenwau. Un i bob llinell.", "devops": "devops", "Reject spam accounts": "Gwrthod cyfrifon sbam", - "User Manual": "Llawlyfr Defnyddiwr" + "User Manual": "Llawlyfr Defnyddiwr", + "Allow announces": "Caniatáu cyhoeddiadau" } diff --git a/translations/de.json b/translations/de.json index cdd124108..392968280 100644 --- a/translations/de.json +++ b/translations/de.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Eine Liste von Entwickler-Spitznamen. Eine pro Zeile.", "devops": "devops", "Reject spam accounts": "Gwrthod cyfrifon sbam", - "User Manual": "Benutzerhandbuch" + "User Manual": "Benutzerhandbuch", + "Allow announces": "Zulassen kündigt an" } diff --git a/translations/el.json b/translations/el.json index c966954d5..28a04b514 100644 --- a/translations/el.json +++ b/translations/el.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Μια λίστα με ψευδώνυμα devops. Ένα ανά γραμμή.", "devops": "devops", "Reject spam accounts": "Gwrthod cyfrifon sbam", - "User Manual": "Εγχειρίδιο χρήστη" + "User Manual": "Εγχειρίδιο χρήστη", + "Allow announces": "Allow ανακοινώνει" } diff --git a/translations/en.json b/translations/en.json index 584084820..1e66e70f9 100644 --- a/translations/en.json +++ b/translations/en.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "A list of devops nicknames. One per line.", "devops": "devops", "Reject spam accounts": "Reject spam accounts", - "User Manual": "User Manual" + "User Manual": "User Manual", + "Allow announces": "Allow announces" } diff --git a/translations/es.json b/translations/es.json index 7447e5b94..dfb233c07 100644 --- a/translations/es.json +++ b/translations/es.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Una lista de apodos de devops. Uno por línea.", "devops": "devops", "Reject spam accounts": "Rechazar cuentas de spam", - "User Manual": "Manual de usuario" + "User Manual": "Manual de usuario", + "Allow announces": "Permitir anuncios" } diff --git a/translations/fr.json b/translations/fr.json index 0e07445c5..1652a4c56 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Une liste de surnoms de devops. Un par ligne.", "devops": "devops", "Reject spam accounts": "Rejeter les comptes de spam", - "User Manual": "Manuel de l'Utilisateur" + "User Manual": "Manuel de l'Utilisateur", + "Allow announces": "Autoriser les annonces" } diff --git a/translations/ga.json b/translations/ga.json index 17551e459..0589f0e24 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Tá liosta devops leasainmneacha. Ceann in aghaidh an líne.", "devops": "devops", "Reject spam accounts": "Diúltaigh cuntais turscair", - "User Manual": "Lámhleabhar Úsáideora" + "User Manual": "Lámhleabhar Úsáideora", + "Allow announces": "Ceadaigh fógraí" } diff --git a/translations/hi.json b/translations/hi.json index 8dd495d9d..560d4e201 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "देवोप्स उपनामों की एक सूची। प्रति पंक्ति एक।", "devops": "devops", "Reject spam accounts": "स्पैम खातों को अस्वीकार करें", - "User Manual": "उपयोगकर्ता पुस्तिका" + "User Manual": "उपयोगकर्ता पुस्तिका", + "Allow announces": "घोषणा की अनुमति दें" } diff --git a/translations/it.json b/translations/it.json index 313e8edb8..e2a4559e5 100644 --- a/translations/it.json +++ b/translations/it.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Un elenco di soprannomi devops. Uno per riga.", "devops": "devops", "Reject spam accounts": "Rifiuta gli account spam", - "User Manual": "Manuale d'uso" + "User Manual": "Manuale d'uso", + "Allow announces": "Consenti annunci" } diff --git a/translations/ja.json b/translations/ja.json index 56e567ad8..e5d0d80f9 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "DevOps ニックネームのリスト。 1 行に 1 つ。", "devops": "devops", "Reject spam accounts": "スパムアカウントを拒否", - "User Manual": "ユーザーマニュアル" + "User Manual": "ユーザーマニュアル", + "Allow announces": "アナウンスを許可" } diff --git a/translations/ko.json b/translations/ko.json index 833fef494..00b8ee2ea 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "데브옵스 닉네임 목록입니다. 한 줄에 하나씩.", "devops": "devops", "Reject spam accounts": "스팸 계정 거부", - "User Manual": "사용자 매뉴얼" + "User Manual": "사용자 매뉴얼", + "Allow announces": "공지 허용" } diff --git a/translations/ku.json b/translations/ku.json index 5de6b24a0..ce3dd1bdb 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Lîsteya navên devops. Her rêzek yek.", "devops": "devops", "Reject spam accounts": "Hesabên spam red bikin", - "User Manual": "Manual Bikarhêner" + "User Manual": "Manual Bikarhêner", + "Allow announces": "Destûr dide ragihandin" } diff --git a/translations/nl.json b/translations/nl.json index 96e70b4a7..591668797 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Een lijst met devops-bijnamen. Een per regel.", "devops": "devops", "Reject spam accounts": "Spamaccounts afwijzen", - "User Manual": "Handleiding" + "User Manual": "Handleiding", + "Allow announces": "Aankondigingen toestaan" } diff --git a/translations/oc.json b/translations/oc.json index cd42bc632..fc514f626 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -591,5 +591,6 @@ "A list of devops nicknames. One per line.": "A list of devops nicknames. One per line.", "devops": "devops", "Reject spam accounts": "Reject spam accounts", - "User Manual": "User Manual" + "User Manual": "User Manual", + "Allow announces": "Allow announces" } diff --git a/translations/pl.json b/translations/pl.json index 5251a3ba0..1c4b3c514 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Lista pseudonimów Devopa. Jeden na linię.", "devops": "devops", "Reject spam accounts": "Odrzuć konta spamowe", - "User Manual": "Instrukcja obsługi" + "User Manual": "Instrukcja obsługi", + "Allow announces": "Zezwól na ogłoszenia" } diff --git a/translations/pt.json b/translations/pt.json index cdb49560d..dfcb99f94 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Uma lista de apelidos de devops. Um por linha.", "devops": "devops", "Reject spam accounts": "Rejeitar contas de spam", - "User Manual": "Manual do usuário" + "User Manual": "Manual do usuário", + "Allow announces": "Permitir anúncios" } diff --git a/translations/ru.json b/translations/ru.json index c3dbdfb8b..e3dee70e4 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Список псевдонимов devops. По одному на строку.", "devops": "devops", "Reject spam accounts": "Отклонить спам-аккаунты", - "User Manual": "Руководство пользователя" + "User Manual": "Руководство пользователя", + "Allow announces": "Разрешить объявления" } diff --git a/translations/sw.json b/translations/sw.json index 5fa4afbd3..848475e63 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Orodha ya majina ya utani ya devops. Moja kwa kila mstari.", "devops": "devops", "Reject spam accounts": "Kataa akaunti za barua taka", - "User Manual": "Mwongozo wa mtumiaji" + "User Manual": "Mwongozo wa mtumiaji", + "Allow announces": "Ruhusu matangazo" } diff --git a/translations/tr.json b/translations/tr.json index 9bc1e42d7..f5561cecc 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Devops takma adlarının listesi. Her satıra bir tane.", "devops": "devops", "Reject spam accounts": "Spam hesapları reddet", - "User Manual": "Kullanım kılavuzu" + "User Manual": "Kullanım kılavuzu", + "Allow announces": "Duyurulara izin ver" } diff --git a/translations/uk.json b/translations/uk.json index cf338ecbc..b77aed64f 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "Список ніків devops. По одному на рядок.", "devops": "devops", "Reject spam accounts": "Відхилити спам-акаунти", - "User Manual": "Посібник користувача" + "User Manual": "Посібник користувача", + "Allow announces": "Дозволити оголошення" } diff --git a/translations/yi.json b/translations/yi.json index c1207aa94..287c5a75d 100644 --- a/translations/yi.json +++ b/translations/yi.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "א רשימה פון דיוואָפּס ניקניימז. איינער פּער שורה.", "devops": "devops", "Reject spam accounts": "אָפּוואַרפן ספּאַם אַקאַונץ", - "User Manual": "באנוצער אנווייזער" + "User Manual": "באנוצער אנווייזער", + "Allow announces": "לאָזן אַנאַונסיז" } diff --git a/translations/zh.json b/translations/zh.json index 3ccbda6ca..63773410e 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -595,5 +595,6 @@ "A list of devops nicknames. One per line.": "devops 昵称列表。 每行一个。", "devops": "devops", "Reject spam accounts": "拒绝垃圾邮件帐户", - "User Manual": "用户手册" + "User Manual": "用户手册", + "Allow announces": "לאָזן אַנאַונסיז" } diff --git a/webapp_person_options.py b/webapp_person_options.py index ff89710f6..ec543f30f 100644 --- a/webapp_person_options.py +++ b/webapp_person_options.py @@ -34,6 +34,7 @@ from webapp_utils import html_keyboard_navigation from webapp_utils import get_banner_file from webapp_utils import html_hide_from_screen_reader from webapp_utils import minimizing_attached_images +from blocking import allowed_announce def _minimize_attached_images(base_dir: str, nickname: str, domain: str, @@ -415,6 +416,18 @@ def html_person_options(default_timeline: str, # Notify when a post arrives from this person if is_following_actor(base_dir, nickname, domain, options_actor): + checkbox_str = \ + ' <input type="checkbox" class="profilecheckbox" ' + \ + 'name="allowAnnounce" checked> 🔁' + \ + translate['Allow announces'] + \ + '\n <button type="submit" class="buttonsmall" ' + \ + 'name="submitAllowAnnounces">' + \ + translate['Save'] + '</button><br>\n' + if not allowed_announce(base_dir, nickname, domain, + options_nickname, options_domain_full): + checkbox_str = checkbox_str.replace(' checked>', '>') + options_str += checkbox_str + checkbox_str = \ ' <input type="checkbox" class="profilecheckbox" ' + \ 'name="notifyOnPost" checked> 🔔' + \