Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(polls/web) check for duplicate poll options (#14541)

Hazoombb49c92cc40f
diff --git a/lang/main-af.json b/lang/main-af.json
index 737634a491..9548c78d8a 100644
--- a/lang/main-af.json
+++ b/lang/main-af.json
@@ -432,6 +432,11 @@
},
"passwordDigitsOnly": "",
"passwordSetRemotely": "",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Opsies moet uniek wees"
+ }
+ },
"poweredby": "aangedryf deur",
"presenceStatus": {
"busy": "Besig",
diff --git a/lang/main-ar.json b/lang/main-ar.json
index a3004d4c21..b0a610c4ea 100644
--- a/lang/main-ar.json
+++ b/lang/main-ar.json
@@ -765,6 +765,9 @@
"removeOption": "إزالة خيار",
"send": "أرسل"
},
+ "errors": {
+ "notUniqueOption": "يجب أن تكون الخيارات فريدة"
+ },
"notification": {
"description": "افتح علامة تبويب الاقتراع للتصويت",
"title": "تمت إضافة اقتراع جديد إلى هذا المُلتقى"
diff --git a/lang/main-be.json b/lang/main-be.json
index d594e177a2..5b1bca12a3 100644
--- a/lang/main-be.json
+++ b/lang/main-be.json
@@ -478,6 +478,11 @@
},
"passwordDigitsOnly": "Да {{number}} лічбаў",
"passwordSetRemotely": "устаноўлены іншым удзельнікам",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Варыянты павінны быць унікальнымі"
+ }
+ },
"poweredby": "працуе на",
"presenceStatus": {
"busy": "Заняты",
diff --git a/lang/main-bg.json b/lang/main-bg.json
index 70e4f3c670..ca50a9f58d 100644
--- a/lang/main-bg.json
+++ b/lang/main-bg.json
@@ -527,6 +527,11 @@
},
"passwordDigitsOnly": "До {{number}} цифри",
"passwordSetRemotely": "зададена от друг участник",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Опциите трябва да са уникални"
+ }
+ },
"poweredby": "с подкрепата на",
"presenceStatus": {
"busy": "Зает",
diff --git a/lang/main-ca.json b/lang/main-ca.json
index 2afdf6b8e2..2234bfabfa 100644
--- a/lang/main-ca.json
+++ b/lang/main-ca.json
@@ -772,6 +772,9 @@
"removeOption": "Elimina l'opció",
"send": "Envia"
},
+ "errors": {
+ "notUniqueOption": "Les opcions han de ser úniques"
+ },
"notification": {
"description": "Obre la pestanya de les enquestes per a votar",
"title": "S'ha afegit una nova enquesta en aquesta reunió"
diff --git a/lang/main-cs.json b/lang/main-cs.json
index c9e07b1574..aa88c2be34 100644
--- a/lang/main-cs.json
+++ b/lang/main-cs.json
@@ -747,6 +747,9 @@
"removeOption": "",
"send": ""
},
+ "errors": {
+ "notUniqueOption": "Možnosti musí být jedinečné"
+ },
"notification": {
"description": "",
"title": ""
diff --git a/lang/main-da.json b/lang/main-da.json
index 3fb4ece53b..f89979a8a7 100644
--- a/lang/main-da.json
+++ b/lang/main-da.json
@@ -464,6 +464,11 @@
},
"passwordDigitsOnly": "Op til {{number}} tal",
"passwordSetRemotely": "Sat af et andet medlem",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Valgmulighederne skal være unikke"
+ }
+ },
"poweredby": "Powered by",
"presenceStatus": {
"busy": "Optaget",
diff --git a/lang/main-de.json b/lang/main-de.json
index 13afa8fee5..616cec8631 100644
--- a/lang/main-de.json
+++ b/lang/main-de.json
@@ -867,6 +867,9 @@
"removeOption": "Antwort entfernen",
"send": "Erstellen"
},
+ "errors": {
+ "notUniqueOption": "Optionen müssen einzigartig sein"
+ },
"notification": {
"description": "Öffnen Sie das Umfragen-Tab um abzustimmen",
"title": "Dieser Konferenz wurde eine Umfrage hinzugefügt"
diff --git a/lang/main-dsb.json b/lang/main-dsb.json
index 0a641ab77a..a7f0b13a4c 100644
--- a/lang/main-dsb.json
+++ b/lang/main-dsb.json
@@ -775,6 +775,9 @@
"removeOption": "wótegrono wulašowaś",
"send": "wótpósłaś"
},
+ "errors": {
+ "notUniqueOption": "Opcije musy byś jedynsće"
+ },
"notification": {
"description": "Wótcyńśo kórtu wopšašowanjow, aby zgłosowali",
"title": "Za tu konferencu jo nowe wopšašowanje pśigótowane"
diff --git a/lang/main-el.json b/lang/main-el.json
index cb605ea991..d5431c163c 100644
--- a/lang/main-el.json
+++ b/lang/main-el.json
@@ -792,6 +792,9 @@
"removeOption": "Αφαιρέστε την επιλογή",
"send": "Αποστολή"
},
+ "errors": {
+ "notUniqueOption": "Οι επιλογές πρέπει να είναι μοναδικές"
+ },
"notification": {
"description": "Ανοίξτε τη σελίδα ψηφοφοριών για να ψηφίσετε",
"title": "Μια νέα ψηφοφορία προστέθηκε στη σύσκεψη"
diff --git a/lang/main-eo.json b/lang/main-eo.json
index c84f3f16dd..e1f2d69783 100644
--- a/lang/main-eo.json
+++ b/lang/main-eo.json
@@ -864,6 +864,9 @@
"removeOption": "Forigi opcion",
"send": "Sendu"
},
+ "errors": {
+ "notUniqueOption": "Ebloj devas esti unikaj"
+ },
"notification": {
"description": "Malfermu la enketan langeton por voĉdoni",
"title": "Oni aldonis novan enketon en la kunveno"
diff --git a/lang/main-es.json b/lang/main-es.json
index 781de0ac23..0ad0ab4fb6 100644
--- a/lang/main-es.json
+++ b/lang/main-es.json
@@ -815,6 +815,9 @@
"removeOption": "Eliminar la opción",
"send": "Enviar"
},
+ "errors": {
+ "notUniqueOption": "Las opciones deben ser únicas"
+ },
"notification": {
"description": "Abre la pestaña de encuestas para votar",
"title": "Se ha añadido una nueva encuesta a esta reunión"
diff --git a/lang/main-esUS.json b/lang/main-esUS.json
index ad6860716f..a317a02697 100644
--- a/lang/main-esUS.json
+++ b/lang/main-esUS.json
@@ -691,6 +691,9 @@
"removeOption": "Eliminar la opción",
"send": "Enviar"
},
+ "errors": {
+ "notUniqueOption": "Las opciones deben ser únicas"
+ },
"notification": {
"description": "Abre la pestaña de encuestas para votar",
"title": "Se ha añadido una nueva encuesta a esta reunión"
diff --git a/lang/main-et.json b/lang/main-et.json
index 4630073371..f457617533 100644
--- a/lang/main-et.json
+++ b/lang/main-et.json
@@ -467,6 +467,11 @@
},
"passwordDigitsOnly": "Kuni {{number}} tähemärki",
"passwordSetRemotely": "määratud teise kasutaja poolt",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Valikud peavad olema ainulaadsed"
+ }
+ },
"poweredby": "teieni toodud",
"presenceStatus": {
"busy": "Hõivatud",
diff --git a/lang/main-eu.json b/lang/main-eu.json
index efe2325f6a..6ebaba0535 100644
--- a/lang/main-eu.json
+++ b/lang/main-eu.json
@@ -588,6 +588,11 @@
},
"passwordDigitsOnly": "{{number}} digitu arte",
"passwordSetRemotely": "beste parte-hartzaile batek ezarrita",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Aukerak bakarrak izan behar dira"
+ }
+ },
"poweredby": "garatzailea:",
"prejoin": {
"audioAndVideoError": "Errorea audio eta bideoan:",
diff --git a/lang/main-fa.json b/lang/main-fa.json
index a1e9a88364..5d3407e698 100644
--- a/lang/main-fa.json
+++ b/lang/main-fa.json
@@ -823,6 +823,9 @@
"removeOption": "حذف گزینه",
"send": "ارسال"
},
+ "errors": {
+ "notUniqueOption": "گزینه ها باید منحصر به فرد باشند"
+ },
"notification": {
"description": "برای رأی‌دادن، زبانهٔ نظرسنجی‌ها را باز کنید",
"title": "نظرسنجی جدیدی به این جلسه اضافه شد"
diff --git a/lang/main-fi.json b/lang/main-fi.json
index b36962ad5d..8e0686757f 100644
--- a/lang/main-fi.json
+++ b/lang/main-fi.json
@@ -438,6 +438,11 @@
},
"passwordDigitsOnly": "",
"passwordSetRemotely": "",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Vaihtoehtojen on oltava ainutlaatuisia"
+ }
+ },
"poweredby": "tukija:",
"presenceStatus": {
"busy": "Varattu",
diff --git a/lang/main-fr.json b/lang/main-fr.json
index accca35c59..7dbdd2a4a1 100644
--- a/lang/main-fr.json
+++ b/lang/main-fr.json
@@ -865,6 +865,9 @@
"removeOption": "Supprimer l'option",
"send": "Envoyer"
},
+ "errors": {
+ "notUniqueOption": "Les options doivent être uniques"
+ },
"notification": {
"description": "Ouvrez l'onglet des sondages pour voter",
"title": "Un nouveau sondage a été ajouté à la réunion"
diff --git a/lang/main-frCA.json b/lang/main-frCA.json
index 9f7c651315..fca36c9b39 100644
--- a/lang/main-frCA.json
+++ b/lang/main-frCA.json
@@ -449,6 +449,11 @@
},
"passwordDigitsOnly": "Jusqu'à {{number}} chiffres",
"passwordSetRemotely": "réglé par un autre membre",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Les options doivent être uniques"
+ }
+ },
"poweredby": "optimisé par",
"presenceStatus": {
"busy": "Occupé",
diff --git a/lang/main-gl.json b/lang/main-gl.json
index bcd4f70a26..e3515768fa 100644
--- a/lang/main-gl.json
+++ b/lang/main-gl.json
@@ -454,6 +454,11 @@
},
"passwordDigitsOnly": "Ata {{number}} díxitos",
"passwordSetRemotely": "estabelecida por outro participante",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "As opcións deben ser únicas"
+ }
+ },
"poweredby": "fornecido por",
"presenceStatus": {
"busy": "Ocupado",
diff --git a/lang/main-he.json b/lang/main-he.json
index e6c5858184..80bce90938 100644
--- a/lang/main-he.json
+++ b/lang/main-he.json
@@ -477,6 +477,11 @@
},
"passwordDigitsOnly": "עד {{number}} ספרות",
"passwordSetRemotely": "נקבע על ידי חבר אחר",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "האפשרויות חייבות להיות ייחודיות"
+ }
+ },
"poweredby": "מופעל על ידי",
"presenceStatus": {
"busy": "עסוק",
diff --git a/lang/main-hi.json b/lang/main-hi.json
index 0346d95f1b..e4d89f82ee 100644
--- a/lang/main-hi.json
+++ b/lang/main-hi.json
@@ -565,6 +565,11 @@
},
"passwordDigitsOnly": "Up to {{number}} digits",
"passwordSetRemotely": "दूसरे प्रतिभागी द्वारा निर्धारित",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "विकल्प अद्वितीय होना चाहिए"
+ }
+ },
"poweredby": "powered by",
"prejoin": {
"audioAndVideoError": "ऑडियो और वीडियो त्रुटि:",
diff --git a/lang/main-hr.json b/lang/main-hr.json
index 5c6c97c0fe..6c1b1ad4fc 100644
--- a/lang/main-hr.json
+++ b/lang/main-hr.json
@@ -770,6 +770,9 @@
"removeOption": "Ukloni opciju",
"send": "Pošalji"
},
+ "errors": {
+ "notUniqueOption": "Opcije moraju biti jedinstvene"
+ },
"notification": {
"description": "Za glasanje otvori karticu ankete",
"title": "Ovom sastanku je dodana nova anketa"
diff --git a/lang/main-hsb.json b/lang/main-hsb.json
index fd531e8c29..56f7622ec6 100644
--- a/lang/main-hsb.json
+++ b/lang/main-hsb.json
@@ -755,6 +755,9 @@
"removeOption": "wotmołwu wotstronić",
"send": "zestajić"
},
+ "errors": {
+ "notUniqueOption": "opcije dyrbja jasne być"
+ },
"notification": {
"description": "Za wobdźělenje wočińće tab za naprašowanje.",
"title": "Tutej konferency bu naprašowanje přidate."
diff --git a/lang/main-hu.json b/lang/main-hu.json
index 7b3ec3b923..c818342ae7 100644
--- a/lang/main-hu.json
+++ b/lang/main-hu.json
@@ -623,6 +623,9 @@
"removeOption": "Opció eltávolítása",
"send": "Küldés"
},
+ "errors": {
+ "notUniqueOption": "Az opcióknak egyedinek kell lenniük"
+ },
"notification": {
"description": "Szavazás megnyitása",
"title": "Új szavazás létrehozva"
diff --git a/lang/main-hy.json b/lang/main-hy.json
index 3831a2abe7..81ee96590b 100644
--- a/lang/main-hy.json
+++ b/lang/main-hy.json
@@ -427,6 +427,11 @@
},
"passwordDigitsOnly": "",
"passwordSetRemotely": "Սահմանվել է մեկ այլ մասնակցի կողմից",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Ընտրանքները պետք է լինեն եզակի"
+ }
+ },
"poweredby": "Հիմնված է",
"presenceStatus": {
"busy": "",
diff --git a/lang/main-is.json b/lang/main-is.json
index eab95b67c0..31cc7e1375 100644
--- a/lang/main-is.json
+++ b/lang/main-is.json
@@ -865,6 +865,9 @@
"removeOption": "Fjarlægja valkost",
"send": "Senda"
},
+ "errors": {
+ "notUniqueOption": "Valkostir hljóta að vera einstök"
+ },
"notification": {
"description": "Opnaðu könnunarflipann til að greiða atkvæði",
"title": "Nýrri könnun var bætt á þennan fund"
diff --git a/lang/main-it.json b/lang/main-it.json
index 3d79fb6ada..6badb47897 100644
--- a/lang/main-it.json
+++ b/lang/main-it.json
@@ -770,6 +770,9 @@
"removeOption": "Elimina risposta",
"send": "Invia"
},
+ "errors": {
+ "notUniqueOption": "Le opzioni devono essere uniche"
+ },
"notification": {
"description": "Apri la scheda sondaggi per votare",
"title": "Un nuovo sondaggio è stato aggiunto alla riunione"
diff --git a/lang/main-ja.json b/lang/main-ja.json
index f029b5f6b7..243716ee54 100644
--- a/lang/main-ja.json
+++ b/lang/main-ja.json
@@ -715,6 +715,9 @@
"removeOption": "選択肢の削除",
"send": "送信"
},
+ "errors": {
+ "notUniqueOption": "オプションは一意でなければなりません"
+ },
"notification": {
"description": "投票するには投票タブを開いてください",
"title": "新しい投票がこのミーティングに追加されました"
diff --git a/lang/main-kab.json b/lang/main-kab.json
index 9b7f683a27..7dcaa4d304 100644
--- a/lang/main-kab.json
+++ b/lang/main-kab.json
@@ -667,6 +667,9 @@
"removeOption": "Kkes aɣewwaṛ",
"send": "Azen"
},
+ "errors": {
+ "notUniqueOption": "tifranin ilaq ad ilin d imaynuten"
+ },
"notification": {
"description": "Ldi iccer n yisenqad i ufran",
"title": "Asenqed amaynut yettwarna ɣer temlilt-a"
diff --git a/lang/main-ko.json b/lang/main-ko.json
index 6c9f363463..e285eae3e4 100644
--- a/lang/main-ko.json
+++ b/lang/main-ko.json
@@ -497,6 +497,11 @@
},
"passwordDigitsOnly": "최대 {{number}} 자리",
"passwordSetRemotely": "다른 참가자가 설정",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "옵션은 고유해야합니다"
+ }
+ },
"poweredby": "powered by",
"presenceStatus": {
"busy": "바쁨",
diff --git a/lang/main-lt.json b/lang/main-lt.json
index 081663819a..c164fe6d88 100644
--- a/lang/main-lt.json
+++ b/lang/main-lt.json
@@ -467,6 +467,11 @@
},
"passwordDigitsOnly": "Daugiausia {{number}} skaičių",
"passwordSetRemotely": "nustatytas kito naudotojo",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Parinktys turi būti unikalios"
+ }
+ },
"poweredby": "pateikiamas",
"presenceStatus": {
"busy": "Užimtas",
diff --git a/lang/main-lv.json b/lang/main-lv.json
index 1b73b51c67..c1a5835574 100644
--- a/lang/main-lv.json
+++ b/lang/main-lv.json
@@ -875,6 +875,9 @@
"removeOption": "Noņemt opciju",
"send": "Nosūtīt"
},
+ "errors": {
+ "notUniqueOption": "Iespējām jābūt unikālām"
+ },
"notification": {
"description": "Lai balsotu, atveriet aptauju cilni",
"title": "Šai sapulcei tika pievienota jauna aptauja"
diff --git a/lang/main-ml.json b/lang/main-ml.json
index 9732b15ede..8f7454832f 100644
--- a/lang/main-ml.json
+++ b/lang/main-ml.json
@@ -545,6 +545,11 @@
},
"passwordDigitsOnly": "{{number}} അക്കങ്ങൾ വരെ",
"passwordSetRemotely": "മറ്റൊരു പങ്കാളി സജ്ജമാക്കിയത്",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "ഓപ്ഷനുകൾ അദ്വിതീയമായിരിക്കണം"
+ }
+ },
"poweredby": "powered by",
"prejoin": {
"audioAndVideoError": "ഓഡിയോ, വീഡിയോ പിശക്:",
diff --git a/lang/main-mn.json b/lang/main-mn.json
index 37e2b06782..9de63813ff 100644
--- a/lang/main-mn.json
+++ b/lang/main-mn.json
@@ -802,6 +802,9 @@
"removeOption": "Сонголт хасах",
"send": "Илгээх"
},
+ "errors": {
+ "notUniqueOption": "Сонголтууд өвөрмөц байх ёстой"
+ },
"notification": {
"description": "Саналаа өгөхийн тулд санал асуулгын хавтсыг нээнэ үү",
"title": "Уулзалтанд шинэ санал асуулга нэмэгдлээ"
diff --git a/lang/main-mr.json b/lang/main-mr.json
index 74663f2abd..cadcb65c85 100644
--- a/lang/main-mr.json
+++ b/lang/main-mr.json
@@ -482,6 +482,11 @@
},
"passwordDigitsOnly": " पर्यंत {{number}} अंक",
"passwordSetRemotely": "दुसर्‍या सहभागीने सेट केलेले",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "पर्याय अद्वितीय असणे आवश्यक आहे"
+ }
+ },
"poweredby": "द्वारा समर्थित",
"prejoin": {
"audioAndVideoError": "ऑडिओ आणि व्हिडिओ त्रुटी:",
diff --git a/lang/main-nl.json b/lang/main-nl.json
index d309bcf5bc..503e7ad8c6 100644
--- a/lang/main-nl.json
+++ b/lang/main-nl.json
@@ -668,6 +668,9 @@
"removeOption": "Verwijder optie",
"send": "Verstuur"
},
+ "errors": {
+ "notUniqueOption": "Opties moeten uniek zijn"
+ },
"notification": {
"description": "Open het peilingen tabblad om te stemmen",
"title": "Een nieuwe peiling is aangemaakt in deze vergadering"
diff --git a/lang/main-oc.json b/lang/main-oc.json
index 07694fc57f..438df8cd1f 100644
--- a/lang/main-oc.json
+++ b/lang/main-oc.json
@@ -714,6 +714,9 @@
"removeOption": "Suprimir l'opcion",
"send": "Enviar"
},
+ "errors": {
+ "notUniqueOption": "Las opcions devon èsser unicas"
+ },
"notification": {
"description": "Dobrissètz l’onglet dels sondatge per votar",
"title": "Un sondatge novèl es estat apondut a la conferéncia"
diff --git a/lang/main-pl.json b/lang/main-pl.json
index 3ebb2dde67..0244b276ea 100644
--- a/lang/main-pl.json
+++ b/lang/main-pl.json
@@ -803,6 +803,9 @@
"removeOption": "Usuń opcję",
"send": "Wyślij"
},
+ "errors": {
+ "notUniqueOption": "Opcje muszą być wyjątkowe"
+ },
"notification": {
"description": "Otwórz kartę ankiet, aby zagłosować",
"title": "Utworzono nową ankietę do tego spotkania"
diff --git a/lang/main-pt.json b/lang/main-pt.json
index cfa2ac32d7..0d2b355fa9 100644
--- a/lang/main-pt.json
+++ b/lang/main-pt.json
@@ -875,6 +875,9 @@
"removeOption": "Remover opção",
"send": "Enviar"
},
+ "errors": {
+ "notUniqueOption": "As opções devem ser únicas"
+ },
"notification": {
"description": "Abrir o separador das sondagens para votar",
"title": "Uma nova sondagem foi adicionada a esta reunião"
diff --git a/lang/main-ptBR.json b/lang/main-ptBR.json
index e31157b1bc..7304c78db3 100644
--- a/lang/main-ptBR.json
+++ b/lang/main-ptBR.json
@@ -864,6 +864,9 @@
"removeOption": "Remover opção",
"send": "Enviar"
},
+ "errors": {
+ "notUniqueOption": "As opções devem ser exclusivas"
+ },
"notification": {
"description": "Abra a aba das votações para votar",
"title": "Uma nova votação foi iniciada nesta conferência"
diff --git a/lang/main-ro.json b/lang/main-ro.json
index 3e324a0748..ef51a03108 100644
--- a/lang/main-ro.json
+++ b/lang/main-ro.json
@@ -471,6 +471,11 @@
},
"passwordDigitsOnly": "Până la {{number}} cifre",
"passwordSetRemotely": "Setată de un alt membru",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Opțiunile trebuie să fie unice"
+ }
+ },
"poweredby": "cu sprijinul",
"presenceStatus": {
"busy": "Ocupat",
diff --git a/lang/main-ru.json b/lang/main-ru.json
index ec821db359..10617a353e 100644
--- a/lang/main-ru.json
+++ b/lang/main-ru.json
@@ -771,6 +771,9 @@
"removeOption": "Удалить вариант",
"send": "Отправлять"
},
+ "errors": {
+ "notUniqueOption": "Варианты должны быть уникальными"
+ },
"notification": {
"description": "Откройте вкладку опросов, чтобы проголосовать",
"title": "К этой встрече добавлен новый опрос"
diff --git a/lang/main-sc.json b/lang/main-sc.json
index afa94788be..a413ba99de 100644
--- a/lang/main-sc.json
+++ b/lang/main-sc.json
@@ -772,6 +772,9 @@
"removeOption": "Boga s'optzione",
"send": "Imbia"
},
+ "errors": {
+ "notUniqueOption": "Sas optziones depent èssere ùnicas"
+ },
"notification": {
"description": "Aberi ischeda de sondàgiu pro votare",
"title": "Sondàgiu nou agiuntu a sa riunione"
diff --git a/lang/main-sk.json b/lang/main-sk.json
index fcef03ecb4..2a527c48ab 100644
--- a/lang/main-sk.json
+++ b/lang/main-sk.json
@@ -547,6 +547,11 @@
},
"passwordDigitsOnly": "až {{number}} číslic",
"passwordSetRemotely": "nastavené iným účastníkom",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Možnosti musia byť jedinečné"
+ }
+ },
"poweredby": "založené na",
"prejoin": {
"audioAndVideoError": "Chyba zvuku a videa:",
diff --git a/lang/main-sl.json b/lang/main-sl.json
index 3b62790642..34e03492a9 100644
--- a/lang/main-sl.json
+++ b/lang/main-sl.json
@@ -668,6 +668,9 @@
"removeOption": "Odstrani možnost",
"send": "Pošlji"
},
+ "errors": {
+ "notUniqueOption": "Možnosti morajo biti edinstvene"
+ },
"notification": {
"description": "Odpri zavihek z anketami za glasovanje",
"title": "V sestanek je bila dodana nova anketa"
diff --git a/lang/main-sq.json b/lang/main-sq.json
index be5ec55079..f7c0092153 100644
--- a/lang/main-sq.json
+++ b/lang/main-sq.json
@@ -872,6 +872,9 @@
"removeOption": "Hiqe mundësinë",
"send": "Dërgoje"
},
+ "errors": {
+ "notUniqueOption": "Opsionet duhet të jenë unike"
+ },
"notification": {
"description": "Që të votoni, hapni skedën e pyetësorëve",
"title": "Te ky takim u shtua një pyetësor i ri"
diff --git a/lang/main-sr.json b/lang/main-sr.json
index da8f5cc5f3..0e27a5236a 100644
--- a/lang/main-sr.json
+++ b/lang/main-sr.json
@@ -447,6 +447,11 @@
},
"passwordDigitsOnly": "",
"passwordSetRemotely": "",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Опције морају бити јединствене"
+ }
+ },
"poweredby": "",
"prejoin": {
"audioAndVideoError": "Грешка звука и видеа:",
diff --git a/lang/main-sv.json b/lang/main-sv.json
index d72d02f3a2..6f99caf97e 100644
--- a/lang/main-sv.json
+++ b/lang/main-sv.json
@@ -804,6 +804,9 @@
"removeOption": "Ta bort alternativ",
"send": "Skicka"
},
+ "errors": {
+ "notUniqueOption": "Alternativ måste vara unika"
+ },
"notification": {
"description": "Öppna fliken omröstningar för att rösta",
"title": "En ny omröstning har blivit tillagd till detta möte"
diff --git a/lang/main-te.json b/lang/main-te.json
index b9fbf5652b..1c4da0102b 100644
--- a/lang/main-te.json
+++ b/lang/main-te.json
@@ -577,6 +577,11 @@
},
"passwordDigitsOnly": "{{number}} అంకెల వరకు",
"passwordSetRemotely": "మరో సదస్యులు అమర్చారు",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "ఎంపికలు ప్రత్యేకంగా ఉండాలి"
+ }
+ },
"poweredby": "శక్తిమంతం",
"prejoin": {
"audioAndVideoError": "Audio and video error:",
diff --git a/lang/main-tr.json b/lang/main-tr.json
index c8528439ea..c1289c2668 100644
--- a/lang/main-tr.json
+++ b/lang/main-tr.json
@@ -875,6 +875,9 @@
"removeOption": "Seçeneği sil",
"send": "Gönder"
},
+ "errors": {
+ "notUniqueOption": "Seçenekler benzersiz olmalı"
+ },
"notification": {
"description": "Oy vermek için anketler sekmesini açın",
"title": "Anket toplantıya eklendi"
diff --git a/lang/main-uk.json b/lang/main-uk.json
index 85578b8c13..20bab096fc 100644
--- a/lang/main-uk.json
+++ b/lang/main-uk.json
@@ -800,6 +800,9 @@
"removeOption": "Вилучити",
"send": "Надіслати"
},
+ "errors": {
+ "notUniqueOption": "Параметри повинні бути унікальними"
+ },
"notification": {
"description": "Щоб проголосувати, відкрийте вкладку опитувань",
"title": "Додано нове опитування"
diff --git a/lang/main-vi.json b/lang/main-vi.json
index cba313a002..4562c32c84 100644
--- a/lang/main-vi.json
+++ b/lang/main-vi.json
@@ -474,6 +474,11 @@
},
"passwordDigitsOnly": "",
"passwordSetRemotely": "được thiết lập bởi một người khác",
+ "polls": {
+ "errors": {
+ "notUniqueOption": "Tùy chọn phải là duy nhất"
+ }
+ },
"poweredby": "Được hỗ trợ bởi",
"presenceStatus": {
"busy": "Bận",
diff --git a/lang/main-zhCN.json b/lang/main-zhCN.json
index d90d4cd922..0c619d6ac2 100644
--- a/lang/main-zhCN.json
+++ b/lang/main-zhCN.json
@@ -845,6 +845,9 @@
"removeOption": "移除选项",
"send": "发送"
},
+ "errors": {
+ "notUniqueOption": "选项必须是唯一的"
+ },
"notification": {
"description": "打开投票页面进行投票",
"title": "本次会议有一项新的投票"
diff --git a/lang/main-zhTW.json b/lang/main-zhTW.json
index c86a3b6b23..c22250f018 100644
--- a/lang/main-zhTW.json
+++ b/lang/main-zhTW.json
@@ -863,6 +863,9 @@
"removeOption": "移除選項",
"send": "傳送"
},
+ "errors": {
+ "notUniqueOption": "選項必須是唯一的"
+ },
"notification": {
"description": "開啟投票分頁以參與投票",
"title": "此會議有一項新投票"
diff --git a/lang/main.json b/lang/main.json
index 02a2ba36cd..06fc396426 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -875,6 +875,9 @@
"removeOption": "Remove option",
"send": "Send"
},
+ "errors": {
+ "notUniqueOption": "Options must be unique"
+ },
"notification": {
"description": "Open polls tab to vote",
"title": "A new poll was added to this meeting"
diff --git a/react/features/polls/components/AbstractPollCreate.tsx b/react/features/polls/components/AbstractPollCreate.tsx
index dbd4cdfdc0..03655d1746 100644
--- a/react/features/polls/components/AbstractPollCreate.tsx
+++ b/react/features/polls/components/AbstractPollCreate.tsx
@@ -6,6 +6,7 @@ import { createPollEvent } from '../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../analytics/functions';
import { IReduxState } from '../../app/types';
import { COMMAND_NEW_POLL } from '../constants';
+import { hasIdenticalAnswers } from '../functions';
/**
* The type of the React {@code Component} props of inheriting component.
@@ -37,6 +38,8 @@ export type AbstractProps = InputProps & {
* @param {React.AbstractComponent} Component - The concrete component.
* @returns {React.AbstractComponent}
*/
+
+
const AbstractPollCreate = (Component: ComponentType<AbstractProps>) => (props: InputProps) => {
const { setCreateMode } = props;
@@ -102,7 +105,8 @@ const AbstractPollCreate = (Component: ComponentType<AbstractProps>) => (props:
// Check if the poll create form can be submitted i.e. if the send button should be disabled.
const isSubmitDisabled
= question.trim().length <= 0 // If no question is provided
- || answers.filter(answer => answer.trim().length > 0).length < 2; // If not enough options are provided
+ || answers.filter(answer => answer.trim().length > 0).length < 2 // If not enough options are provided
+ || hasIdenticalAnswers(answers); // If duplicate options are provided
const { t } = useTranslation();
diff --git a/react/features/polls/components/web/PollCreate.tsx b/react/features/polls/components/web/PollCreate.tsx
index a76952875f..6c1a283671 100644
--- a/react/features/polls/components/web/PollCreate.tsx
+++ b/react/features/polls/components/web/PollCreate.tsx
@@ -201,11 +201,19 @@ const PollCreate = ({
value = { question } />
</div>
<ol className = { classes.answerList }>
- {answers.map((answer: any, i: number) =>
- (<li
+ {answers.map((answer: any, i: number) => {
+
+ const isIdenticalAnswer = answers.slice(0, i).length === 0 ? false
+ : answers.slice(0, i).some((prevAnswer: string) =>
+ prevAnswer === answer && prevAnswer !== '' && answer !== '');
+
+ return (<li
className = { classes.answer }
key = { i }>
<Input
+ bottomLabel = { (isIdenticalAnswer ? t('polls.errors.notUniqueOption',
+ { index: i + 1 }) : '') }
+ error = { isIdenticalAnswer }
id = { `polls-answer-input-${i}` }
label = { t('polls.create.pollOption', { index: i + 1 }) }
maxLength = { CHAR_LIMIT }
@@ -223,7 +231,8 @@ const PollCreate = ({
type = 'button'>
{ t('polls.create.removeOption') }
</button>}
- </li>)
+ </li>);
+ }
)}
</ol>
<div className = { classes.addButtonContainer }>
diff --git a/react/features/polls/functions.ts b/react/features/polls/functions.ts
index 83a69b8183..fdfd8ed1f9 100644
--- a/react/features/polls/functions.ts
+++ b/react/features/polls/functions.ts
@@ -45,3 +45,18 @@ export function getUnreadPollCount(state: IReduxState) {
export function isSubmitAnswerDisabled(checkBoxStates: Array<boolean>) {
return !checkBoxStates.find(checked => checked);
}
+
+/**
+ * Check if the input array has identical answers.
+ *
+ * @param {Array<string>} currentAnswers - The array of current answers to compare.
+ * @returns {boolean} - Returns true if the answers are identical.
+ */
+export function hasIdenticalAnswers(currentAnswers: Array<string>): boolean {
+
+ const nonEmptyCurrentAnswers = currentAnswers.filter((answer: string): boolean => answer !== '');
+
+ const currentAnswersSet = new Set(nonEmptyCurrentAnswers);
+
+ return currentAnswersSet.size !== nonEmptyCurrentAnswers.length;
+}