diff --git a/enterprise/backend/poetry.lock b/enterprise/backend/poetry.lock index 0ed5e2f19..bd6b42841 100644 --- a/enterprise/backend/poetry.lock +++ b/enterprise/backend/poetry.lock @@ -27,13 +27,13 @@ files = [ [[package]] name = "django" -version = "5.1" +version = "5.1.2" description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." optional = false python-versions = ">=3.10" files = [ - {file = "Django-5.1-py3-none-any.whl", hash = "sha256:d3b811bf5371a26def053d7ee42a9df1267ef7622323fe70a601936725aa4557"}, - {file = "Django-5.1.tar.gz", hash = "sha256:848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d"}, + {file = "Django-5.1.2-py3-none-any.whl", hash = "sha256:f11aa87ad8d5617171e3f77e1d5d16f004b79a2cf5d2e1d2b97a6a1f8e9ba5ed"}, + {file = "Django-5.1.2.tar.gz", hash = "sha256:bd7376f90c99f96b643722eee676498706c9fd7dc759f55ebfaf2c08ebcdf4f0"}, ] [package.dependencies] @@ -84,13 +84,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pytest" -version = "8.3.2" +version = "8.3.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, - {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] [package.dependencies] @@ -102,6 +102,20 @@ pluggy = ">=1.5,<2" [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +[[package]] +name = "python-dotenv" +version = "1.0.1" +description = "Read key-value pairs from a .env file and set them as environment variables" +optional = false +python-versions = ">=3.8" +files = [ + {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, + {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, +] + +[package.extras] +cli = ["click (>=5.0)"] + [[package]] name = "sqlparse" version = "0.5.1" @@ -119,16 +133,16 @@ doc = ["sphinx"] [[package]] name = "tzdata" -version = "2024.1" +version = "2024.2" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" files = [ - {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, - {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, + {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, + {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, ] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "8a80aa85d51ed80a0e0507445c58329043159fbfe335ea462f15c71c3275f678" +content-hash = "a6d699f628281abbe5ea4434fcb028a794b72ab9946b2739d2a6fa921e552d80" diff --git a/enterprise/backend/pyproject.toml b/enterprise/backend/pyproject.toml index 8c69ed480..e57da8488 100644 --- a/enterprise/backend/pyproject.toml +++ b/enterprise/backend/pyproject.toml @@ -8,6 +8,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.11" django = "^5.1" +python-dotenv = "^1.0.1" [tool.poetry.group.dev.dependencies] pytest = "^8.3.2" diff --git a/frontend/messages/ar.json b/frontend/messages/ar.json index b71faa3f2..ef433f666 100644 --- a/frontend/messages/ar.json +++ b/frontend/messages/ar.json @@ -767,6 +767,8 @@ "backupLoadingError": "حدث خطأ أثناء تحميل النسخة الاحتياطية.", "backupGreaterVersionError": "لا يمكن تحميل النسخة الاحتياطية، إصدار النسخة الاحتياطية أعلى من الإصدار الحالي للتطبيق الخاص بك.", "backupLowerVersionError": "حدث خطأ، قد تكون نسخة النسخ الاحتياطي قديمة جدًا، إذا كان الأمر كذلك فيجب تحديثها قبل إعادة المحاولة.", + "questionSingular": "سؤال", + "questionPlural": "أسئلة", "NoPreviewMessage": "لا يوجد معاينة متاحة.", "entityAssessmentEvidenceHelpText": "استبيان خارجي", "associatedEntities": "الكيانات المرتبطة", diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 71b2ff95f..513d07d95 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -767,6 +767,8 @@ "backupLoadingError": "Beim Laden der Sicherung ist ein Fehler aufgetreten.", "backupGreaterVersionError": "Das Backup kann nicht geladen werden, die Version des Backups ist höher als die aktuelle Version Ihrer Anwendung.", "backupLowerVersionError": "Ein Fehler ist aufgetreten. Die Sicherungsversion ist möglicherweise zu alt. Wenn dies der Fall ist, muss sie vor einem erneuten Versuch aktualisiert werden.", + "questionSingular": "Frage", + "questionPlural": "Fragen", "NoPreviewMessage": "Keine Vorschau verfügbar.", "entityAssessmentEvidenceHelpText": "Ein externer Fragebogen", "associatedEntities": "Verbundene Unternehmen", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 920514ccf..67ea59959 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -778,6 +778,8 @@ "librariesCanOnlyBeLoadedByAdmin": "Libraries can only be loaded by an administrator", "catalog": "Catalog", "operations": "Operations", + "questionSingular": "Question", + "questionPlural": "Questions", "fillMetadataURL": "Option 1: Fill the metadata url", "fillSSOSLOURLx509cert": "Option 2: Fill the SSO URL, SLO URL and x509cert" } diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 85d214d94..5d379675e 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -767,6 +767,8 @@ "backupLoadingError": "Se produjo un error al cargar la copia de seguridad.", "backupGreaterVersionError": "No se puede cargar la copia de seguridad, la versión de la copia de seguridad es superior a la versión actual de la aplicación.", "backupLowerVersionError": "Se produjo un error, la versión de respaldo puede ser demasiado antigua, si es así debe actualizarse antes de volver a intentarlo.", + "questionSingular": "Pregunta", + "questionPlural": "Preguntas", "NoPreviewMessage": "No hay vista previa disponible.", "entityAssessmentEvidenceHelpText": "Un cuestionario externo", "associatedEntities": "Entidades asociadas", diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index 4e7821337..90f19abfd 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -767,6 +767,8 @@ "backupLoadingError": "Une erreur s'est produite lors du chargement de la sauvegarde.", "backupGreaterVersionError": "Impossible de charger la sauvegarde, la version de la sauvegarde est supérieure à la version actuelle de votre application.", "backupLowerVersionError": "Une erreur s'est produite, la version de sauvegarde est peut-être trop ancienne, si c'est le cas, elle doit être mise à jour avant de réessayer.", + "questionSingular": "Question", + "questionPlural": "Questions", "NoPreviewMessage": "Aucun aperçu disponible.", "entityAssessmentEvidenceHelpText": "Un questionnaire externe", "associatedEntities": "Entités associées", diff --git a/frontend/messages/hi.json b/frontend/messages/hi.json index a8e685bd6..6d10fd511 100644 --- a/frontend/messages/hi.json +++ b/frontend/messages/hi.json @@ -767,6 +767,8 @@ "backupLoadingError": "बैकअप लोड करते समय एक त्रुटि हुई.", "backupGreaterVersionError": "बैकअप लोड नहीं किया जा सकता, बैकअप का संस्करण आपके एप्लिकेशन के वर्तमान संस्करण से अधिक है.", "backupLowerVersionError": "कोई त्रुटि हुई, बैकअप संस्करण बहुत पुराना हो सकता है, यदि ऐसा है तो पुनः प्रयास करने से पहले उसे अद्यतन करना आवश्यक है।", + "questionSingular": "सवाल", + "questionPlural": "प्रश्न", "NoPreviewMessage": "कोई पूर्वावलोकन उपलब्ध नहीं है.", "entityAssessmentEvidenceHelpText": "एक बाहरी प्रश्नावली", "associatedEntities": "संबद्ध संस्थाएं", diff --git a/frontend/messages/it.json b/frontend/messages/it.json index 9e8771f28..61c73fbf2 100644 --- a/frontend/messages/it.json +++ b/frontend/messages/it.json @@ -767,6 +767,8 @@ "backupLoadingError": "Si è verificato un errore durante il caricamento del backup.", "backupGreaterVersionError": "Impossibile caricare il backup, la versione del backup è successiva alla versione corrente dell'applicazione.", "backupLowerVersionError": "Si è verificato un errore, la versione di backup potrebbe essere troppo vecchia. In tal caso, è necessario aggiornarla prima di riprovare.", + "questionSingular": "Domanda", + "questionPlural": "Domande", "NoPreviewMessage": "Nessuna anteprima disponibile.", "entityAssessmentEvidenceHelpText": "Un questionario esterno", "associatedEntities": "Entità collegate", diff --git a/frontend/messages/nl.json b/frontend/messages/nl.json index 02460a88b..0f8210547 100644 --- a/frontend/messages/nl.json +++ b/frontend/messages/nl.json @@ -767,6 +767,8 @@ "backupLoadingError": "Er is een fout opgetreden tijdens het laden van de back-up.", "backupGreaterVersionError": "De back-up kan niet worden geladen. De versie van de back-up is hoger dan de huidige versie van uw applicatie.", "backupLowerVersionError": "Er is een fout opgetreden. Mogelijk is de back-upversie te oud. Als dat zo is, moet u deze bijwerken voordat u het opnieuw probeert.", + "questionSingular": "Vraag", + "questionPlural": "Vragen", "NoPreviewMessage": "Geen voorbeeld beschikbaar.", "entityAssessmentEvidenceHelpText": "Een externe vragenlijst", "associatedEntities": "Geassocieerde entiteiten", diff --git a/frontend/messages/pl.json b/frontend/messages/pl.json index 94b52336f..2ceef4a44 100644 --- a/frontend/messages/pl.json +++ b/frontend/messages/pl.json @@ -767,6 +767,8 @@ "backupLoadingError": "Wystąpił błąd podczas ładowania kopii zapasowej.", "backupGreaterVersionError": "Nie można załadować kopii zapasowej. Wersja kopii zapasowej jest nowsza niż bieżąca wersja aplikacji.", "backupLowerVersionError": "Wystąpił błąd. Wersja kopii zapasowej może być za stara. Jeśli tak, należy ją zaktualizować przed ponowną próbą.", + "questionSingular": "Pytanie", + "questionPlural": "Pytania", "NoPreviewMessage": "Podgląd niedostępny.", "entityAssessmentEvidenceHelpText": "Kwestionariusz zewnętrzny", "associatedEntities": "Podmioty powiązane", diff --git a/frontend/messages/pt.json b/frontend/messages/pt.json index 4d7fa3336..fd0b6fad9 100644 --- a/frontend/messages/pt.json +++ b/frontend/messages/pt.json @@ -767,6 +767,8 @@ "backupLoadingError": "Ocorreu um erro ao carregar o backup.", "backupGreaterVersionError": "Não é possível carregar o backup, a versão do backup é superior à versão atual do seu aplicativo.", "backupLowerVersionError": "Ocorreu um erro, a versão de backup pode ser muito antiga. Se for o caso, ela deve ser atualizada antes de tentar novamente.", + "questionSingular": "Pergunta", + "questionPlural": "Questões", "NoPreviewMessage": "Nenhuma pré-visualização disponível.", "entityAssessmentEvidenceHelpText": "Um questionário externo", "associatedEntities": "Entidades associadas", diff --git a/frontend/messages/ro.json b/frontend/messages/ro.json index 8adbca206..ae76b0a34 100644 --- a/frontend/messages/ro.json +++ b/frontend/messages/ro.json @@ -767,6 +767,8 @@ "backupLoadingError": "A apărut o eroare la încărcarea copiei de rezervă.", "backupGreaterVersionError": "Nu se poate încărca copia de rezervă, versiunea copiei de rezervă este mai mare decât versiunea curentă a aplicației dvs.", "backupLowerVersionError": "A apărut o eroare, versiunea de rezervă poate fi prea veche, dacă da, trebuie actualizată înainte de a reîncerca.", + "questionSingular": "Întrebare", + "questionPlural": "Întrebări", "NoPreviewMessage": "Nicio previzualizare disponibilă.", "entityAssessmentEvidenceHelpText": "Un chestionar extern", "associatedEntities": "Entități asociate", diff --git a/frontend/messages/ur.json b/frontend/messages/ur.json index f5490ad0b..d663ba920 100644 --- a/frontend/messages/ur.json +++ b/frontend/messages/ur.json @@ -767,6 +767,8 @@ "backupLoadingError": "بیک اپ لوڈ کرتے وقت ایک خرابی پیش آگئی۔", "backupGreaterVersionError": "بیک اپ لوڈ نہیں ہو سکتا، بیک اپ کا ورژن آپ کی ایپلیکیشن کے موجودہ ورژن سے زیادہ ہے۔", "backupLowerVersionError": "ایک خرابی پیش آ گئی، بیک اپ ورژن بہت پرانا ہو سکتا ہے، اگر ایسا ہے تو اسے دوبارہ کوشش کرنے سے پہلے اپ ڈیٹ کرنا ضروری ہے۔", + "questionSingular": "سوال", + "questionPlural": "سوالات", "NoPreviewMessage": "کوئی پیش نظارہ دستیاب نہیں ہے۔", "entityAssessmentEvidenceHelpText": "ایک بیرونی سوالنامہ", "associatedEntities": "وابستہ ادارے", diff --git a/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/+page.svelte index ddcd3faa7..65eaab072 100644 --- a/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/+page.svelte +++ b/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/+page.svelte @@ -32,6 +32,12 @@ export let data: PageData; export let form: ActionData; + import ConfirmModal from '$lib/components/Modals/ConfirmModal.svelte'; + import { displayScoreColor } from '$lib/utils/helpers'; + import { expandedNodesState } from '$lib/utils/stores'; + import { ProgressRadial } from '@skeletonlabs/skeleton'; + import List from '$lib/components/List/List.svelte'; + breadcrumbObject.set(data.compliance_assessment); const tree = data.tree; @@ -118,12 +124,6 @@ let expandedNodes: TreeViewNode[] = []; - import ConfirmModal from '$lib/components/Modals/ConfirmModal.svelte'; - import { displayScoreColor } from '$lib/utils/helpers'; - import { expandedNodesState } from '$lib/utils/stores'; - import { ProgressRadial } from '@skeletonlabs/skeleton'; - import List from '$lib/components/List/List.svelte'; - expandedNodes = $expandedNodesState; $: expandedNodesState.set(expandedNodes); diff --git a/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/TreeViewItemContent.svelte b/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/TreeViewItemContent.svelte index 7f78e78be..d9b543690 100644 --- a/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/TreeViewItemContent.svelte +++ b/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/TreeViewItemContent.svelte @@ -156,9 +156,19 @@ {/each} {/if} {#if node.question && node.question.questions} - {node.question.questions.length} {m.questionOrQuestions()} + {#if node.question.questions.length > 1} + {node.question.questions.length} {m.questionPlural()} + {:else} + {node.question.questions.length} {m.questionSingular()} + {/if} {/if}