From cd4600501d2d77d746df029863f83295e87b8c04 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Mon, 1 Dec 2025 12:42:57 -0500 Subject: [PATCH] feat: make course default chats optional to add (#4756) --- lib/l10n/intl_ar.arb | 22 ++- lib/l10n/intl_be.arb | 22 ++- lib/l10n/intl_bn.arb | 22 ++- lib/l10n/intl_bo.arb | 22 ++- lib/l10n/intl_ca.arb | 22 ++- lib/l10n/intl_cs.arb | 22 ++- lib/l10n/intl_da.arb | 22 ++- lib/l10n/intl_de.arb | 22 ++- lib/l10n/intl_el.arb | 22 ++- lib/l10n/intl_en.arb | 6 +- lib/l10n/intl_eo.arb | 22 ++- lib/l10n/intl_es.arb | 22 ++- lib/l10n/intl_et.arb | 22 ++- lib/l10n/intl_eu.arb | 22 ++- lib/l10n/intl_fa.arb | 22 ++- lib/l10n/intl_fi.arb | 22 ++- lib/l10n/intl_fil.arb | 22 ++- lib/l10n/intl_fr.arb | 22 ++- lib/l10n/intl_ga.arb | 22 ++- lib/l10n/intl_gl.arb | 22 ++- lib/l10n/intl_he.arb | 22 ++- lib/l10n/intl_hi.arb | 22 ++- lib/l10n/intl_hr.arb | 22 ++- lib/l10n/intl_hu.arb | 22 ++- lib/l10n/intl_ia.arb | 22 ++- lib/l10n/intl_id.arb | 22 ++- lib/l10n/intl_ie.arb | 22 ++- lib/l10n/intl_it.arb | 22 ++- lib/l10n/intl_ja.arb | 22 ++- lib/l10n/intl_ka.arb | 22 ++- lib/l10n/intl_ko.arb | 22 ++- lib/l10n/intl_lt.arb | 22 ++- lib/l10n/intl_lv.arb | 22 ++- lib/l10n/intl_nb.arb | 22 ++- lib/l10n/intl_nl.arb | 22 ++- lib/l10n/intl_pl.arb | 22 ++- lib/l10n/intl_pt.arb | 22 ++- lib/l10n/intl_pt_BR.arb | 22 ++- lib/l10n/intl_pt_PT.arb | 22 ++- lib/l10n/intl_ro.arb | 22 ++- lib/l10n/intl_ru.arb | 22 ++- lib/l10n/intl_sk.arb | 22 ++- lib/l10n/intl_sl.arb | 22 ++- lib/l10n/intl_sr.arb | 22 ++- lib/l10n/intl_sv.arb | 22 ++- lib/l10n/intl_ta.arb | 22 ++- lib/l10n/intl_te.arb | 22 ++- lib/l10n/intl_th.arb | 22 ++- lib/l10n/intl_tr.arb | 22 ++- lib/l10n/intl_uk.arb | 22 ++- lib/l10n/intl_vi.arb | 22 ++- lib/l10n/intl_yue.arb | 22 ++- lib/l10n/intl_zh.arb | 22 ++- lib/l10n/intl_zh_Hant.arb | 22 ++- lib/pages/new_group/new_group.dart | 2 - .../course_chats/course_chats_page.dart | 37 +++++ .../course_chats_settings_model.dart | 31 ++++ .../course_chats/course_chats_view.dart | 56 ++++++- .../course_default_chats_enum.dart | 29 ++++ .../course_creation/selected_course_page.dart | 2 - .../courses/course_plan_room_extension.dart | 82 +++++++++ .../events/constants/pangea_event_types.dart | 1 + .../room_children_and_parents_extension.dart | 8 + .../room_information_extension.dart | 14 -- .../spaces/utils/client_spaces_extension.dart | 155 ------------------ lib/utils/client_manager.dart | 1 + 66 files changed, 1362 insertions(+), 228 deletions(-) create mode 100644 lib/pangea/course_chats/course_chats_settings_model.dart create mode 100644 lib/pangea/course_chats/course_default_chats_enum.dart diff --git a/lib/l10n/intl_ar.arb b/lib/l10n/intl_ar.arb index 9d5ab48ee..535a803a0 100644 --- a/lib/l10n/intl_ar.arb +++ b/lib/l10n/intl_ar.arb @@ -1,6 +1,6 @@ { "@@locale": "ar", - "@@last_modified": "2025-11-20 14:54:02.760300", + "@@last_modified": "2025-12-01 12:40:30.614200", "about": "حول", "@about": { "type": "String", @@ -10800,5 +10800,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "إنشاء دردشة التعريفات", + "introChatDesc": "يمكن لأي شخص في المساحة النشر.", + "announcementsChatTitle": "دردشة الإعلانات", + "announcementsChatDesc": "يمكن فقط لمسؤول المساحة النشر.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_be.arb b/lib/l10n/intl_be.arb index dc08d54d8..3e6b5bf58 100644 --- a/lib/l10n/intl_be.arb +++ b/lib/l10n/intl_be.arb @@ -1915,7 +1915,7 @@ "playWithAI": "Пакуль гуляйце з ШІ", "courseStartDesc": "Pangea Bot гатовы да працы ў любы час!\n\n...але навучанне лепш з сябрамі!", "@@locale": "be", - "@@last_modified": "2025-11-20 14:53:56.300239", + "@@last_modified": "2025-12-01 12:40:15.499665", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11682,5 +11682,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Стварыць чат для ўвядзення", + "introChatDesc": "Кожны ў прасторы можа публікаваць.", + "announcementsChatTitle": "Чат аб'яў", + "announcementsChatDesc": "Толькі адміністратар прасторы можа публікаваць.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_bn.arb b/lib/l10n/intl_bn.arb index 7a18787d2..b85bf6358 100644 --- a/lib/l10n/intl_bn.arb +++ b/lib/l10n/intl_bn.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:10.871486", + "@@last_modified": "2025-12-01 12:40:51.296376", "about": "সম্পর্কে", "@about": { "type": "String", @@ -11687,5 +11687,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "পরিচয় চ্যাট তৈরি করুন", + "introChatDesc": "স্পেসের যে কেউ পোস্ট করতে পারে।", + "announcementsChatTitle": "ঘোষণার চ্যাট", + "announcementsChatDesc": "শুধুমাত্র স্পেস প্রশাসক পোস্ট করতে পারে।", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_bo.arb b/lib/l10n/intl_bo.arb index a288d4efe..b2f3cd444 100644 --- a/lib/l10n/intl_bo.arb +++ b/lib/l10n/intl_bo.arb @@ -4282,7 +4282,7 @@ "joinPublicTrip": "མི་ཚེས་ལ་ལོག་འབད།", "startOwnTrip": "ངེད་རང་གི་ལོག་ལ་སྦྱོར་བཅོས།", "@@locale": "bo", - "@@last_modified": "2025-11-20 14:54:09.235231", + "@@last_modified": "2025-12-01 12:40:47.506429", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -10333,5 +10333,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Buat Obrolan Pengenalan", + "introChatDesc": "Sesiapa dalam ruang boleh menghantar.", + "announcementsChatTitle": "Obrolan Pengumuman", + "announcementsChatDesc": "Hanya admin ruang yang boleh menghantar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ca.arb b/lib/l10n/intl_ca.arb index 40a542753..233e46d57 100644 --- a/lib/l10n/intl_ca.arb +++ b/lib/l10n/intl_ca.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:57.101713", + "@@last_modified": "2025-12-01 12:40:17.930439", "about": "Quant a", "@about": { "type": "String", @@ -10607,5 +10607,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Crear xat d'introduccions", + "introChatDesc": "Qualsevol persona de l'espai pot publicar.", + "announcementsChatTitle": "Xat d'anuncis", + "announcementsChatDesc": "Només l'administrador de l'espai pot publicar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_cs.arb b/lib/l10n/intl_cs.arb index 24ce2d7fa..f9154fbda 100644 --- a/lib/l10n/intl_cs.arb +++ b/lib/l10n/intl_cs.arb @@ -1,6 +1,6 @@ { "@@locale": "cs", - "@@last_modified": "2025-11-20 14:53:54.804617", + "@@last_modified": "2025-12-01 12:40:10.951068", "about": "O aplikaci", "@about": { "type": "String", @@ -11190,5 +11190,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Vytvořit chat pro úvody", + "introChatDesc": "Kdokoli ve prostoru může přispět.", + "announcementsChatTitle": "Chat pro oznámení", + "announcementsChatDesc": "Pouze administrátor prostoru může přispět.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_da.arb b/lib/l10n/intl_da.arb index 1b891d4b0..413a56682 100644 --- a/lib/l10n/intl_da.arb +++ b/lib/l10n/intl_da.arb @@ -1934,7 +1934,7 @@ "playWithAI": "Leg med AI for nu", "courseStartDesc": "Pangea Bot er klar til at starte når som helst!\n\n...men læring er bedre med venner!", "@@locale": "da", - "@@last_modified": "2025-11-20 14:53:35.097620", + "@@last_modified": "2025-12-01 12:39:32.959549", "@aboutHomeserver": { "type": "String", "placeholders": { @@ -11645,5 +11645,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Opret Introduktioner Chat", + "introChatDesc": "Alle i rummet kan poste.", + "announcementsChatTitle": "Meddelelser Chat", + "announcementsChatDesc": "Kun rumadmin kan poste.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index f1253de77..002f120d3 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,6 @@ { "@@locale": "de", - "@@last_modified": "2025-11-20 14:53:50.178435", + "@@last_modified": "2025-12-01 12:40:01.799437", "alwaysUse24HourFormat": "true", "@alwaysUse24HourFormat": { "description": "Set to true to always display time of day in 24 hour format." @@ -10590,5 +10590,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Erstelle Einführungs-Chat", + "introChatDesc": "Jeder im Raum kann posten.", + "announcementsChatTitle": "Ankündigungen-Chat", + "announcementsChatDesc": "Nur der Raum-Administrator kann posten.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_el.arb b/lib/l10n/intl_el.arb index e285d0a1c..2a4365a66 100644 --- a/lib/l10n/intl_el.arb +++ b/lib/l10n/intl_el.arb @@ -4460,7 +4460,7 @@ "playWithAI": "Παίξτε με την Τεχνητή Νοημοσύνη προς το παρόν", "courseStartDesc": "Ο Pangea Bot είναι έτοιμος να ξεκινήσει οποιαδήποτε στιγμή!\n\n...αλλά η μάθηση είναι καλύτερη με φίλους!", "@@locale": "el", - "@@last_modified": "2025-11-20 14:54:14.475585", + "@@last_modified": "2025-12-01 12:41:00.324485", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11641,5 +11641,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Δημιουργία Συνομιλίας Εισαγωγών", + "introChatDesc": "Οποιοσδήποτε στον χώρο μπορεί να δημοσιεύσει.", + "announcementsChatTitle": "Συνομιλία Ανακοινώσεων", + "announcementsChatDesc": "Μόνο ο διαχειριστής του χώρου μπορεί να δημοσιεύσει.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index a5de887df..3a1d13733 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -4957,5 +4957,9 @@ "noSavedActivitiesYet": "Activities will appear here once they are completed and saved.", "practiceActivityCompleted": "Practice activity completed", "changeCourse": "Change course", - "changeCourseDesc": "Here you can change this course's course plan." + "changeCourseDesc": "Here you can change this course's course plan.", + "introChatTitle": "Create Introductions Chat", + "introChatDesc": "Anyone in the space can post.", + "announcementsChatTitle": "Announcements Chat", + "announcementsChatDesc": "Only space admin can post." } diff --git a/lib/l10n/intl_eo.arb b/lib/l10n/intl_eo.arb index 0aeed8059..ce36972fe 100644 --- a/lib/l10n/intl_eo.arb +++ b/lib/l10n/intl_eo.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:18.264427", + "@@last_modified": "2025-12-01 12:41:06.553946", "about": "Prio", "@about": { "type": "String", @@ -11672,5 +11672,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Krei Enkondukan Ĉaton", + "introChatDesc": "Ĉiu en la spaco povas afiŝi.", + "announcementsChatTitle": "Afiŝoj Ĉato", + "announcementsChatDesc": "Nur la administranto de la spaco povas afiŝi.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 37bf6e74b..d0a3dc119 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,6 @@ { "@@locale": "es", - "@@last_modified": "2025-11-20 14:53:31.098192", + "@@last_modified": "2025-12-01 12:39:26.176542", "about": "Acerca de", "@about": { "type": "String", @@ -7818,5 +7818,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Crear Chat de Introducciones", + "introChatDesc": "Cualquiera en el espacio puede publicar.", + "announcementsChatTitle": "Chat de Anuncios", + "announcementsChatDesc": "Solo el administrador del espacio puede publicar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_et.arb b/lib/l10n/intl_et.arb index 8be0b1828..0b3c52f51 100644 --- a/lib/l10n/intl_et.arb +++ b/lib/l10n/intl_et.arb @@ -1,6 +1,6 @@ { "@@locale": "et", - "@@last_modified": "2025-11-20 14:53:49.442060", + "@@last_modified": "2025-12-01 12:40:00.288987", "about": "Rakenduse teave", "@about": { "type": "String", @@ -10854,5 +10854,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Loo tutvustuste vestlus", + "introChatDesc": "Igaüks ruumis saab postitada.", + "announcementsChatTitle": "Teadete vestlus", + "announcementsChatDesc": "Ainult ruumi administraator saab postitada.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_eu.arb b/lib/l10n/intl_eu.arb index d3bd9cc6a..8ad828f0c 100644 --- a/lib/l10n/intl_eu.arb +++ b/lib/l10n/intl_eu.arb @@ -1,6 +1,6 @@ { "@@locale": "eu", - "@@last_modified": "2025-11-20 14:53:47.461492", + "@@last_modified": "2025-12-01 12:39:55.136173", "about": "Honi buruz", "@about": { "type": "String", @@ -10583,5 +10583,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Sarrera Aurkezpen Txata sortu", + "introChatDesc": "Espazioan edonork postatu dezake.", + "announcementsChatTitle": "Iragarki Txata", + "announcementsChatDesc": "Espazioaren administratzaileak bakarrik postatu dezake.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_fa.arb b/lib/l10n/intl_fa.arb index e08f4c298..0c7adf97c 100644 --- a/lib/l10n/intl_fa.arb +++ b/lib/l10n/intl_fa.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:11.691213", + "@@last_modified": "2025-12-01 12:40:53.664453", "repeatPassword": "تکرار رمزعبور", "@repeatPassword": {}, "about": "درباره", @@ -11315,5 +11315,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "ایجاد چت معرفی", + "introChatDesc": "هر کسی در این فضا می‌تواند پست کند.", + "announcementsChatTitle": "چت اعلامیه‌ها", + "announcementsChatDesc": "فقط مدیر فضا می‌تواند پست کند.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_fi.arb b/lib/l10n/intl_fi.arb index 95cee03ea..a1fc64a6a 100644 --- a/lib/l10n/intl_fi.arb +++ b/lib/l10n/intl_fi.arb @@ -4013,7 +4013,7 @@ "playWithAI": "Leiki tekoälyn kanssa nyt", "courseStartDesc": "Pangea Bot on valmis milloin tahansa!\n\n...mutta oppiminen on parempaa ystävien kanssa!", "@@locale": "fi", - "@@last_modified": "2025-11-20 14:53:34.208462", + "@@last_modified": "2025-12-01 12:39:30.795641", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11206,5 +11206,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Luo esittelykeskustelu", + "introChatDesc": "Kuka tahansa tilassa voi julkaista.", + "announcementsChatTitle": "Ilmoitukset keskustelu", + "announcementsChatDesc": "Vain tilan ylläpitäjä voi julkaista.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_fil.arb b/lib/l10n/intl_fil.arb index 840569a04..218efb5ef 100644 --- a/lib/l10n/intl_fil.arb +++ b/lib/l10n/intl_fil.arb @@ -2791,7 +2791,7 @@ "selectAll": "Piliin lahat", "deselectAll": "Huwag piliin lahat", "@@locale": "fil", - "@@last_modified": "2025-11-20 14:54:01.155789", + "@@last_modified": "2025-12-01 12:40:26.597168", "@setCustomPermissionLevel": { "type": "String", "placeholders": {} @@ -11559,5 +11559,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Lumikha ng Introductions Chat", + "introChatDesc": "Sinuman sa espasyo ay maaaring mag-post.", + "announcementsChatTitle": "Announcements Chat", + "announcementsChatDesc": "Tanging ang admin ng espasyo ang maaaring mag-post.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index d26959ef2..d9dae107c 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,6 @@ { "@@locale": "fr", - "@@last_modified": "2025-11-20 14:54:22.927028", + "@@last_modified": "2025-12-01 12:41:17.297464", "about": "À propos", "@about": { "type": "String", @@ -10907,5 +10907,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Créer un chat d'introduction", + "introChatDesc": "Tout le monde dans l'espace peut publier.", + "announcementsChatTitle": "Chat des annonces", + "announcementsChatDesc": "Seul l'administrateur de l'espace peut publier.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ga.arb b/lib/l10n/intl_ga.arb index 883d18bca..7c3957e0e 100644 --- a/lib/l10n/intl_ga.arb +++ b/lib/l10n/intl_ga.arb @@ -4521,7 +4521,7 @@ "playWithAI": "Imir le AI faoi láthair", "courseStartDesc": "Tá Bot Pangea réidh chun dul am ar bith!\n\n...ach is fearr foghlaim le cairde!", "@@locale": "ga", - "@@last_modified": "2025-11-20 14:54:22.114918", + "@@last_modified": "2025-12-01 12:41:14.642020", "@customReaction": { "type": "String", "placeholders": {} @@ -10581,5 +10581,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Cruthaigh Comhrá Réamhrá", + "introChatDesc": "Is féidir le haon duine sa spás post a chur.", + "announcementsChatTitle": "Comhrá Fógraí", + "announcementsChatDesc": "Ní féidir ach le hoifigeach spáis post a chur.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_gl.arb b/lib/l10n/intl_gl.arb index be3f50c6c..6d71957a9 100644 --- a/lib/l10n/intl_gl.arb +++ b/lib/l10n/intl_gl.arb @@ -1,6 +1,6 @@ { "@@locale": "gl", - "@@last_modified": "2025-11-20 14:53:32.298371", + "@@last_modified": "2025-12-01 12:39:28.351166", "about": "Acerca de", "@about": { "type": "String", @@ -10580,5 +10580,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Crear Chat de Presentación", + "introChatDesc": "Qualquera no espazo pode publicar.", + "announcementsChatTitle": "Chat de Anuncios", + "announcementsChatDesc": "Sólo o administrador do espazo pode publicar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_he.arb b/lib/l10n/intl_he.arb index 2d00e7f6f..e9795a2dd 100644 --- a/lib/l10n/intl_he.arb +++ b/lib/l10n/intl_he.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:44.448591", + "@@last_modified": "2025-12-01 12:39:50.470332", "about": "אודות", "@about": { "type": "String", @@ -11632,5 +11632,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "צור צ'אט היכרות", + "introChatDesc": "כל אחד במרחב יכול לפרסם.", + "announcementsChatTitle": "צ'אט הודעות", + "announcementsChatDesc": "רק מנהל המרחב יכול לפרסם.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_hi.arb b/lib/l10n/intl_hi.arb index 22f604aa8..500be974d 100644 --- a/lib/l10n/intl_hi.arb +++ b/lib/l10n/intl_hi.arb @@ -4487,7 +4487,7 @@ "playWithAI": "अभी के लिए एआई के साथ खेलें", "courseStartDesc": "पैंजिया बॉट कभी भी जाने के लिए तैयार है!\n\n...लेकिन दोस्तों के साथ सीखना बेहतर है!", "@@locale": "hi", - "@@last_modified": "2025-11-20 14:54:17.425082", + "@@last_modified": "2025-12-01 12:41:04.318728", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11668,5 +11668,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "परिचय चैट बनाएं", + "introChatDesc": "इस स्थान में कोई भी पोस्ट कर सकता है।", + "announcementsChatTitle": "घोषणाएँ चैट", + "announcementsChatDesc": "केवल स्थान प्रशासक पोस्ट कर सकता है।", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_hr.arb b/lib/l10n/intl_hr.arb index 38e0a2de1..0ad8aa798 100644 --- a/lib/l10n/intl_hr.arb +++ b/lib/l10n/intl_hr.arb @@ -1,6 +1,6 @@ { "@@locale": "hr", - "@@last_modified": "2025-11-20 14:53:43.599159", + "@@last_modified": "2025-12-01 12:39:46.878014", "about": "Informacije", "@about": { "type": "String", @@ -10955,5 +10955,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Kreiraj chat za uvod", + "introChatDesc": "Svako u prostoru može objavljivati.", + "announcementsChatTitle": "Chat za obavijesti", + "announcementsChatDesc": "Samo administrator prostora može objavljivati.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_hu.arb b/lib/l10n/intl_hu.arb index ac4d81da8..345965542 100644 --- a/lib/l10n/intl_hu.arb +++ b/lib/l10n/intl_hu.arb @@ -1,6 +1,6 @@ { "@@locale": "hu", - "@@last_modified": "2025-11-20 14:53:36.261794", + "@@last_modified": "2025-12-01 12:39:34.911828", "about": "Névjegy", "@about": { "type": "String", @@ -10584,5 +10584,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Bevezető Beszélgetés Létrehozása", + "introChatDesc": "A térben bárki posztolhat.", + "announcementsChatTitle": "Közlemények Beszélgetés", + "announcementsChatDesc": "Csak a tér adminisztrátora posztolhat.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ia.arb b/lib/l10n/intl_ia.arb index e9135d524..4e11f8c1d 100644 --- a/lib/l10n/intl_ia.arb +++ b/lib/l10n/intl_ia.arb @@ -1962,7 +1962,7 @@ "playWithAI": "Joca con le IA pro ora", "courseStartDesc": "Pangea Bot es preste a comenzar a qualunque momento!\n\n...ma apprender es melior con amicos!", "@@locale": "ia", - "@@last_modified": "2025-11-20 14:53:45.693586", + "@@last_modified": "2025-12-01 12:39:51.766931", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11661,5 +11661,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Crea Chat de Introducciones", + "introChatDesc": "Cualquiera en el espacio puede publicar.", + "announcementsChatTitle": "Chat de Anuncios", + "announcementsChatDesc": "Solo el administrador del espacio puede publicar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_id.arb b/lib/l10n/intl_id.arb index f5908e61b..fdea88d64 100644 --- a/lib/l10n/intl_id.arb +++ b/lib/l10n/intl_id.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:37.035253", + "@@last_modified": "2025-12-01 12:39:37.053489", "setAsCanonicalAlias": "Atur sebagai alias utama", "@setAsCanonicalAlias": { "type": "String", @@ -10574,5 +10574,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Buat Obrolan Perkenalan", + "introChatDesc": "Siapa pun di ruang ini dapat memposting.", + "announcementsChatTitle": "Obrolan Pengumuman", + "announcementsChatDesc": "Hanya admin ruang yang dapat memposting.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ie.arb b/lib/l10n/intl_ie.arb index f9303e749..ea9bdf4c7 100644 --- a/lib/l10n/intl_ie.arb +++ b/lib/l10n/intl_ie.arb @@ -4376,7 +4376,7 @@ "playWithAI": "Joca con AI pro ora", "courseStartDesc": "Pangea Bot es preste a partir a qualunque momento!\n\n...ma apprender es melior con amicos!", "@@locale": "ie", - "@@last_modified": "2025-11-20 14:53:42.684180", + "@@last_modified": "2025-12-01 12:39:45.041098", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11557,5 +11557,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Cruthaigh Comhrá Réamhrá", + "introChatDesc": "Is féidir le haon duine sa spás post a chur.", + "announcementsChatTitle": "Comhrá Fógraí", + "announcementsChatDesc": "Ní féidir ach le h-ardán an spáis post a chur.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index d21d25255..00280c2e3 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:53.093014", + "@@last_modified": "2025-12-01 12:40:06.959287", "about": "Informazioni", "@about": { "type": "String", @@ -10586,5 +10586,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Crea Chat di Introduzioni", + "introChatDesc": "Chiunque nello spazio può postare.", + "announcementsChatTitle": "Chat degli Annunci", + "announcementsChatDesc": "Solo l'amministratore dello spazio può postare.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index 01eeb3677..1e114b3dc 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -1,6 +1,6 @@ { "@@locale": "ja", - "@@last_modified": "2025-11-20 14:54:15.873729", + "@@last_modified": "2025-12-01 12:41:02.154964", "about": "このアプリについて", "@about": { "type": "String", @@ -11373,5 +11373,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "紹介チャットを作成", + "introChatDesc": "スペース内の誰でも投稿できます。", + "announcementsChatTitle": "お知らせチャット", + "announcementsChatDesc": "スペースの管理者のみが投稿できます。", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ka.arb b/lib/l10n/intl_ka.arb index 8f221e080..cf7b3958e 100644 --- a/lib/l10n/intl_ka.arb +++ b/lib/l10n/intl_ka.arb @@ -2598,7 +2598,7 @@ "playWithAI": "ამ დროისთვის ითამაშეთ AI-თან", "courseStartDesc": "Pangea Bot მზადაა ნებისმიერ დროს გასასვლელად!\n\n...მაგრამ სწავლა უკეთესია მეგობრებთან ერთად!", "@@locale": "ka", - "@@last_modified": "2025-11-20 14:54:20.259278", + "@@last_modified": "2025-12-01 12:41:10.546351", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11613,5 +11613,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "შექმენით გაცნობის ჩატი", + "introChatDesc": "ყოველთვის სივრცეში შეუძლია პოსტი.", + "announcementsChatTitle": "განცხადებების ჩატი", + "announcementsChatDesc": "მხოლოდ სივრცის ადმინისტრატორი შეუძლია პოსტი.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ko.arb b/lib/l10n/intl_ko.arb index 83037aaff..6749a0bfd 100644 --- a/lib/l10n/intl_ko.arb +++ b/lib/l10n/intl_ko.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:30.116789", + "@@last_modified": "2025-12-01 12:39:24.159740", "about": "소개", "@about": { "type": "String", @@ -10691,5 +10691,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "소개 채팅 만들기", + "introChatDesc": "공간의 누구나 게시할 수 있습니다.", + "announcementsChatTitle": "공지사항 채팅", + "announcementsChatDesc": "오직 공간 관리자만 게시할 수 있습니다.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_lt.arb b/lib/l10n/intl_lt.arb index 8519f651c..a6561c6b7 100644 --- a/lib/l10n/intl_lt.arb +++ b/lib/l10n/intl_lt.arb @@ -3865,7 +3865,7 @@ "playWithAI": "Žaiskite su dirbtiniu intelektu dabar", "courseStartDesc": "Pangea botas pasiruošęs bet kada pradėti!\n\n...bet mokymasis yra geresnis su draugais!", "@@locale": "lt", - "@@last_modified": "2025-11-20 14:54:05.562745", + "@@last_modified": "2025-12-01 12:40:39.006993", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11388,5 +11388,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Sukurti Įžangų Pokalbį", + "introChatDesc": "Bet kas erdvėje gali skelbti.", + "announcementsChatTitle": "Pranešimų Pokalbis", + "announcementsChatDesc": "Tik erdvės administratorius gali skelbti.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_lv.arb b/lib/l10n/intl_lv.arb index 74fd970d1..272109973 100644 --- a/lib/l10n/intl_lv.arb +++ b/lib/l10n/intl_lv.arb @@ -4486,7 +4486,7 @@ "playWithAI": "Tagad spēlējiet ar AI", "courseStartDesc": "Pangea bots ir gatavs jebkurā laikā!\n\n...bet mācīties ir labāk ar draugiem!", "@@locale": "lv", - "@@last_modified": "2025-11-20 14:54:02.050011", + "@@last_modified": "2025-12-01 12:40:28.664355", "analyticsInactiveTitle": "Pieprasījumi neaktīviem lietotājiem nevar tikt nosūtīti", "analyticsInactiveDesc": "Neaktīvi lietotāji, kuri nav pieteikušies kopš šīs funkcijas ieviešanas, neredzēs jūsu pieprasījumu.\n\nPieprasījuma poga parādīsies, kad viņi atgriezīsies. Jūs varat atkārtoti nosūtīt pieprasījumu vēlāk, noklikšķinot uz pieprasījuma pogas viņu vārdā, kad tā būs pieejama.", "accessRequestedTitle": "Pieprasījums piekļūt analītikai", @@ -10569,5 +10569,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Izveidot Ievada Čatu", + "introChatDesc": "Ikviens telpā var publicēt.", + "announcementsChatTitle": "Paziņojumu Čats", + "announcementsChatDesc": "Tikai telpas administrators var publicēt.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_nb.arb b/lib/l10n/intl_nb.arb index 957409665..afdce6f9c 100644 --- a/lib/l10n/intl_nb.arb +++ b/lib/l10n/intl_nb.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:55.552111", + "@@last_modified": "2025-12-01 12:40:12.703108", "about": "Om", "@about": { "type": "String", @@ -11676,5 +11676,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Opprett Introduksjoner Chat", + "introChatDesc": "Alle i rommet kan legge ut.", + "announcementsChatTitle": "Kunngjøringer Chat", + "announcementsChatDesc": "Bare romadministratoren kan legge ut.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_nl.arb b/lib/l10n/intl_nl.arb index ee0c66ed5..45a41deba 100644 --- a/lib/l10n/intl_nl.arb +++ b/lib/l10n/intl_nl.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:08.318051", + "@@last_modified": "2025-12-01 12:40:45.776161", "about": "Over ons", "@about": { "type": "String", @@ -10583,5 +10583,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Maak Introductie Chat", + "introChatDesc": "Iedereen in de ruimte kan berichten plaatsen.", + "announcementsChatTitle": "Aankondigingen Chat", + "announcementsChatDesc": "Alleen de ruimtebeheerder kan berichten plaatsen.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index e5e42269b..081b1b122 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,6 +1,6 @@ { "@@locale": "pl", - "@@last_modified": "2025-11-20 14:54:12.599201", + "@@last_modified": "2025-12-01 12:40:55.496589", "about": "O aplikacji", "@about": { "type": "String", @@ -10583,5 +10583,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Utwórz czat wprowadzający", + "introChatDesc": "Każdy w przestrzeni może publikować.", + "announcementsChatTitle": "Czat ogłoszeń", + "announcementsChatDesc": "Tylko administrator przestrzeni może publikować.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 8b955c282..39cf8bcac 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:48.565172", + "@@last_modified": "2025-12-01 12:39:56.923773", "copiedToClipboard": "Copiada para a área de transferência", "@copiedToClipboard": { "type": "String", @@ -11683,5 +11683,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Criar Chat de Apresentações", + "introChatDesc": "Qualquer pessoa no espaço pode postar.", + "announcementsChatTitle": "Chat de Anúncios", + "announcementsChatDesc": "Apenas o administrador do espaço pode postar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_pt_BR.arb b/lib/l10n/intl_pt_BR.arb index 0a6af1c4a..88bf8b8a1 100644 --- a/lib/l10n/intl_pt_BR.arb +++ b/lib/l10n/intl_pt_BR.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:46.544212", + "@@last_modified": "2025-12-01 12:39:53.340170", "about": "Sobre", "@about": { "type": "String", @@ -10941,5 +10941,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Criar Chat de Apresentações", + "introChatDesc": "Qualquer pessoa no espaço pode postar.", + "announcementsChatTitle": "Chat de Anúncios", + "announcementsChatDesc": "Apenas o administrador do espaço pode postar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_pt_PT.arb b/lib/l10n/intl_pt_PT.arb index ad739f3c4..427517588 100644 --- a/lib/l10n/intl_pt_PT.arb +++ b/lib/l10n/intl_pt_PT.arb @@ -3335,7 +3335,7 @@ "selectAll": "Selecionar tudo", "deselectAll": "Desmarcar tudo", "@@locale": "pt_PT", - "@@last_modified": "2025-11-20 14:53:59.030209", + "@@last_modified": "2025-12-01 12:40:21.887443", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11612,5 +11612,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Criar Chat de Apresentações", + "introChatDesc": "Qualquer pessoa no espaço pode postar.", + "announcementsChatTitle": "Chat de Anúncios", + "announcementsChatDesc": "Apenas o administrador do espaço pode postar.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ro.arb b/lib/l10n/intl_ro.arb index 39d037523..1dcb18a63 100644 --- a/lib/l10n/intl_ro.arb +++ b/lib/l10n/intl_ro.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:39.359488", + "@@last_modified": "2025-12-01 12:39:39.618148", "about": "Despre", "@about": { "type": "String", @@ -11318,5 +11318,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Creează chat de introduceri", + "introChatDesc": "Oricine din spațiu poate posta.", + "announcementsChatTitle": "Chat de anunțuri", + "announcementsChatDesc": "Numai administratorul spațiului poate posta.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index af79cfc72..f3a499136 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -1,6 +1,6 @@ { "@@locale": "ru", - "@@last_modified": "2025-11-20 14:54:19.249444", + "@@last_modified": "2025-12-01 12:41:08.695760", "about": "О проекте", "@about": { "type": "String", @@ -10688,5 +10688,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Создать чат для представлений", + "introChatDesc": "Любой в пространстве может публиковать.", + "announcementsChatTitle": "Чат объявлений", + "announcementsChatDesc": "Только администратор пространства может публиковать.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_sk.arb b/lib/l10n/intl_sk.arb index 9c11b527b..ee8376d7b 100644 --- a/lib/l10n/intl_sk.arb +++ b/lib/l10n/intl_sk.arb @@ -1,6 +1,6 @@ { "@@locale": "sk", - "@@last_modified": "2025-11-20 14:53:40.669714", + "@@last_modified": "2025-12-01 12:39:42.579953", "about": "O aplikácii", "@about": { "type": "String", @@ -11667,5 +11667,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Vytvoriť chat o predstaveniach", + "introChatDesc": "Ktokoľvek v priestore môže prispieť.", + "announcementsChatTitle": "Chat o oznámeniach", + "announcementsChatDesc": "Iba administrátor priestoru môže prispieť.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_sl.arb b/lib/l10n/intl_sl.arb index c5cca2003..3965ad669 100644 --- a/lib/l10n/intl_sl.arb +++ b/lib/l10n/intl_sl.arb @@ -2468,7 +2468,7 @@ "playWithAI": "Za zdaj igrajte z AI-jem", "courseStartDesc": "Pangea Bot je pripravljen kadarkoli!\n\n...ampak je bolje učiti se s prijatelji!", "@@locale": "sl", - "@@last_modified": "2025-11-20 14:53:51.206505", + "@@last_modified": "2025-12-01 12:40:03.273120", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11664,5 +11664,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Ustvari klepet za uvod", + "introChatDesc": "Kdor koli v prostoru lahko objavi.", + "announcementsChatTitle": "Klepet za obvestila", + "announcementsChatDesc": "Samo skrbnik prostora lahko objavi.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_sr.arb b/lib/l10n/intl_sr.arb index e1121911a..ccd411707 100644 --- a/lib/l10n/intl_sr.arb +++ b/lib/l10n/intl_sr.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:21.092644", + "@@last_modified": "2025-12-01 12:41:13.018500", "about": "О програму", "@about": { "type": "String", @@ -11685,5 +11685,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Kreiraj chat za uvod", + "introChatDesc": "Svako u prostoru može da objavljuje.", + "announcementsChatTitle": "Chat za obaveštenja", + "announcementsChatDesc": "Samo administrator prostora može da objavljuje.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_sv.arb b/lib/l10n/intl_sv.arb index 17d1499cd..98f8e9909 100644 --- a/lib/l10n/intl_sv.arb +++ b/lib/l10n/intl_sv.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:13.498644", + "@@last_modified": "2025-12-01 12:40:57.541160", "about": "Om", "@about": { "type": "String", @@ -11061,5 +11061,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Skapa Introduktionschatt", + "introChatDesc": "Alla i rummet kan posta.", + "announcementsChatTitle": "Meddelanden Chatt", + "announcementsChatDesc": "Endast rumsadministratören kan posta.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_ta.arb b/lib/l10n/intl_ta.arb index 0bd67b81f..5e879b1f0 100644 --- a/lib/l10n/intl_ta.arb +++ b/lib/l10n/intl_ta.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:07.409352", + "@@last_modified": "2025-12-01 12:40:43.100129", "acceptedTheInvitation": "👍 {username} அழைப்பை ஏற்றுக்கொண்டது", "@acceptedTheInvitation": { "type": "String", @@ -10807,5 +10807,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "அறிமுக உரையாடல் உருவாக்கவும்", + "introChatDesc": "இடத்தில் உள்ள யாரும் பதிவேற்றலாம்.", + "announcementsChatTitle": "அறிக்கைகள் உரையாடல்", + "announcementsChatDesc": "மட்டுமல்லாமல் இட நிர்வாகி பதிவேற்றலாம்.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_te.arb b/lib/l10n/intl_te.arb index de1cc2500..25ba70373 100644 --- a/lib/l10n/intl_te.arb +++ b/lib/l10n/intl_te.arb @@ -1924,7 +1924,7 @@ "playWithAI": "ఇప్పుడే AI తో ఆడండి", "courseStartDesc": "పాంజియా బాట్ ఎప్పుడైనా సిద్ధంగా ఉంటుంది!\n\n...కానీ స్నేహితులతో నేర్చుకోవడం మెరుగైనది!", "@@locale": "te", - "@@last_modified": "2025-11-20 14:54:04.730180", + "@@last_modified": "2025-12-01 12:40:34.812634", "@setCustomPermissionLevel": { "type": "String", "placeholders": {} @@ -11672,5 +11672,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "పరిచయాల చాట్ సృష్టించండి", + "introChatDesc": "ఈ స్థలంలో ఎవ్వరైనా పోస్ట్ చేయవచ్చు.", + "announcementsChatTitle": "ప్రకటనల చాట్", + "announcementsChatDesc": "కేవలం స్థల నిర్వాహకుడు మాత్రమే పోస్ట్ చేయవచ్చు.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_th.arb b/lib/l10n/intl_th.arb index 833a29662..d0add74f6 100644 --- a/lib/l10n/intl_th.arb +++ b/lib/l10n/intl_th.arb @@ -4460,7 +4460,7 @@ "playWithAI": "เล่นกับ AI ชั่วคราว", "courseStartDesc": "Pangea Bot พร้อมที่จะเริ่มต้นได้ทุกเมื่อ!\n\n...แต่การเรียนรู้ดีกว่ากับเพื่อน!", "@@locale": "th", - "@@last_modified": "2025-11-20 14:53:58.064329", + "@@last_modified": "2025-12-01 12:40:19.963556", "@alwaysUse24HourFormat": { "type": "String", "placeholders": {} @@ -11641,5 +11641,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "สร้างแชทแนะนำ", + "introChatDesc": "ใครก็ได้ในพื้นที่สามารถโพสต์ได้。", + "announcementsChatTitle": "แชทประกาศ", + "announcementsChatDesc": "เฉพาะผู้ดูแลพื้นที่เท่านั้นที่สามารถโพสต์ได้.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index 488531f7d..c0eb1ac16 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -1,6 +1,6 @@ { "@@locale": "tr", - "@@last_modified": "2025-11-20 14:54:03.661128", + "@@last_modified": "2025-12-01 12:40:32.542590", "about": "Hakkında", "@about": { "type": "String", @@ -10805,5 +10805,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Tanıtım Sohbeti Oluştur", + "introChatDesc": "Mekandaki herkes paylaşımda bulunabilir.", + "announcementsChatTitle": "Duyurular Sohbeti", + "announcementsChatDesc": "Sadece mekan yöneticisi paylaşımda bulunabilir.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_uk.arb b/lib/l10n/intl_uk.arb index 072488302..209841541 100644 --- a/lib/l10n/intl_uk.arb +++ b/lib/l10n/intl_uk.arb @@ -1,6 +1,6 @@ { "@@locale": "uk", - "@@last_modified": "2025-11-20 14:53:53.830897", + "@@last_modified": "2025-12-01 12:40:09.213073", "about": "Про застосунок", "@about": { "type": "String", @@ -10577,5 +10577,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Створити чат для знайомств", + "introChatDesc": "Будь-хто в просторі може публікувати.", + "announcementsChatTitle": "Чат оголошень", + "announcementsChatDesc": "Тільки адміністратор простору може публікувати.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_vi.arb b/lib/l10n/intl_vi.arb index cac0bebc0..7abe9bc04 100644 --- a/lib/l10n/intl_vi.arb +++ b/lib/l10n/intl_vi.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:54:06.548321", + "@@last_modified": "2025-12-01 12:40:41.049624", "about": "Giới thiệu", "@about": { "type": "String", @@ -6153,5 +6153,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "Tạo trò chuyện giới thiệu", + "introChatDesc": "Bất kỳ ai trong không gian đều có thể đăng bài.", + "announcementsChatTitle": "Trò chuyện thông báo", + "announcementsChatDesc": "Chỉ quản trị viên không gian mới có thể đăng bài.", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_yue.arb b/lib/l10n/intl_yue.arb index 787fb2e58..37bd975fd 100644 --- a/lib/l10n/intl_yue.arb +++ b/lib/l10n/intl_yue.arb @@ -1860,7 +1860,7 @@ "selectAll": "全選", "deselectAll": "取消全選", "@@locale": "yue", - "@@last_modified": "2025-11-20 14:53:52.037690", + "@@last_modified": "2025-12-01 12:40:05.012948", "@ignoreUser": { "type": "String", "placeholders": {} @@ -11674,5 +11674,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "創建介紹聊天", + "introChatDesc": "任何人在這個空間都可以發帖。", + "announcementsChatTitle": "公告聊天", + "announcementsChatDesc": "只有空間管理員可以發帖。", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index bcf87821c..e535e1dad 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -1,6 +1,6 @@ { "@@locale": "zh", - "@@last_modified": "2025-11-20 14:54:09.943983", + "@@last_modified": "2025-12-01 12:40:49.294875", "about": "关于", "@about": { "type": "String", @@ -10574,5 +10574,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "创建介绍聊天", + "introChatDesc": "空间中的任何人都可以发布。", + "announcementsChatTitle": "公告聊天", + "announcementsChatDesc": "只有空间管理员可以发布。", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/l10n/intl_zh_Hant.arb b/lib/l10n/intl_zh_Hant.arb index 1f29ffbc7..66a60fd61 100644 --- a/lib/l10n/intl_zh_Hant.arb +++ b/lib/l10n/intl_zh_Hant.arb @@ -1,5 +1,5 @@ { - "@@last_modified": "2025-11-20 14:53:59.953711", + "@@last_modified": "2025-12-01 12:40:24.165409", "about": "關於", "@about": { "type": "String", @@ -10581,5 +10581,25 @@ "@practiceActivityCompleted": { "type": "String", "placeholders": {} + }, + "introChatTitle": "創建介紹聊天", + "introChatDesc": "空間中的任何人都可以發帖。", + "announcementsChatTitle": "公告聊天", + "announcementsChatDesc": "只有空間管理員可以發帖。", + "@introChatTitle": { + "type": "String", + "placeholders": {} + }, + "@introChatDesc": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatTitle": { + "type": "String", + "placeholders": {} + }, + "@announcementsChatDesc": { + "type": "String", + "placeholders": {} } } \ No newline at end of file diff --git a/lib/pages/new_group/new_group.dart b/lib/pages/new_group/new_group.dart index b6fd12393..d2dace989 100644 --- a/lib/pages/new_group/new_group.dart +++ b/lib/pages/new_group/new_group.dart @@ -197,8 +197,6 @@ class NewGroupController extends State { // context.pop(spaceId); final spaceId = await Matrix.of(context).client.createPangeaSpace( name: nameController.text, - introChatName: L10n.of(context).introductions, - announcementsChatName: L10n.of(context).announcements, visibility: sdk.Visibility.private, joinRules: sdk.JoinRules.knock, avatarUrl: avatarUrl.toString(), diff --git a/lib/pangea/course_chats/course_chats_page.dart b/lib/pangea/course_chats/course_chats_page.dart index 3baab1d07..97a1a29a9 100644 --- a/lib/pangea/course_chats/course_chats_page.dart +++ b/lib/pangea/course_chats/course_chats_page.dart @@ -14,6 +14,7 @@ import 'package:fluffychat/pangea/activity_sessions/activity_room_extension.dart import 'package:fluffychat/pangea/chat_settings/constants/pangea_room_types.dart'; import 'package:fluffychat/pangea/common/utils/error_handler.dart'; import 'package:fluffychat/pangea/course_chats/course_chats_view.dart'; +import 'package:fluffychat/pangea/course_chats/course_default_chats_enum.dart'; import 'package:fluffychat/pangea/course_chats/extended_space_rooms_chunk.dart'; import 'package:fluffychat/pangea/course_plans/course_activities/activity_summaries_provider.dart'; import 'package:fluffychat/pangea/course_plans/courses/course_plan_builder.dart'; @@ -615,6 +616,42 @@ class CourseChatsController extends State return 0; } + bool showDefaultChatCreation(CourseDefaultChatsEnum type) { + if (room == null || !room!.isRoomAdmin) return false; + return !room!.dismissedDefaultChat(type) && !room!.hasDefaultChat(type); + } + + Future dismissDefaultChatCreation( + CourseDefaultChatsEnum type, + ) async { + if (room == null) { + throw Exception("Room is null"); + } + + final settings = switch (type) { + CourseDefaultChatsEnum.introductions => + room!.courseChatsSettings.copyWith(dismissedIntroChat: true), + CourseDefaultChatsEnum.announcements => + room!.courseChatsSettings.copyWith(dismissedAnnouncementsChat: true), + }; + await room!.setCourseChatsSettings(settings); + } + + Future createDefaultChat( + CourseDefaultChatsEnum type, + ) async { + if (room == null) { + throw Exception("Room is null"); + } + + final roomId = await room!.addDefaultChat( + type: type, + name: type.title(L10n.of(context)), + ); + + context.go('/rooms/spaces/${widget.roomId}/$roomId'); + } + @override Widget build(BuildContext context) => CourseChatsView(this); } diff --git a/lib/pangea/course_chats/course_chats_settings_model.dart b/lib/pangea/course_chats/course_chats_settings_model.dart new file mode 100644 index 000000000..a05af31c6 --- /dev/null +++ b/lib/pangea/course_chats/course_chats_settings_model.dart @@ -0,0 +1,31 @@ +class CourseChatsSettingsModel { + final bool dismissedIntroChat; + final bool dismissedAnnouncementsChat; + + const CourseChatsSettingsModel({ + this.dismissedIntroChat = false, + this.dismissedAnnouncementsChat = false, + }); + + Map toJson() => { + 'dismissed_intro_chat': dismissedIntroChat, + 'dismissed_announcements_chat': dismissedAnnouncementsChat, + }; + + factory CourseChatsSettingsModel.fromJson(Map json) { + return CourseChatsSettingsModel( + dismissedIntroChat: json['dismissed_intro_chat'] ?? false, + dismissedAnnouncementsChat: json['dismissed_announcements_chat'] ?? false, + ); + } + + CourseChatsSettingsModel copyWith({ + bool? dismissedIntroChat, + bool? dismissedAnnouncementsChat, + }) => + CourseChatsSettingsModel( + dismissedIntroChat: dismissedIntroChat ?? this.dismissedIntroChat, + dismissedAnnouncementsChat: + dismissedAnnouncementsChat ?? this.dismissedAnnouncementsChat, + ); +} diff --git a/lib/pangea/course_chats/course_chats_view.dart b/lib/pangea/course_chats/course_chats_view.dart index a2061c978..bdeb19275 100644 --- a/lib/pangea/course_chats/course_chats_view.dart +++ b/lib/pangea/course_chats/course_chats_view.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:material_symbols_icons/symbols.dart'; import 'package:matrix/matrix.dart' as sdk; import 'package:matrix/matrix.dart'; @@ -12,10 +13,12 @@ import 'package:fluffychat/pangea/analytics_summary/learning_progress_indicators import 'package:fluffychat/pangea/chat_settings/widgets/chat_context_menu_action.dart'; import 'package:fluffychat/pangea/course_chats/activity_template_chat_list_item.dart'; import 'package:fluffychat/pangea/course_chats/course_chats_page.dart'; +import 'package:fluffychat/pangea/course_chats/course_default_chats_enum.dart'; import 'package:fluffychat/pangea/course_chats/unjoined_chat_list_item.dart'; import 'package:fluffychat/pangea/space_analytics/analytics_request_indicator.dart'; import 'package:fluffychat/pangea/spaces/widgets/knocking_users_indicator.dart'; import 'package:fluffychat/utils/stream_extension.dart'; +import 'package:fluffychat/widgets/future_loading_dialog.dart'; class CourseChatsView extends StatelessWidget { final CourseChatsController controller; @@ -63,7 +66,7 @@ class CourseChatsView extends StatelessWidget { joinedSessions.length + discoveredGroupChats.length + discoveredSessions.length + - 7, + 9, itemBuilder: (context, i) { // courses chats title if (i == 0) { @@ -102,6 +105,22 @@ class CourseChatsView extends StatelessWidget { } i--; + if (i == 0) { + return _DefaultChatCreationTile( + type: CourseDefaultChatsEnum.introductions, + controller: controller, + ); + } + i--; + + if (i == 0) { + return _DefaultChatCreationTile( + type: CourseDefaultChatsEnum.announcements, + controller: controller, + ); + } + i--; + // joined group chats if (i < joinedChats.length) { final joinedRoom = joinedChats[i]; @@ -240,3 +259,38 @@ class CourseChatsView extends StatelessWidget { ); } } + +class _DefaultChatCreationTile extends StatelessWidget { + final CourseDefaultChatsEnum type; + final CourseChatsController controller; + + const _DefaultChatCreationTile({ + required this.type, + required this.controller, + }); + + @override + Widget build(BuildContext context) { + if (!controller.showDefaultChatCreation(type)) { + return const SizedBox(); + } + + final l10n = L10n.of(context); + return ListTile( + leading: const Icon(Symbols.chat_add_on), + title: Text(type.creationTitle(l10n)), + subtitle: Text(type.creationDesc(l10n)), + trailing: IconButton( + icon: const Icon(Icons.close), + onPressed: () => showFutureLoadingDialog( + context: context, + future: () => controller.dismissDefaultChatCreation(type), + ), + ), + onTap: () => showFutureLoadingDialog( + context: context, + future: () => controller.createDefaultChat(type), + ), + ); + } +} diff --git a/lib/pangea/course_chats/course_default_chats_enum.dart b/lib/pangea/course_chats/course_default_chats_enum.dart new file mode 100644 index 000000000..7392d2e57 --- /dev/null +++ b/lib/pangea/course_chats/course_default_chats_enum.dart @@ -0,0 +1,29 @@ +import 'package:fluffychat/l10n/l10n.dart'; +import 'package:fluffychat/pangea/spaces/constants/space_constants.dart'; + +enum CourseDefaultChatsEnum { + introductions, + announcements; + + String get alias => switch (this) { + CourseDefaultChatsEnum.introductions => + SpaceConstants.introductionChatAlias, + CourseDefaultChatsEnum.announcements => + SpaceConstants.announcementsChatAlias, + }; + + String title(L10n l10n) => switch (this) { + CourseDefaultChatsEnum.introductions => l10n.introductions, + CourseDefaultChatsEnum.announcements => l10n.announcements, + }; + + String creationTitle(L10n l10n) => switch (this) { + CourseDefaultChatsEnum.introductions => l10n.introChatTitle, + CourseDefaultChatsEnum.announcements => l10n.announcementsChatTitle, + }; + + String creationDesc(L10n l10n) => switch (this) { + CourseDefaultChatsEnum.introductions => l10n.introChatDesc, + CourseDefaultChatsEnum.announcements => l10n.announcementsChatDesc, + }; +} diff --git a/lib/pangea/course_creation/selected_course_page.dart b/lib/pangea/course_creation/selected_course_page.dart index d3adfd5f5..54fd2eca4 100644 --- a/lib/pangea/course_creation/selected_course_page.dart +++ b/lib/pangea/course_creation/selected_course_page.dart @@ -99,8 +99,6 @@ class SelectedCourseController extends State .createPangeaSpace( name: course.title, topic: course.description, - introChatName: L10n.of(context).introductions, - announcementsChatName: L10n.of(context).announcements, visibility: sdk.Visibility.private, joinRules: sdk.JoinRules.knock, initialState: [ diff --git a/lib/pangea/course_plans/courses/course_plan_room_extension.dart b/lib/pangea/course_plans/courses/course_plan_room_extension.dart index 7a8c4a97d..e9d78c2b5 100644 --- a/lib/pangea/course_plans/courses/course_plan_room_extension.dart +++ b/lib/pangea/course_plans/courses/course_plan_room_extension.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:matrix/matrix.dart' as sdk; import 'package:matrix/matrix.dart'; @@ -7,10 +9,13 @@ import 'package:fluffychat/pangea/activity_sessions/activity_roles_model.dart'; import 'package:fluffychat/pangea/activity_sessions/activity_room_extension.dart'; import 'package:fluffychat/pangea/chat/constants/default_power_level.dart'; import 'package:fluffychat/pangea/chat_settings/constants/pangea_room_types.dart'; +import 'package:fluffychat/pangea/course_chats/course_chats_settings_model.dart'; +import 'package:fluffychat/pangea/course_chats/course_default_chats_enum.dart'; import 'package:fluffychat/pangea/course_plans/courses/course_plan_event.dart'; import 'package:fluffychat/pangea/events/constants/pangea_event_types.dart'; import 'package:fluffychat/pangea/extensions/join_rule_extension.dart'; import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart'; +import 'package:fluffychat/pangea/spaces/constants/space_constants.dart'; extension CoursePlanRoomExtension on Room { CoursePlanEvent? get coursePlan { @@ -119,4 +124,81 @@ extension CoursePlanRoomExtension on Room { }, ); } + + CourseChatsSettingsModel get courseChatsSettings { + final event = getState(PangeaEventTypes.courseChatList); + if (event == null) { + return const CourseChatsSettingsModel(); + } + return CourseChatsSettingsModel.fromJson(event.content); + } + + Future setCourseChatsSettings( + CourseChatsSettingsModel settings, + ) async { + await client.setRoomStateWithKey( + id, + PangeaEventTypes.courseChatList, + "", + settings.toJson(), + ); + } + + bool hasDefaultChat(CourseDefaultChatsEnum type) => pangeaSpaceChildren.any( + (r) => r.canonicalAlias.localpart?.startsWith(type.alias) == true, + ); + + bool dismissedDefaultChat(CourseDefaultChatsEnum type) { + switch (type) { + case CourseDefaultChatsEnum.introductions: + return courseChatsSettings.dismissedIntroChat; + case CourseDefaultChatsEnum.announcements: + return courseChatsSettings.dismissedAnnouncementsChat; + } + } + + Future addDefaultChat({ + required CourseDefaultChatsEnum type, + required String name, + }) async { + final random = Random(); + final String uploadURL = switch (type) { + CourseDefaultChatsEnum.introductions => SpaceConstants + .introChatIcons[random.nextInt(SpaceConstants.introChatIcons.length)], + CourseDefaultChatsEnum.announcements => + SpaceConstants.announcementChatIcons[ + random.nextInt(SpaceConstants.announcementChatIcons.length)], + }; + + final resp = await client.createRoom( + preset: CreateRoomPreset.publicChat, + visibility: Visibility.private, + name: name, + roomAliasName: "${type.alias}_${id.localpart}", + initialState: [ + StateEvent( + type: EventTypes.RoomAvatar, + content: {'url': uploadURL}, + ), + RoomDefaults.defaultPowerLevels(client.userID!), + await client.pangeaJoinRules( + 'knock_restricted', + allow: [ + { + "type": "m.room_membership", + "room_id": id, + } + ], + ), + ], + ); + + final room = client.getRoomById(resp); + if (room == null) { + await client.waitForRoomInSync(resp, join: true); + } + + await addToSpace(resp); + return resp; + } } diff --git a/lib/pangea/events/constants/pangea_event_types.dart b/lib/pangea/events/constants/pangea_event_types.dart index 6fda7935c..dbcc7ad7e 100644 --- a/lib/pangea/events/constants/pangea_event_types.dart +++ b/lib/pangea/events/constants/pangea_event_types.dart @@ -53,4 +53,5 @@ class PangeaEventTypes { static const coursePlan = "pangea.course_plan"; static const courseUser = "p.course_user"; static const teacherMode = "pangea.teacher_mode"; + static const courseChatList = "pangea.course_chat_list"; } diff --git a/lib/pangea/extensions/room_children_and_parents_extension.dart b/lib/pangea/extensions/room_children_and_parents_extension.dart index 4b090fa4a..b79828301 100644 --- a/lib/pangea/extensions/room_children_and_parents_extension.dart +++ b/lib/pangea/extensions/room_children_and_parents_extension.dart @@ -21,6 +21,14 @@ extension ChildrenAndParentsRoomExtension on Room { ) .toList(); + List get pangeaSpaceChildren => client.rooms + .where( + (r) => spaceChildren.any( + (child) => r.id == child.roomId, + ), + ) + .toList(); + /// Wrapper around call to setSpaceChild with added functionality /// to prevent adding one room to multiple spaces, and resets the /// subspace's JoinRules and Visibility to defaults. diff --git a/lib/pangea/extensions/room_information_extension.dart b/lib/pangea/extensions/room_information_extension.dart index 7bd3747a2..e0ba4f362 100644 --- a/lib/pangea/extensions/room_information_extension.dart +++ b/lib/pangea/extensions/room_information_extension.dart @@ -8,20 +8,6 @@ extension RoomInformationRoomExtension on Room { return creationEvent?.originServerTs; } - bool isFirstOrSecondChild(String roomId) { - return isSpace && - (spaceChildren.any((room) => room.roomId == roomId) || - spaceChildren - .where((sc) => sc.roomId != null) - .map((sc) => client.getRoomById(sc.roomId!)) - .any( - (room) => - room != null && - room.isSpace && - room.spaceChildren.any((room) => room.roomId == roomId), - )); - } - Future get botIsInRoom async { final List participants = await requestParticipants(); return participants.any( diff --git a/lib/pangea/spaces/utils/client_spaces_extension.dart b/lib/pangea/spaces/utils/client_spaces_extension.dart index 2a353dacd..99fed4451 100644 --- a/lib/pangea/spaces/utils/client_spaces_extension.dart +++ b/lib/pangea/spaces/utils/client_spaces_extension.dart @@ -1,19 +1,11 @@ -import 'dart:math'; - -import 'package:http/http.dart' as http; import 'package:matrix/matrix.dart'; import 'package:fluffychat/pangea/chat/constants/default_power_level.dart'; -import 'package:fluffychat/pangea/common/utils/error_handler.dart'; import 'package:fluffychat/pangea/extensions/join_rule_extension.dart'; -import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart'; -import 'package:fluffychat/pangea/spaces/constants/space_constants.dart'; extension SpacesClientExtension on Client { Future createPangeaSpace({ required String name, - required String introChatName, - required String announcementsChatName, String? topic, Visibility visibility = Visibility.private, JoinRules joinRules = JoinRules.public, @@ -43,153 +35,6 @@ extension SpacesClientExtension on Client { if (initialState != null) ...initialState, ], ); - - final space = await _waitForRoom(roomId); - if (space == null) return roomId; - - await _addDefaultSpaceChats( - space: space, - introductionsName: introChatName, - announcementsName: announcementsChatName, - ); return roomId; } - - Future _waitForRoom(String roomId) async { - final room = getRoomById(roomId); - if (room != null) return room; - await waitForRoomInSync(roomId, join: true).timeout( - const Duration(seconds: 15), - onTimeout: () { - throw Exception('Timeout fetching room after creation'); - }, - ); - return getRoomById(roomId); - } - - Future _addDefaultSpaceChats({ - required Room space, - String introductionsName = "Introductions", - String announcementsName = "Announcements", - }) async { - Uri? introChatUploadURL; - Uri? announcementsChatUploadURL; - - try { - final random = Random(); - final introChatIconURL = SpaceConstants - .introChatIcons[random.nextInt(SpaceConstants.introChatIcons.length)]; - final announcementsChatIconURL = SpaceConstants.announcementChatIcons[ - random.nextInt(SpaceConstants.announcementChatIcons.length)]; - - final introResponse = await http.get(Uri.parse(introChatIconURL)); - final introChatIcon = introResponse.bodyBytes; - final intoChatIconFilename = Uri.encodeComponent( - Uri.parse(introChatIconURL).pathSegments.last, - ); - introChatUploadURL = await uploadContent( - introChatIcon, - filename: intoChatIconFilename, - ); - - final announcementsResponse = - await http.get(Uri.parse(announcementsChatIconURL)); - final announcementsChatIcon = announcementsResponse.bodyBytes; - final announcementsChatIconFilename = Uri.encodeComponent( - Uri.parse(announcementsChatIconURL).pathSegments.last, - ); - announcementsChatUploadURL = await uploadContent( - announcementsChatIcon, - filename: announcementsChatIconFilename, - ); - } catch (e, s) { - ErrorHandler.logError( - e: "Failed to upload space chat icons", - s: s, - data: { - "error": e, - "spaceId": space.id, - }, - ); - } - - final introChatFuture = createRoom( - preset: CreateRoomPreset.publicChat, - visibility: Visibility.private, - name: introductionsName, - roomAliasName: - "${SpaceConstants.introductionChatAlias}_${space.id.localpart}", - initialState: [ - if (introChatUploadURL != null) - StateEvent( - type: EventTypes.RoomAvatar, - content: {'url': introChatUploadURL.toString()}, - ), - RoomDefaults.defaultPowerLevels(userID!), - await pangeaJoinRules( - 'knock_restricted', - allow: [ - { - "type": "m.room_membership", - "room_id": space.id, - } - ], - ), - ], - ); - - final announcementsChatFuture = createRoom( - preset: CreateRoomPreset.publicChat, - visibility: Visibility.private, - name: announcementsName, - roomAliasName: - "${SpaceConstants.announcementsChatAlias}_${space.id.localpart}", - initialState: [ - if (announcementsChatUploadURL != null) - StateEvent( - type: EventTypes.RoomAvatar, - content: {'url': announcementsChatUploadURL.toString()}, - ), - RoomDefaults.restrictedPowerLevels(userID!), - await pangeaJoinRules( - 'knock_restricted', - allow: [ - { - "type": "m.room_membership", - "room_id": space.id, - } - ], - ), - ], - ); - - final List roomIds = await Future.wait([ - introChatFuture, - announcementsChatFuture, - ]); - - if (roomIds.length != 2) { - throw Exception('Failed to create default space chats'); - } - - for (final roomId in roomIds) { - final room = getRoomById(roomId); - if (room == null) { - await waitForRoomInSync(roomId, join: true); - } - } - - final addIntroChatFuture = space.addToSpace( - roomIds[0], - ); - - final addAnnouncementsChatFuture = space.addToSpace( - roomIds[1], - ); - - await Future.wait([ - addIntroChatFuture, - addAnnouncementsChatFuture, - ]); - } } diff --git a/lib/utils/client_manager.dart b/lib/utils/client_manager.dart index ba0870606..3fc7e5b35 100644 --- a/lib/utils/client_manager.dart +++ b/lib/utils/client_manager.dart @@ -151,6 +151,7 @@ abstract class ClientManager { PangeaEventTypes.coursePlan, PangeaEventTypes.courseUser, PangeaEventTypes.teacherMode, + PangeaEventTypes.courseChatList, // Pangea# }, logLevel: kReleaseMode ? Level.warning : Level.verbose,