diff --git a/daemon.py b/daemon.py index 5466675b1..729910cf6 100644 --- a/daemon.py +++ b/daemon.py @@ -22433,10 +22433,10 @@ class PubServer(BaseHTTPRequestHandler): else: print('Adding wanted item') shares_file_type = 'wanted' - on_profile = False - if fields.get('onProfile'): - if fields['onProfile'] == 'on': - on_profile = True + share_on_profile = False + if fields.get('shareOnProfile'): + if fields['shareOnProfile'] == 'on': + share_on_profile = True add_share(self.server.base_dir, self.server.http_prefix, nickname, @@ -22454,9 +22454,9 @@ class PubServer(BaseHTTPRequestHandler): self.server.translate, shares_file_type, self.server.low_bandwidth, self.server.content_license_url, - on_profile) + share_on_profile) if post_type == 'newshare': - # add onProfile items to the actor attachments + # add shareOnProfile items to the actor attachments # https://codeberg.org/fediverse/fep/src/branch/main/fep/0837/fep-0837.md actor = \ self._get_instance_url(calling_domain) + \ diff --git a/shares.py b/shares.py index 30253e0d3..bf9dea91f 100644 --- a/shares.py +++ b/shares.py @@ -314,7 +314,7 @@ def add_share(base_dir: str, price: str, currency: str, system_language: str, translate: {}, shares_file_type: str, low_bandwidth: bool, - content_license_url: str, on_profile: bool) -> None: + content_license_url: str, share_on_profile: bool) -> None: """Adds a new share """ if is_filtered_globally(base_dir, @@ -394,7 +394,7 @@ def add_share(base_dir: str, "expire": duration_sec, "itemPrice": price, "itemCurrency": currency, - "onProfile": on_profile + "shareOnProfile": share_on_profile } save_json(shares_json, shares_filename) @@ -1929,7 +1929,7 @@ def _dfc_to_shares_format(catalog_json: {}, "expire": expiry_time_sec, "itemPrice": item['DFC:price'].split(' ')[0], "itemCurrency": item['DFC:price'].split(' ')[1], - "onProfile": False + "shareOnProfile": False } return shares_json @@ -2181,7 +2181,7 @@ def add_shares_to_actor(base_dir: str, for share_id, shared_item in shares_json.items(): if ctr >= max_shares_on_profile: break - if not shared_item.get('onProfile'): + if not shared_item.get('shareOnProfile'): continue if not shared_item.get('shareId'): continue diff --git a/translations/ar.json b/translations/ar.json index 1d338c764..655275693 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -631,5 +631,6 @@ "Chat": "محادثة", "Chat link": "رابط الدردشة", "Clear Cache": "مسح ذاكرة التخزين المؤقت", - "Block military instances": "منع الحالات العسكرية" + "Block military instances": "منع الحالات العسكرية", + "Display on your public profile": "عرض على ملفك الشخصي العام" } diff --git a/translations/bn.json b/translations/bn.json index 6a0c70950..1fbfb9d3d 100644 --- a/translations/bn.json +++ b/translations/bn.json @@ -631,5 +631,6 @@ "Chat": "চ্যাট", "Chat link": "চ্যাট লিঙ্ক", "Clear Cache": "ক্যাশে সাফ করুন", - "Block military instances": "সামরিক দৃষ্টান্ত ব্লক করুন" + "Block military instances": "সামরিক দৃষ্টান্ত ব্লক করুন", + "Display on your public profile": "আপনার পাবলিক প্রোফাইলে প্রদর্শন করুন" } diff --git a/translations/ca.json b/translations/ca.json index 13f2f3104..819a236fa 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -631,5 +631,6 @@ "Chat": "Xatejar", "Chat link": "Enllaç de xat", "Clear Cache": "Netejar memòria cau", - "Block military instances": "Bloquejar instàncies militars" + "Block military instances": "Bloquejar instàncies militars", + "Display on your public profile": "Mostra al teu perfil públic" } diff --git a/translations/cy.json b/translations/cy.json index 8d59af46e..836e5a930 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -631,5 +631,6 @@ "Chat": "Sgwrsio", "Chat link": "Dolen sgwrs", "Clear Cache": "Clirio Cache", - "Block military instances": "Rhwystro achosion milwrol" + "Block military instances": "Rhwystro achosion milwrol", + "Display on your public profile": "Arddangos ar eich proffil cyhoeddus" } diff --git a/translations/de.json b/translations/de.json index 8af96945b..c6660210b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -631,5 +631,6 @@ "Chat": "Plaudern", "Chat link": "Chat-Link", "Clear Cache": "Cache leeren", - "Block military instances": "Militärische Instanzen blockieren" + "Block military instances": "Militärische Instanzen blockieren", + "Display on your public profile": "Anzeige in Ihrem öffentlichen Profil" } diff --git a/translations/el.json b/translations/el.json index a520c0ddc..bb667a268 100644 --- a/translations/el.json +++ b/translations/el.json @@ -631,5 +631,6 @@ "Chat": "Κουβέντα", "Chat link": "Σύνδεσμος συνομιλίας", "Clear Cache": "Εκκαθάριση προσωρινής μνήμης", - "Block military instances": "Αποκλεισμός στρατιωτικών περιπτώσεων" + "Block military instances": "Αποκλεισμός στρατιωτικών περιπτώσεων", + "Display on your public profile": "Εμφάνιση στο δημόσιο προφίλ σας" } diff --git a/translations/en.json b/translations/en.json index 84abbef23..904b51694 100644 --- a/translations/en.json +++ b/translations/en.json @@ -631,5 +631,6 @@ "Chat": "Chat", "Chat link": "Chat link", "Clear Cache": "Clear Cache", - "Block military instances": "Block military instances" + "Block military instances": "Block military instances", + "Display on your public profile": "Display on your public profile" } diff --git a/translations/es.json b/translations/es.json index fbbd4f5ea..6a183092e 100644 --- a/translations/es.json +++ b/translations/es.json @@ -631,5 +631,6 @@ "Chat": "Charlar", "Chat link": "Enlace de chat", "Clear Cache": "Limpiar cache", - "Block military instances": "Bloquear instancias militares" + "Block military instances": "Bloquear instancias militares", + "Display on your public profile": "Mostrar en su perfil público" } diff --git a/translations/fa.json b/translations/fa.json index 643e421f4..75c41a93c 100644 --- a/translations/fa.json +++ b/translations/fa.json @@ -631,5 +631,6 @@ "Chat": "چت کنید", "Chat link": "لینک چت", "Clear Cache": "پاک کردن حافظه پنهان", - "Block military instances": "موارد نظامی را مسدود کنید" + "Block military instances": "موارد نظامی را مسدود کنید", + "Display on your public profile": "نمایش در نمایه عمومی شما" } diff --git a/translations/fr.json b/translations/fr.json index d36c0807e..48c00fa97 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -631,5 +631,6 @@ "Chat": "Discuter", "Chat link": "Lien de discussion", "Clear Cache": "Vider le cache", - "Block military instances": "Bloquer les instances militaires" + "Block military instances": "Bloquer les instances militaires", + "Display on your public profile": "Afficher sur votre profil public" } diff --git a/translations/ga.json b/translations/ga.json index 4d397b73c..cc205b09c 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -631,5 +631,6 @@ "Chat": "Comhrá", "Chat link": "Nasc comhrá", "Clear Cache": "Glan Taisce", - "Block military instances": "Bloc cásanna míleata" + "Block military instances": "Bloc cásanna míleata", + "Display on your public profile": "Taispeáin ar do phróifíl phoiblí" } diff --git a/translations/he.json b/translations/he.json index c7949e2c3..457856a48 100644 --- a/translations/he.json +++ b/translations/he.json @@ -631,5 +631,6 @@ "Chat": "לְשׂוֹחֵחַ", "Chat link": "קישור לצ'אט", "Clear Cache": "נקה מטמון", - "Block military instances": "חסום מקרים צבאיים" + "Block military instances": "חסום מקרים צבאיים", + "Display on your public profile": "הצג בפרופיל הציבורי שלך" } diff --git a/translations/hi.json b/translations/hi.json index 22e8ee956..22bf5c9da 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -631,5 +631,6 @@ "Chat": "बात करना", "Chat link": "चैट लिंक", "Clear Cache": "कैश को साफ़ करें", - "Block military instances": "सैन्य उदाहरणों को ब्लॉक करें" + "Block military instances": "सैन्य उदाहरणों को ब्लॉक करें", + "Display on your public profile": "अपनी सार्वजनिक प्रोफ़ाइल पर प्रदर्शित करें" } diff --git a/translations/it.json b/translations/it.json index 798c58438..08cc09a9e 100644 --- a/translations/it.json +++ b/translations/it.json @@ -631,5 +631,6 @@ "Chat": "Chiacchierata", "Chat link": "Collegamento alla chat", "Clear Cache": "Cancella cache", - "Block military instances": "Blocca istanze militari" + "Block military instances": "Blocca istanze militari", + "Display on your public profile": "Visualizza sul tuo profilo pubblico" } diff --git a/translations/ja.json b/translations/ja.json index 01c22c224..3cae37478 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -631,5 +631,6 @@ "Chat": "チャット", "Chat link": "チャットリンク", "Clear Cache": "キャッシュの消去", - "Block military instances": "軍事インスタンスをブロックする" + "Block military instances": "軍事インスタンスをブロックする", + "Display on your public profile": "公開プロフィールに表示する" } diff --git a/translations/ko.json b/translations/ko.json index 31ae1bcdd..7cac95f05 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -631,5 +631,6 @@ "Chat": "채팅", "Chat link": "채팅 링크", "Clear Cache": "캐시 지우기", - "Block military instances": "군사 인스턴스 차단" + "Block military instances": "군사 인스턴스 차단", + "Display on your public profile": "공개 프로필에 표시" } diff --git a/translations/ku.json b/translations/ku.json index 4f70b5ebb..6b8676b30 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -631,5 +631,6 @@ "Chat": "Galgalkirin", "Chat link": "Lînka chatê", "Clear Cache": "Cache paqij bike", - "Block military instances": "Mînakên leşkerî asteng bikin" + "Block military instances": "Mînakên leşkerî asteng bikin", + "Display on your public profile": "Li ser profîla xweya giştî nîşan bidin" } diff --git a/translations/nl.json b/translations/nl.json index d04c47a45..9257d78cd 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -631,5 +631,6 @@ "Chat": "Chatten", "Chat link": "Chat-link", "Clear Cache": "Cache wissen", - "Block military instances": "Blokkeer militaire instanties" + "Block military instances": "Blokkeer militaire instanties", + "Display on your public profile": "Weergave op uw openbare profiel" } diff --git a/translations/oc.json b/translations/oc.json index bcae63ccc..7fa9008ac 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -627,5 +627,6 @@ "Chat": "Chat", "Chat link": "Chat link", "Clear Cache": "Clear Cache", - "Block military instances": "Block military instances" + "Block military instances": "Block military instances", + "Display on your public profile": "Display on your public profile" } diff --git a/translations/pl.json b/translations/pl.json index 674af7c77..20786aef4 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -631,5 +631,6 @@ "Chat": "Czat", "Chat link": "Link do czatu", "Clear Cache": "Wyczyść pamięć podręczną", - "Block military instances": "Blokuj instancje wojskowe" + "Block military instances": "Blokuj instancje wojskowe", + "Display on your public profile": "Wyświetlaj na swoim profilu publicznym" } diff --git a/translations/pt.json b/translations/pt.json index 380759211..90fe8b3af 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -631,5 +631,6 @@ "Chat": "Bater papo", "Chat link": "Link de bate-papo", "Clear Cache": "Limpar cache", - "Block military instances": "Bloquear instâncias militares" + "Block military instances": "Bloquear instâncias militares", + "Display on your public profile": "Exibir em seu perfil público" } diff --git a/translations/ru.json b/translations/ru.json index f7829139a..86380ce4f 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -631,5 +631,6 @@ "Chat": "Чат", "Chat link": "Ссылка на чат", "Clear Cache": "Очистить кэш", - "Block military instances": "Блокировать военные инстансы" + "Block military instances": "Блокировать военные инстансы", + "Display on your public profile": "Отобразить в своем общедоступном профиле" } diff --git a/translations/sw.json b/translations/sw.json index 4ee55415c..46c8fc1d1 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -631,5 +631,6 @@ "Chat": "Soga", "Chat link": "Kiungo cha gumzo", "Clear Cache": "Futa Cache", - "Block military instances": "Zuia matukio ya kijeshi" + "Block military instances": "Zuia matukio ya kijeshi", + "Display on your public profile": "Onyesha kwenye wasifu wako wa umma" } diff --git a/translations/tr.json b/translations/tr.json index c2d95caa5..25b12a2d3 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -631,5 +631,6 @@ "Chat": "Sohbet", "Chat link": "Sohbet bağlantısı", "Clear Cache": "Önbelleği Temizle", - "Block military instances": "Askeri örnekleri engelle" + "Block military instances": "Askeri örnekleri engelle", + "Display on your public profile": "Herkese açık profilinizde görüntüleyin" } diff --git a/translations/uk.json b/translations/uk.json index e3b0c6c95..8df45cf6f 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -631,5 +631,6 @@ "Chat": "Чат", "Chat link": "Посилання на чат", "Clear Cache": "Очистити кеш", - "Block military instances": "Блокувати військові інстанції" + "Block military instances": "Блокувати військові інстанції", + "Display on your public profile": "Відображати у своєму публічному профілі" } diff --git a/translations/yi.json b/translations/yi.json index 4beb218fa..09edf12ed 100644 --- a/translations/yi.json +++ b/translations/yi.json @@ -631,5 +631,6 @@ "Chat": "שמועסן", "Chat link": "שמועס לינק", "Clear Cache": "קלאָר קאַש", - "Block military instances": "פאַרשפּאַרן מיליטעריש ינסטאַנסיז" + "Block military instances": "פאַרשפּאַרן מיליטעריש ינסטאַנסיז", + "Display on your public profile": "ווייַז אויף דיין עפנטלעך פּראָפיל" } diff --git a/translations/zh.json b/translations/zh.json index 5138fb2b4..516d0aa74 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -631,5 +631,6 @@ "Chat": "聊天", "Chat link": "聊天链接", "Clear Cache": "קלאָר קאַש", - "Block military instances": "阻止军事实例" + "Block military instances": "阻止军事实例", + "Display on your public profile": "显示在您的公开个人资料上" } diff --git a/webapp_create_post.py b/webapp_create_post.py index c04cf58f5..84db7c180 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -24,6 +24,7 @@ from utils import get_currencies from utils import get_category_types from utils import get_account_timezone from utils import get_supported_languages +from webapp_utils import edit_check_box from webapp_utils import get_buy_links from webapp_utils import html_following_data_list from webapp_utils import html_common_emoji @@ -627,6 +628,9 @@ def html_new_post(edit_post_params: {}, extra_fields += \ edit_number_field(translate['Duration of listing in days'], 'duration', 14, 1, 365, 1) + extra_fields += \ + edit_check_box(translate['Display on your public profile'], + 'shareOnProfile', False) extra_fields += '\n' extra_fields += '
\n' city_or_loc_str = translate['City or location of the shared item']