Checkbox for receiving calendar events

main
Bob Mottram 2020-07-03 20:11:05 +01:00
parent ebd681d11a
commit 0b47d6fd3d
16 changed files with 47 additions and 15 deletions

View File

@ -248,5 +248,6 @@
"Bad Request": "اقتراح غير جيد", "Bad Request": "اقتراح غير جيد",
"Better luck next time": "حظ أوفر في المرة القادمة", "Better luck next time": "حظ أوفر في المرة القادمة",
"Unavailable": "غير متوفره", "Unavailable": "غير متوفره",
"The server is busy. Please try again later": "الخادم مشغول. الرجاء معاودة المحاولة في وقت لاحق" "The server is busy. Please try again later": "الخادم مشغول. الرجاء معاودة المحاولة في وقت لاحق",
"Receive calendar events from this account": "تلقي أحداث التقويم من هذا الحساب"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Sol·licitud incorrecta", "Bad Request": "Sol·licitud incorrecta",
"Better luck next time": "Que tingueu més sort la propera vegada", "Better luck next time": "Que tingueu més sort la propera vegada",
"Unavailable": "No disponible", "Unavailable": "No disponible",
"The server is busy. Please try again later": "El servidor està ocupat. Siusplau, intenta-ho més tard" "The server is busy. Please try again later": "El servidor està ocupat. Siusplau, intenta-ho més tard",
"Receive calendar events from this account": "Rep esdeveniments del calendari des daquest compte"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Cais drwg", "Bad Request": "Cais drwg",
"Better luck next time": "Gwell lwc y tro nesaf", "Better luck next time": "Gwell lwc y tro nesaf",
"Unavailable": "Ddim ar gael", "Unavailable": "Ddim ar gael",
"The server is busy. Please try again later": "Mae'r gweinydd yn brysur. Rho gynnig Arni eto'n hwyrach" "The server is busy. Please try again later": "Mae'r gweinydd yn brysur. Rho gynnig Arni eto'n hwyrach",
"Receive calendar events from this account": "Derbyn digwyddiadau calendr o'r cyfrif hwn"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Ungültige Anforderung", "Bad Request": "Ungültige Anforderung",
"Better luck next time": "Viel Glück beim nächsten Mal", "Better luck next time": "Viel Glück beim nächsten Mal",
"Unavailable": "Nicht verfügbar", "Unavailable": "Nicht verfügbar",
"The server is busy. Please try again later": "Der Server ist beschäftigt. Bitte versuchen Sie es später noch einmal" "The server is busy. Please try again later": "Der Server ist beschäftigt. Bitte versuchen Sie es später noch einmal",
"Receive calendar events from this account": "Erhalten Sie Kalenderereignisse von diesem Konto"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Bad Request", "Bad Request": "Bad Request",
"Better luck next time": "Better luck next time", "Better luck next time": "Better luck next time",
"Unavailable": "Unavailable", "Unavailable": "Unavailable",
"The server is busy. Please try again later": "The server is busy. Please try again later" "The server is busy. Please try again later": "The server is busy. Please try again later",
"Receive calendar events from this account": "Receive calendar events from this account"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Solicitud incorrecta", "Bad Request": "Solicitud incorrecta",
"Better luck next time": "Mejor suerte la próxima vez", "Better luck next time": "Mejor suerte la próxima vez",
"Unavailable": "Indisponible", "Unavailable": "Indisponible",
"The server is busy. Please try again later": "El servidor esta ocupado. Por favor, inténtelo de nuevo más tarde" "The server is busy. Please try again later": "El servidor esta ocupado. Por favor, inténtelo de nuevo más tarde",
"Receive calendar events from this account": "Recibe eventos de calendario de esta cuenta"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Mauvaise Demande", "Bad Request": "Mauvaise Demande",
"Better luck next time": "Plus de chance la prochaine fois", "Better luck next time": "Plus de chance la prochaine fois",
"Unavailable": "Indisponible", "Unavailable": "Indisponible",
"The server is busy. Please try again later": "Le serveur est occupé. Veuillez réessayer plus tard" "The server is busy. Please try again later": "Le serveur est occupé. Veuillez réessayer plus tard",
"Receive calendar events from this account": "Recevoir des événements d'agenda de ce compte"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Droch-Iarraidh", "Bad Request": "Droch-Iarraidh",
"Better luck next time": "Ádh níos fearr an chéad uair eile", "Better luck next time": "Ádh níos fearr an chéad uair eile",
"Unavailable": "Níl sé ar fáil", "Unavailable": "Níl sé ar fáil",
"The server is busy. Please try again later": "Tá an freastalaí gnóthach. Bain triail eile as níos déanaí" "The server is busy. Please try again later": "Tá an freastalaí gnóthach. Bain triail eile as níos déanaí",
"Receive calendar events from this account": "Faigh imeachtaí féilire ón gcuntas seo"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "खराब अनुरोध", "Bad Request": "खराब अनुरोध",
"Better luck next time": "अगली बार किस्मत तुम्हारा साथ देगी", "Better luck next time": "अगली बार किस्मत तुम्हारा साथ देगी",
"Unavailable": "अनुपलब्ध", "Unavailable": "अनुपलब्ध",
"The server is busy. Please try again later": "सर्वर व्यस्त है। बाद में पुन: प्रयास करें" "The server is busy. Please try again later": "सर्वर व्यस्त है। बाद में पुन: प्रयास करें",
"Receive calendar events from this account": "इस खाते से कैलेंडर ईवेंट प्राप्त करें"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Brutta richiesta", "Bad Request": "Brutta richiesta",
"Better luck next time": "La prossima volta sarai più fortunato", "Better luck next time": "La prossima volta sarai più fortunato",
"Unavailable": "non disponibile", "Unavailable": "non disponibile",
"The server is busy. Please try again later": "Il server è occupato. Per favore riprova più tardi" "The server is busy. Please try again later": "Il server è occupato. Per favore riprova più tardi",
"Receive calendar events from this account": "Ricevi eventi di calendario da questo account"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "要求の形式が正しくありません", "Bad Request": "要求の形式が正しくありません",
"Better luck next time": "次回は幸運を", "Better luck next time": "次回は幸運を",
"Unavailable": "利用できません", "Unavailable": "利用できません",
"The server is busy. Please try again later": "サーバーはビジーです。 後でもう一度やり直してください" "The server is busy. Please try again later": "サーバーはビジーです。 後でもう一度やり直してください",
"Receive calendar events from this account": "このアカウントからカレンダーイベントを受信します"
} }

