Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions backend/open_webui/utils/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def to_local_datetime(timestamp_ns: int) -> dt.datetime:

range_start = to_local_datetime(range_start_ns)
range_end = to_local_datetime(range_end_ns)
scan_start = range_start - dt.timedelta(days=1)

original_start_ns = event_dict['start_at']
original_start = to_local_datetime(original_start_ns)
Expand All @@ -55,6 +54,9 @@ def to_local_datetime(timestamp_ns: int) -> dt.datetime:

original_end_ns = event_dict.get('end_at')
duration_ns = (original_end_ns - original_start_ns) if original_end_ns else None
# Look back by the event length so occurrences still running at range start are found
event_length = dt.timedelta(microseconds=max(duration_ns or 0, 0) // 1000)
scan_start = range_start - dt.timedelta(days=1) - event_length

instances = []
previous_start = None
Expand All @@ -64,12 +66,13 @@ def to_local_datetime(timestamp_ns: int) -> dt.datetime:
previous_start = occurrence_start

instance_start_ns = int(occurrence_start.replace(tzinfo=user_timezone).timestamp() * 1_000_000_000)
instance_end_ns = (instance_start_ns + duration_ns) if duration_ns else None

if instance_start_ns >= range_start_ns:
if instance_start_ns >= range_start_ns or (instance_end_ns and instance_end_ns > range_start_ns):
instance = {
**event_dict,
'start_at': instance_start_ns,
'end_at': (instance_start_ns + duration_ns) if duration_ns else None,
'end_at': instance_end_ns,
'instance_id': f'{event_dict["id"]}_{instance_start_ns}',
}
instances.append(instance)
Expand Down
8 changes: 6 additions & 2 deletions src/lib/i18n/locales/ar-BH/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
"Attach Notes": "إرفاق ملاحظات",
"Attach Webpage": "إرفاق صفحة ويب",
"Attention to detail": "انتبه للتفاصيل",
"Audio playback failed": "",
"Audio player": "مشغّل الصوت",
"August": "أغسطس",
"Auth": "المصادقة",
Expand Down Expand Up @@ -320,6 +321,7 @@
"Base Model (From)": "النموذج الأساسي (من)",
"Base Model is required.": "النموذج الأساسي مطلوب.",
"Base Models": "النماذج الأساسية",
"Basic": "",
"Basic text only": "النص العادي فقط",
"Basics": "الأساسيات",
"Bearer": "Bearer",
Expand Down Expand Up @@ -399,7 +401,6 @@
"Citation": "اقتباس",
"Citations": "الاستشهادات",
"Clear": "مسح",
"Clear filters to reorder": "امسح عوامل التصفية لإعادة الترتيب",
"Clear Memory": "مسح الذاكرة",
"Clear search": "مسح البحث",
"Clear status": "مسح الحالة",
Expand Down Expand Up @@ -1047,6 +1048,7 @@
"Failed to update webhook": "فشل في تحديث خطاف الويب",
"Failed to upload background image.": "",
"Failed to upload file.": "فشل في رفع الملف.",
"Fast": "",
"Features Permissions": "أذونات الميزات",
"February": "فبراير",
"Feedback": "الملاحظات",
Expand Down Expand Up @@ -1392,7 +1394,7 @@
"Message text...": "نص الرسالة...",
"messages": "— الرسائل",
"Messages": "الرسائل",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "لن تتم مشاركة الرسائل التي ترسلها بعد إنشاء الرابط الخاص بك. سيتمكن المستخدمون الذين لديهم عنوان URL من عرض الدردشة المشتركة",
"Messages you send after creating your link won't be shared. Your link is private until you choose who can view it.": "",
"Metadata Field": "حقل البيانات الوصفية",
"Microsoft OneDrive": "Microsoft OneDrive",
"Microsoft OneDrive (personal)": "Microsoft OneDrive (شخصي)",
Expand Down Expand Up @@ -2769,6 +2771,7 @@
"settings.admin.web.sougouSearchApiSk.label": "مفتاح SK لواجهة API لخدمة Sougou Search",
"settings.admin.web.tavilyApiKey.label": "مفتاح API لـ Tavily",
"settings.admin.web.tavilyExtractDepth.label": "عمق الاستخراج في Tavily",
"settings.admin.web.tavilySearchDepth.label": "",
"settings.admin.web.timeout.description": "المدة القصوى للانتظار أثناء تحميل محتوى الويب.",
"settings.admin.web.timeout.label": "المهلة",
"settings.admin.web.title": "بحث الويب",
Expand Down Expand Up @@ -3386,6 +3389,7 @@
"Type Hugging Face Resolve (Download) URL": "اكتب عنوان URL لحل مشكلة الوجه (تنزيل).",
"Type your answer": "اكتب إجابتك",
"Uh-oh! There was an issue with the response.": "أوه! حدثت مشكلة في الرد.",
"Ultra-fast": "",
"Unarchive": "",
"Unarchive Chat": "إلغاء أرشفة المحادثة",
"Unassigned": "غير معيّن",
Expand Down
8 changes: 6 additions & 2 deletions src/lib/i18n/locales/ar/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
"Attach Notes": "إرفاق ملاحظات",
"Attach Webpage": "إرفاق صفحة ويب",
"Attention to detail": "الاهتمام بالتفاصيل",
"Audio playback failed": "",
"Audio player": "مشغّل الصوت",
"August": "أغسطس",
"Auth": "المصادقة",
Expand Down Expand Up @@ -320,6 +321,7 @@
"Base Model (From)": "النموذج الأساسي (من)",
"Base Model is required.": "النموذج الأساسي مطلوب.",
"Base Models": "النماذج الأساسية",
"Basic": "",
"Basic text only": "النص العادي فقط",
"Basics": "الأساسيات",
"Bearer": "Bearer",
Expand Down Expand Up @@ -399,7 +401,6 @@
"Citation": "اقتباس",
"Citations": "الاستشهادات",
"Clear": "مسح",
"Clear filters to reorder": "امسح عوامل التصفية لإعادة الترتيب",
"Clear Memory": "مسح الذاكرة",
"Clear search": "مسح البحث",
"Clear status": "مسح الحالة",
Expand Down Expand Up @@ -1047,6 +1048,7 @@
"Failed to update webhook": "فشل في تحديث خطاف الويب",
"Failed to upload background image.": "",
"Failed to upload file.": "فشل في رفع الملف.",
"Fast": "",
"Features Permissions": "أذونات الميزات",
"February": "فبراير",
"Feedback": "الملاحظات",
Expand Down Expand Up @@ -1392,7 +1394,7 @@
"Message text...": "نص الرسالة...",
"messages": "— الرسائل",
"Messages": "الرسائل",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "لن تتم مشاركة الرسائل التي ترسلها بعد إنشاء الرابط الخاص بك. سيتمكن المستخدمون الذين لديهم عنوان URL من عرض الدردشة المشتركة",
"Messages you send after creating your link won't be shared. Your link is private until you choose who can view it.": "",
"Metadata Field": "حقل البيانات الوصفية",
"Microsoft OneDrive": "Microsoft OneDrive",
"Microsoft OneDrive (personal)": "Microsoft OneDrive (شخصي)",
Expand Down Expand Up @@ -2769,6 +2771,7 @@
"settings.admin.web.sougouSearchApiSk.label": "مفتاح SK لواجهة API لخدمة Sougou Search",
"settings.admin.web.tavilyApiKey.label": "مفتاح API لـ Tavily",
"settings.admin.web.tavilyExtractDepth.label": "عمق الاستخراج في Tavily",
"settings.admin.web.tavilySearchDepth.label": "",
"settings.admin.web.timeout.description": "المدة القصوى للانتظار أثناء تحميل محتوى الويب.",
"settings.admin.web.timeout.label": "المهلة",
"settings.admin.web.title": "بحث الويب",
Expand Down Expand Up @@ -3386,6 +3389,7 @@
"Type Hugging Face Resolve (Download) URL": "اكتب عنوان URL لحل مشكلة الوجه (تنزيل).",
"Type your answer": "اكتب إجابتك",
"Uh-oh! There was an issue with the response.": "أوه! حدثت مشكلة في الرد.",
"Ultra-fast": "",
"Unarchive": "",
"Unarchive Chat": "إلغاء أرشفة المحادثة",
"Unassigned": "غير معيّن",
Expand Down
8 changes: 6 additions & 2 deletions src/lib/i18n/locales/az-AZ/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"Attach Notes": "Qeydlər əlavə et",
"Attach Webpage": "Veb səhifə əlavə et",
"Attention to detail": "Detallara diqqət",
"Audio playback failed": "",
"Audio player": "Audio pleyer",
"August": "Avqust",
"Auth": "Səlahiyyətləndirmə (Auth)",
Expand Down Expand Up @@ -284,6 +285,7 @@
"Base Model (From)": "Əsas Model (Mənbə)",
"Base Model is required.": "Əsas model tələb olunur.",
"Base Models": "Əsas modellər",
"Basic": "",
"Basic text only": "Yalnız sadə mətn",
"Basics": "Əsaslar",
"Bearer": "Bearer (Daşıyıcı)",
Expand Down Expand Up @@ -363,7 +365,6 @@
"Citation": "Sitat",
"Citations": "Sitatlar",
"Clear": "Təmizlə",
"Clear filters to reorder": "Sıranı dəyişmək üçün süzgəcləri təmizləyin",
"Clear Memory": "Yaddaşı Təmizlə",
"Clear search": "Axtarışı təmizlə",
"Clear status": "Statusu təmizlə",
Expand Down Expand Up @@ -999,6 +1000,7 @@
"Failed to update webhook": "Webhook yenilənə bilmədi",
"Failed to upload background image.": "",
"Failed to upload file.": "Fayl yüklənmədi.",
"Fast": "",
"Features Permissions": "Özəllik icazələri",
"February": "Fevral",
"Feedback": "Rəy",
Expand Down Expand Up @@ -1340,7 +1342,7 @@
"Message text...": "Mesaj mətni...",
"messages": "mesajlar",
"Messages": "Mesajlar",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "Linki yaratdıqdan sonra göndərdiyiniz mesajlar paylaşılmayacaq. URL-ə sahib olan istifadəçilər paylaşılan çata baxa biləcəklər.",
"Messages you send after creating your link won't be shared. Your link is private until you choose who can view it.": "",
"Metadata Field": "Metaməlumat sahəsi",
"Microsoft OneDrive": "Microsoft OneDrive",
"Microsoft OneDrive (personal)": "Microsoft OneDrive (şəxsi)",
Expand Down Expand Up @@ -2705,6 +2707,7 @@
"settings.admin.web.sougouSearchApiSk.label": "Sougou Search API SK",
"settings.admin.web.tavilyApiKey.label": "Tavily API key",
"settings.admin.web.tavilyExtractDepth.label": "Tavily çıxarış dərinliyi",
"settings.admin.web.tavilySearchDepth.label": "",
"settings.admin.web.timeout.description": "Veb məzmunu yüklənərkən maksimum gözləmə müddəti.",
"settings.admin.web.timeout.label": "Vaxt aşımı",
"settings.admin.web.title": "Veb axtarış",
Expand Down Expand Up @@ -3318,6 +3321,7 @@
"Type Hugging Face Resolve (Download) URL": "Hugging Face Resolve (Yükləmə) URL-ni yazın",
"Type your answer": "Cavabınızı yazın",
"Uh-oh! There was an issue with the response.": "Vay! Cavabda problem yarandı.",
"Ultra-fast": "",
"Unarchive": "",
"Unarchive Chat": "Çatı arxivdən çıxar",
"Unassigned": "Təyin edilməyib",
Expand Down
8 changes: 6 additions & 2 deletions src/lib/i18n/locales/bg-BG/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"Attach Notes": "Прикачи бележки",
"Attach Webpage": "Прикачи уебстраница",
"Attention to detail": "Внимание към детайлите",
"Audio playback failed": "",
"Audio player": "Аудиоплейър",
"August": "Август",
"Auth": "Автентикация",
Expand Down Expand Up @@ -284,6 +285,7 @@
"Base Model (From)": "Базов модел (от)",
"Base Model is required.": "Базовият модел е задължителен.",
"Base Models": "Базови модели",
"Basic": "",
"Basic text only": "Само обикновен текст",
"Basics": "Основни",
"Bearer": "Bearer",
Expand Down Expand Up @@ -363,7 +365,6 @@
"Citation": "Цитат",
"Citations": "Цитирания",
"Clear": "Изчисти",
"Clear filters to reorder": "Изчистете филтрите, за да промените реда",
"Clear Memory": "Изчисти паметта",
"Clear search": "Изчисти търсенето",
"Clear status": "Изчисти състоянието",
Expand Down Expand Up @@ -999,6 +1000,7 @@
"Failed to update webhook": "Неуспешно актуализиране на уебкуката",
"Failed to upload background image.": "",
"Failed to upload file.": "Неуспешно качване на файл.",
"Fast": "",
"Features Permissions": "Разрешения за функции",
"February": "Февруари",
"Feedback": "Обратна връзка",
Expand Down Expand Up @@ -1340,7 +1342,7 @@
"Message text...": "Текст на съобщението...",
"messages": "— съобщения",
"Messages": "Съобщения",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "Съобщенията, които изпращате след създаването на връзката, няма да бъдат споделяни. Потребителите с URL адреса ще могат да видят споделения чат.",
"Messages you send after creating your link won't be shared. Your link is private until you choose who can view it.": "",
"Metadata Field": "Поле за метаданни",
"Microsoft OneDrive": "Microsoft OneDrive",
"Microsoft OneDrive (personal)": "Microsoft OneDrive (личен)",
Expand Down Expand Up @@ -2705,6 +2707,7 @@
"settings.admin.web.sougouSearchApiSk.label": "Sougou Search API SK",
"settings.admin.web.tavilyApiKey.label": "Tavily API Ключ",
"settings.admin.web.tavilyExtractDepth.label": "Дълбочина на извличане с Tavily",
"settings.admin.web.tavilySearchDepth.label": "",
"settings.admin.web.timeout.description": "Максимално време за изчакване при зареждане на уеб съдържание.",
"settings.admin.web.timeout.label": "Време за изчакване",
"settings.admin.web.title": "Търсене в уеб",
Expand Down Expand Up @@ -3318,6 +3321,7 @@
"Type Hugging Face Resolve (Download) URL": "Въведете Hugging Face Resolve (Изтегляне) URL",
"Type your answer": "Въведете отговора си",
"Uh-oh! There was an issue with the response.": "Ох! Имаше проблем с отговора.",
"Ultra-fast": "",
"Unarchive": "",
"Unarchive Chat": "Разархивирай чат",
"Unassigned": "Неразпределени",
Expand Down
8 changes: 6 additions & 2 deletions src/lib/i18n/locales/bn-BD/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@
"Attach Notes": "নোট সংযুক্ত করুন",
"Attach Webpage": "ওয়েবপৃষ্ঠা সংযুক্ত করুন",
"Attention to detail": "বিস্তারিত বিশেষতা",
"Audio playback failed": "",
"Audio player": "অডিও প্লেয়ার",
"August": "আগস্ট",
"Auth": "প্রমাণীকরণ",
Expand Down Expand Up @@ -284,6 +285,7 @@
"Base Model (From)": "বেস মডেল (থেকে)",
"Base Model is required.": "বেস মডেল প্রয়োজন।",
"Base Models": "বেস মডেলসমূহ",
"Basic": "",
"Basic text only": "শুধু সাধারণ পাঠ্য",
"Basics": "মৌলিক বিষয়",
"Bearer": "Bearer",
Expand Down Expand Up @@ -363,7 +365,6 @@
"Citation": "উদ্ধৃতি",
"Citations": "তথ্যসূত্র",
"Clear": "পরিষ্কার করুন",
"Clear filters to reorder": "ক্রম বদলাতে ফিল্টার পরিষ্কার করুন",
"Clear Memory": "মেমোরি পরিষ্কার করুন",
"Clear search": "অনুসন্ধান পরিষ্কার করুন",
"Clear status": "অবস্থা পরিষ্কার করুন",
Expand Down Expand Up @@ -999,6 +1000,7 @@
"Failed to update webhook": "ওয়েবহুক আপডেট করা যায়নি",
"Failed to upload background image.": "",
"Failed to upload file.": "ফাইল আপলোড করা যায়নি।",
"Fast": "",
"Features Permissions": "সুবিধাসমূহের অনুমতি",
"February": "ফেব্রুয়ারি",
"Feedback": "মতামত",
Expand Down Expand Up @@ -1340,7 +1342,7 @@
"Message text...": "বার্তার টেক্সট...",
"messages": "বার্তা",
"Messages": "বার্তাসমূহ",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "আপনার লিঙ্ক তৈরি করার পরে আপনার পাঠানো বার্তাগুলি শেয়ার করা হবে না। ইউআরএল ব্যবহারকারীরা শেয়ার করা চ্যাট দেখতে পারবেন।",
"Messages you send after creating your link won't be shared. Your link is private until you choose who can view it.": "",
"Metadata Field": "মেটাডেটা ক্ষেত্র",
"Microsoft OneDrive": "Microsoft OneDrive",
"Microsoft OneDrive (personal)": "Microsoft OneDrive (ব্যক্তিগত)",
Expand Down Expand Up @@ -2705,6 +2707,7 @@
"settings.admin.web.sougouSearchApiSk.label": "Sougou Search API SK",
"settings.admin.web.tavilyApiKey.label": "Tavily API কী",
"settings.admin.web.tavilyExtractDepth.label": "Tavily তথ্য আহরণের গভীরতা",
"settings.admin.web.tavilySearchDepth.label": "",
"settings.admin.web.timeout.description": "ওয়েব কনটেন্ট লোডের সময় সর্বোচ্চ অপেক্ষা।",
"settings.admin.web.timeout.label": "অপেক্ষার সময়সীমা",
"settings.admin.web.title": "ওয়েব অনুসন্ধান",
Expand Down Expand Up @@ -3318,6 +3321,7 @@
"Type Hugging Face Resolve (Download) URL": "Hugging Face থেকে ডাউনলোড করার ইউআরএল টাইপ করুন",
"Type your answer": "আপনার উত্তর লিখুন",
"Uh-oh! There was an issue with the response.": "ওহ! উত্তরে একটি সমস্যা হয়েছে।",
"Ultra-fast": "",
"Unarchive": "",
"Unarchive Chat": "চ্যাট আর্কাইভ থেকে ফিরিয়ে আনুন",
"Unassigned": "নির্ধারিত নয়",
Expand Down
Loading
Loading