diff --git a/daemon.py b/daemon.py index 042edd5a2..3b0b9fd37 100644 --- a/daemon.py +++ b/daemon.py @@ -2393,7 +2393,8 @@ class PubServer(BaseHTTPRequestHandler): # person options screen, follow button # See htmlPersonOptions followStr - if '&submitFollow=' in optionsConfirmParams: + if '&submitFollow=' in optionsConfirmParams or \ + '&submitJoin=' in optionsConfirmParams: if debug: print('Following ' + optionsActor) msg = \ @@ -2412,7 +2413,8 @@ class PubServer(BaseHTTPRequestHandler): # person options screen, unfollow button # See htmlPersonOptions followStr - if '&submitUnfollow=' in optionsConfirmParams: + if '&submitUnfollow=' in optionsConfirmParams or \ + '&submitLeave=' in optionsConfirmParams: print('Unfollowing ' + optionsActor) msg = \ htmlConfirmUnfollow(self.server.cssCache, @@ -6365,6 +6367,7 @@ class PubServer(BaseHTTPRequestHandler): optionsLink = None if len(optionsList) > 3: optionsLink = optionsList[3] + isGroup = False donateUrl = None websiteUrl = None PGPpubKey = None @@ -6390,6 +6393,8 @@ class PubServer(BaseHTTPRequestHandler): movedTo = actorJson['movedTo'] if '"' in movedTo: movedTo = movedTo.split('"')[1] + if actorJson['type'] == 'Group': + isGroup = True lockedAccount = getLockedAccount(actorJson) donateUrl = getDonationUrl(actorJson) websiteUrl = getWebsite(actorJson, self.server.translate) @@ -6445,7 +6450,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.textModeBanner, self.server.newsInstance, authorized, - accessKeys).encode('utf-8') + accessKeys, isGroup).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, callingDomain, False) diff --git a/translations/ar.json b/translations/ar.json index c16604cc5..027f0a02f 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -485,5 +485,7 @@ "Request to stay": "طلب البقاء", "Profile": "الملف الشخصي", "Introduce yourself and specify the date and time when you wish to stay": "عرّف عن نفسك وحدد التاريخ والوقت اللذين ترغب في الإقامة فيهما", - "Members": "أعضاء" + "Members": "أعضاء", + "Join": "انضم", + "Leave": "يترك" } diff --git a/translations/ca.json b/translations/ca.json index 9a6c6444b..7e3920654 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -485,5 +485,7 @@ "Request to stay": "Sol·licitud de permanència", "Profile": "Perfil", "Introduce yourself and specify the date and time when you wish to stay": "Presenteu-vos i especifiqueu la data i l’hora en què voleu romandre", - "Members": "Membres" + "Members": "Membres", + "Join": "Uneix-te", + "Leave": "Marxa" } diff --git a/translations/cy.json b/translations/cy.json index b8eb55aca..337eea82a 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -485,5 +485,7 @@ "Request to stay": "Cais i aros", "Profile": "Proffil", "Introduce yourself and specify the date and time when you wish to stay": "Cyflwynwch eich hun a nodwch y dyddiad a'r amser pan fyddwch yn dymuno aros", - "Members": "Aelodau" + "Members": "Aelodau", + "Join": "Ymunwch", + "Leave": "Gadewch" } diff --git a/translations/de.json b/translations/de.json index 63489b1c0..9abc39dc1 100644 --- a/translations/de.json +++ b/translations/de.json @@ -485,5 +485,7 @@ "Request to stay": "Bitte um bleiben", "Profile": "Profil", "Introduce yourself and specify the date and time when you wish to stay": "Stellen Sie sich vor und geben Sie Datum und Uhrzeit Ihres Aufenthalts an", - "Members": "Mitglieder" + "Members": "Mitglieder", + "Join": "Verbinden", + "Leave": "Verlassen" } diff --git a/translations/en.json b/translations/en.json index 7d895e165..97ed49d7c 100644 --- a/translations/en.json +++ b/translations/en.json @@ -485,5 +485,7 @@ "Request to stay": "Request to stay", "Profile": "Profile", "Introduce yourself and specify the date and time when you wish to stay": "Introduce yourself and specify the date and time when you wish to stay", - "Members": "Members" + "Members": "Members", + "Join": "Join", + "Leave": "Leave" } diff --git a/translations/es.json b/translations/es.json index 697f261c3..5576bd971 100644 --- a/translations/es.json +++ b/translations/es.json @@ -485,5 +485,7 @@ "Request to stay": "Solicitud para quedarse", "Profile": "Perfil", "Introduce yourself and specify the date and time when you wish to stay": "Preséntese y especifique la fecha y hora en que desea quedarse", - "Members": "Miembros" + "Members": "Miembros", + "Join": "Entrar", + "Leave": "Dejar" } diff --git a/translations/fr.json b/translations/fr.json index 0cf07ee4b..a0b498f4f 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -485,5 +485,7 @@ "Request to stay": "Demande de séjour", "Profile": "Profil", "Introduce yourself and specify the date and time when you wish to stay": "Présentez-vous et précisez la date et l'heure auxquelles vous souhaitez rester", - "Members": "Membres" + "Members": "Membres", + "Join": "Rejoindre", + "Leave": "Laisser" } diff --git a/translations/ga.json b/translations/ga.json index b9734490b..0ca375921 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -485,5 +485,7 @@ "Request to stay": "Iarraidh fanacht", "Profile": "Próifíl", "Introduce yourself and specify the date and time when you wish to stay": "Cuir tú féin in aithne agus sonraigh an dáta agus an t-am ar mhaith leat fanacht", - "Members": "Baill" + "Members": "Baill", + "Join": "Bí páirteach", + "Leave": "Fág" } diff --git a/translations/hi.json b/translations/hi.json index 517b0ebb1..6b9af71af 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -485,5 +485,7 @@ "Request to stay": "रहने का अनुरोध", "Profile": "प्रोफ़ाइल", "Introduce yourself and specify the date and time when you wish to stay": "अपना परिचय दें और वह तारीख और समय निर्दिष्ट करें जब आप रुकना चाहते हैं", - "Members": "सदस्यों" + "Members": "सदस्यों", + "Join": "शामिल हों", + "Leave": "छोड़ना" } diff --git a/translations/it.json b/translations/it.json index 806dcf2fe..19c143f5f 100644 --- a/translations/it.json +++ b/translations/it.json @@ -485,5 +485,7 @@ "Request to stay": "Richiesta di soggiorno", "Profile": "Profilo", "Introduce yourself and specify the date and time when you wish to stay": "Presentati e specifica la data e l'ora in cui desideri soggiornare", - "Members": "Membri" + "Members": "Membri", + "Join": "Aderire", + "Leave": "Lasciare" } diff --git a/translations/ja.json b/translations/ja.json index 3801bbac9..18a6d237c 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -485,5 +485,7 @@ "Request to stay": "滞在リクエスト", "Profile": "プロフィール", "Introduce yourself and specify the date and time when you wish to stay": "自己紹介をし、滞在したい日時を指定してください", - "Members": "メンバー" + "Members": "メンバー", + "Join": "加入", + "Leave": "離れる" } diff --git a/translations/ku.json b/translations/ku.json index 469814b86..e6f6acb02 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -485,5 +485,7 @@ "Request to stay": "Daxwaza mayînê bikin", "Profile": "Tengal", "Introduce yourself and specify the date and time when you wish to stay": "Xwe bidin nasîn û roj û dema ku hûn dixwazin bimînin bimînin diyar bikin", - "Members": "Endam" + "Members": "Endam", + "Join": "Bihevgirêdan", + "Leave": "Terikandin" } diff --git a/translations/oc.json b/translations/oc.json index af1bad14d..bd0b30b3d 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -481,5 +481,7 @@ "Request to stay": "Request to stay", "Profile": "Profile", "Introduce yourself and specify the date and time when you wish to stay": "Introduce yourself and specify the date and time when you wish to stay", - "Members": "Members" + "Members": "Members", + "Join": "Join", + "Leave": "Leave" } diff --git a/translations/pt.json b/translations/pt.json index 2afc8eec2..d59ecdcc3 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -485,5 +485,7 @@ "Request to stay": "Pedido para ficar", "Profile": "Perfil", "Introduce yourself and specify the date and time when you wish to stay": "Apresente-se e especifique a data e hora em que deseja ficar", - "Members": "Membros" + "Members": "Membros", + "Join": "Juntar", + "Leave": "Sair" } diff --git a/translations/ru.json b/translations/ru.json index 07e874302..c9af59f6a 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -485,5 +485,7 @@ "Request to stay": "Просьба остаться", "Profile": "Профиль", "Introduce yourself and specify the date and time when you wish to stay": "Представьтесь и укажите дату и время, когда вы хотите остаться", - "Members": "Члены" + "Members": "Члены", + "Join": "Присоединиться", + "Leave": "Оставлять" } diff --git a/translations/sw.json b/translations/sw.json index 8bd8c89fa..326b271d1 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -485,5 +485,7 @@ "Request to stay": "Omba kukaa", "Profile": "Profaili", "Introduce yourself and specify the date and time when you wish to stay": "Jitambulishe na taja tarehe na saa unapotaka kukaa", - "Members": "Wanachama" + "Members": "Wanachama", + "Join": "Jiunge", + "Leave": "Ondoka" } diff --git a/translations/zh.json b/translations/zh.json index f3f236afc..4a08be59f 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -485,5 +485,7 @@ "Request to stay": "要求留下", "Profile": "轮廓", "Introduce yourself and specify the date and time when you wish to stay": "自我介绍并指定您希望入住的日期和时间", - "Members": "会员" + "Members": "会员", + "Join": "加入", + "Leave": "离开" } diff --git a/webapp_person_options.py b/webapp_person_options.py index f5ea2b3b5..1ff3bcfc4 100644 --- a/webapp_person_options.py +++ b/webapp_person_options.py @@ -60,7 +60,8 @@ def htmlPersonOptions(defaultTimeline: str, textModeBanner: str, newsInstance: bool, authorized: bool, - accessKeys: {}) -> str: + accessKeys: {}, + isGroup: bool) -> str: """Show options for a person: view/follow/block/report """ optionsDomain, optionsPort = getDomainFromActor(optionsActor) @@ -73,6 +74,8 @@ def htmlPersonOptions(defaultTimeline: str, dormant = False followStr = 'Follow' + if isGroup: + followStr = 'Join' blockStr = 'Block' nickname = None optionsNickname = None @@ -86,6 +89,8 @@ def htmlPersonOptions(defaultTimeline: str, followerDomain, followerPort = getDomainFromActor(optionsActor) if isFollowingActor(baseDir, nickname, domain, optionsActor): followStr = 'Unfollow' + if isGroup: + followStr = 'Leave' dormant = \ isDormant(baseDir, nickname, domain, optionsActor, dormantMonths)