View File

@ -244,5 +244,6 @@
"Bad Request": "Bad Request", "Bad Request": "Bad Request",
"Better luck next time": "Better luck next time", "Better luck next time": "Better luck next time",
"Unavailable": "Unavailable", "Unavailable": "Unavailable",
"The server is busy. Please try again later": "The server is busy. Please try again later" "The server is busy. Please try again later": "The server is busy. Please try again later",
"Receive calendar events from this account": "Receive calendar events from this account"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Pedido ruim", "Bad Request": "Pedido ruim",
"Better luck next time": "Mais sorte da próxima vez", "Better luck next time": "Mais sorte da próxima vez",
"Unavailable": "Indisponível", "Unavailable": "Indisponível",
"The server is busy. Please try again later": "O servidor está ocupado. Por favor, tente novamente mais tarde" "The server is busy. Please try again later": "O servidor está ocupado. Por favor, tente novamente mais tarde",
"Receive calendar events from this account": "Receba eventos da agenda desta conta"
} }

View File

@ -248,5 +248,6 @@
"Bad Request": "Неверный запрос", "Bad Request": "Неверный запрос",
"Better luck next time": "Повезет в следующий раз", "Better luck next time": "Повезет в следующий раз",
"Unavailable": "Недоступен", "Unavailable": "Недоступен",
"The server is busy. Please try again later": "Сервер занят. Пожалуйста, попробуйте позже" "The server is busy. Please try again later": "Сервер занят. Пожалуйста, попробуйте позже",
"Receive calendar events from this account": "Получать события календаря от этого аккаунта"
} }

View File

@ -247,5 +247,6 @@
"Bad Request": "错误的请求", "Bad Request": "错误的请求",
"Better luck next time": "下次好运", "Better luck next time": "下次好运",
"Unavailable": "不可用", "Unavailable": "不可用",
"The server is busy. Please try again later": "服务器忙。 请稍后再试" "The server is busy. Please try again later": "服务器忙。 请稍后再试",
"Receive calendar events from this account": "从该帐户接收日历事件"
} }

View File

@ -74,6 +74,7 @@ from happening import getTodaysEvents
from git import isGitPatch from git import isGitPatch
from theme import getThemesList from theme import getThemesList
from petnames import getPetName from petnames import getPetName
from calendar import receivingCalendarEvents
def getContentWarningButton(postID: str, translate: {}, def getContentWarningButton(postID: str, translate: {},
@ -5450,6 +5451,22 @@ def htmlPersonOptions(translate: {}, baseDir: str,
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submitReport">' + \ ' <button type="submit" class="button" name="submitReport">' + \
translate['Report'] + '</button>' translate['Report'] + '</button>'
if isFollowingActor(baseDir, nickname, domain, optionsActor):
actorNickname = getNicknameFromActor(optionsActor)
actorDomain, actorPort = getDomainFromActor(optionsActor)
if receivingCalendarEvents(baseDir, nickname, domain,
actorNickname, actorDomain):
optionsStr += \
'<br><input type="checkbox" ' + \
'class="profilecheckbox" name="onCalendar" ' + \
'checked>' + \
translate['Receive calendar events from this account']
else:
optionsStr += \
'<br><input type="checkbox" ' + \
'class="profilecheckbox" name="onCalendar">' + \
translate['Receive calendar events from this account']
optionsStr += ' </form>' optionsStr += ' </form>'
optionsStr += '</center>' optionsStr += '</center>'
optionsStr += '</div>' optionsStr += '</div>'