diff --git a/frontend/messages/en.json b/frontend/messages/en.json index faecb3f4e..140a3381d 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1,9 +1,31 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", - "addButton": "Add {model}", - "associatedObject": "Associated {model}", "french": "French", "english": "English", + "addThreat": "New threat", + "addSecurityFunction": "New security function", + "addSecurityMeasure": "New security measure", + "addAsset": "New asset", + "addRiskAssessment": "New risk assessment", + "addRiskScenario": "New risk scenario", + "addRiskAcceptance": "New risk acceptance", + "addComplianceAssessment": "New compliance assessment", + "addEvidence": "New evidence", + "addDomain": "New domain", + "addProject": "New project", + "addUser": "New user", + "associatedThreats": "Associated threats", + "associatedSecurityFunctions": "Associated security functions", + "associatedSecurityMeasures": "Associated security measures", + "associatedAssets": "Associated assets", + "associatedRiskAssessments": "Associated risk assessments", + "associatedRiskScenarios": "Associated risk scenarios", + "associatedRiskAcceptances": "Associated risk acceptances", + "associatedComplianceAssessments": "Associated compliance assessments", + "associatedEvidences": "Associated evidences", + "associatedDomains": "Associated domains", + "associatedProjects": "Associated projects", + "associatedUsers": "Associated users", "home": "Home", "edit": "Edit", "overview": "Overview", @@ -125,7 +147,7 @@ "statistics": "Statistics", "myProjects": "My projects", "scenarios": "Scenarios", - "assignedObjects": "Assigned to {number} {object}", + "assignedProjects": "Assigned to {number} project{s}", "currentRiskLevelPerScenario": "Current risk level per risk scenario", "residualRiskLevelPerScenario": "Residual risk level per risk scenario", "securityMeasuresStatus": "Security measures status", @@ -147,7 +169,8 @@ "upcoming": "Upcoming", "today": "Today", "actionRequested": "Action requested", - "noObjectYet": "No {object} yet", + "noRiskAcceptanceYet": "No risk acceptance yet", + "noSecurityMeasureYet": "No security measure yet", "authors": "Authors", "reviewers": "Reviewers", "process": "Process", @@ -161,7 +184,7 @@ "pendingMeasures": "Your pending measures", "orderdByRankingScore": "Ordered by ranking score", "rankingScore": "Ranking score", - "noPendingObject": "No pending {object}", + "noPendingSecurityMeasure": "No pending security measure", "rankingScoreDefintion": "Ranking score is an adaptive metric that combines the information of effort and current risk level, and crosses it with the other data to assist you for the prioritization", "actions": "Actions", "projectsSummaryEmpty": "Projects summary is empty", @@ -172,6 +195,39 @@ "measureOpen": "Measure: open", "measureProgress": "Measure: in progress", "measureHold": "Measure: on hold", - "measureDone": "Measure: done" - + "measureDone": "Measure: done", + "monday": "Monday", + "tuesday": "Tuesday", + "wednesday": "Wednesday", + "thursday": "Thursday", + "friday": "Friday", + "saturday": "Saturday", + "sunday": "Sunday", + "january": "January", + "february": "February", + "march": "March", + "april": "April", + "may": "May", + "june": "June", + "july": "July", + "august": "August", + "september": "September", + "october": "October", + "november": "November", + "december": "December", + "errorsFound": "error{s} found", + "warningsFound": "warning{s} found", + "infosFound": "info{s} found", + "remediationPlan": "Remediation plan", + "treatmentPlan": "Treatment plan", + "asPDF": "as PDF", + "asCSV": "as CSV", + "draft": "Draft", + "riskMatrixView": "Risk matrix view", + "currentInMatrixView": "Current", + "residualInMatrixView": "Residual", + "probability": "Probability", + "riskLevels": "Risk levels", + "cancel": "Cancel", + "save": "Save" } diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index 124e7f29a..ec12603a8 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -1,9 +1,31 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", - "addButton": "Ajouter {determinant} {model}", - "associatedObject": "{model} associé{e}s", "french": "Français", "english": "Anglais", + "addThreat": "Ajouter une menace", + "addSecurityFunction": "Ajouter une fonction de sécurité", + "addSecurityMeasure": "Ajouter une mesure de sécurité", + "addAsset": "Ajouter un bien sensible", + "addRiskAssessment": "Ajouter une évaluation de risque", + "addRiskScenario": "Ajouter un scénario de risque", + "addRiskAcceptance": "Ajouter une acceptation de risque", + "addComplianceAssessment": "Ajouter une évaluation de conformité", + "addEvidence": "Ajouter une preuve", + "addDomain": "Ajouter un domaine", + "addProject": "Ajouter un projet", + "addUser": "Ajouter un utilisateur", + "associatedThreats": "Menaces associées", + "associatedSecurityFunctions": "Fonctions de sécurité associées", + "associatedSecurityMeasures": "Mesures de sécurité associées", + "associatedAssets": "Biens sensibles associés", + "associatedRiskAssessments": "Évaluations de risque associées", + "associatedRiskScenarios": "Scénarios de risque associés", + "associatedRiskAcceptances": "Acceptations de risque associées", + "associatedComplianceAssessments": "Évaluations de conformité associées", + "associatedEvidences": "Preuves associées", + "associatedDomains": "Domaines associés", + "associatedProjects": "Projets associés", + "associatedUsers": "Utilisateurs associés", "home": "Accueil", "edit": "Modifier", "overview": "Vue d'ensemble", @@ -39,7 +61,7 @@ "userGroups": "Groupes d'utilisateurs", "roleAssignments": "Affectations de rôle", "xRays": "X-rays", - "scoringAssistant": "Assistat d'évaluation", + "scoringAssistant": "Assistant d'évaluation", "libraries": "Bibliothèques", "backupRestore": "Sauvegarde et restauration", "myProfile": "Mon profil", @@ -125,7 +147,7 @@ "statistics": "Statistiques", "myProjects": "Mes projets", "scenarios": "Scénarios", - "assignedObjects": "Assigné à {number} {object}", + "assignedProjects": "Assigné à {number} project{s}", "currentRiskLevelPerScenario": "Niveau de risque courant par scénario de risque", "residualRiskLevelPerScenario": "Niveau de risque résiduel par scénario de risque", "securityMeasuresStatus": "Statut des mesures de sécurité", @@ -147,7 +169,8 @@ "upcoming": "À venir", "today": "Aujourd'hui", "actionRequested": "Action requise", - "noObjectYet": "Aucun{e} {object} pour le moment", + "noRiskAcceptanceYet": "Aucune acceptation de risque pour le moment", + "noSecurityMeasureYet": "Aucune mesure de sécurité pour le moment", "authors": "Auteurs", "reviewers": "Relecteurs", "process": "Traiter", @@ -161,7 +184,7 @@ "pendingMeasures": "Vos mesures en attente", "orderdByRankingScore": "Classées par score", "rankingScore": "Score de classement", - "noPendingObject": "Aucun{e} {objet} en attente", + "noPendingSecurityMeasure": "Aucune mesure de sécurité en attente", "rankingScoreDefintion": "Le score de classement est une mesure adaptative qui combine les informations relatives à l'effort et au niveau de risque actuel, et les croise avec d'autres données pour vous aider à établir des priorités", "actions": "Actions", "projectsSummaryEmpty": "Le résumé des projets est vide", @@ -172,6 +195,39 @@ "measureOpen": "Mesure: ouverte", "measureProgress": "Mesure: en cours", "measureHold": "Mesure: en attente", - "measureDone": "Mesure: terminée" + "measureDone": "Mesure: terminée", + "monday": "Lundi", + "tuesday": "Mardi", + "wednesday": "Mercredi", + "thursday": "Jeudi", + "friday": "Vendredi", + "saturday": "Samedi", + "sunday": "Dimanche", + "january": "Janvier", + "february": "Février", + "march": "Mars", + "april": "Avril", + "may": "Mai", + "june": "Juin", + "july": "Juillet", + "august": "Août", + "september": "Septembre", + "october": "Octobre", + "november": "Novembre", + "december": "Décembre", + "errorsFound": "erreur{s} trouvée{s}", + "warningsFound": "avertissement{s} trouvé{s}", + "infosFound": "info{s} trouvée{s}", + "remediationPlan": "Plan de remédiation", + "treatmentPlan": "Plan de traitement", + "asPDF": "en PDF", + "asCSV": "en CSV", + "draft": "Brouillon", + "riskMatrixView": "Vue de la matrice de risque", + "currentInMatrixView": "Courante", + "residualInMatrixView": "Residuelle", + "probability": "Probabilité", + "riskLevels": "Niveaux de risque", + "cancel": "Annuler", + "save": "Enregistrer" } - diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index d858e03c1..85d1bf407 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -3,7 +3,9 @@ import { devices } from '@playwright/test'; const config: PlaywrightTestConfig = { webServer: { - command: process.env.COMPOSE_TEST ? 'echo "The docker compose frontend server didn\'t start correctly"' : 'npm run build && npm run preview', + command: process.env.COMPOSE_TEST + ? 'echo "The docker compose frontend server didn\'t start correctly"' + : 'npm run build && npm run preview', port: process.env.COMPOSE_TEST ? 3000 : 4173, reuseExistingServer: process.env.COMPOSE_TEST }, @@ -15,34 +17,37 @@ const config: PlaywrightTestConfig = { workers: process.env.CI ? 1 : 1, globalTimeout: 60 * 60 * 1000, timeout: 50 * 1000, - expect : { + expect: { timeout: 10 * 1000 }, reporter: [ [process.env.CI ? 'github' : 'list'], - ['html', { - open: process.env.CI ? 'never' : process.env.DOCKER ? 'always' : 'on-failure', - outputFolder: 'tests/reports', - host: process.env.DOCKER ? '0.0.0.0' : 'localhost' - }] + [ + 'html', + { + open: process.env.CI ? 'never' : process.env.DOCKER ? 'always' : 'on-failure', + outputFolder: 'tests/reports', + host: process.env.DOCKER ? '0.0.0.0' : 'localhost' + } + ] ], use: { screenshot: 'only-on-failure', video: process.env.CI ? 'retain-on-failure' : 'on', trace: process.env.CI ? 'retain-on-failure' : 'on', contextOptions: { - recordVideo: { dir: "tests/results/videos"}, - }, + recordVideo: { dir: 'tests/results/videos' } + } }, projects: [ { name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + use: { ...devices['Desktop Chrome'] } }, { name: 'firefox', - use: { ...devices['Desktop Firefox'] }, - }, + use: { ...devices['Desktop Firefox'] } + } // { // name: 'webkit', // use: { ...devices['Desktop Safari'] }, diff --git a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte index 6c72faf1d..fadc08ae0 100644 --- a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte @@ -9,41 +9,42 @@ let crumbs: Array<{ label: string; href: string; icon?: string }> = []; function capitalizeSecondWord(sentence: string) { - var words = sentence.split(' '); + var words = sentence.split(' '); - if (words.length >= 2) { - words[1] = words[1].charAt(0).toUpperCase() + words[1].substring(1); - return words.join(''); - } else { - return sentence; - } -} + if (words.length >= 2) { + words[1] = words[1].charAt(0).toUpperCase() + words[1].substring(1); + return words.join(''); + } else { + return sentence; + } + } $: { // Remove zero-length tokens. const tokens = $page.url.pathname.split('/').filter((t) => t !== ''); + let title = ''; // Create { label, href } pairs for each token. let tokenPath = ''; crumbs = tokens.map((t) => { tokenPath += '/' + t; if (t === $breadcrumbObject.id) { - if ($breadcrumbObject.name) t = $breadcrumbObject.name; - else t = $breadcrumbObject.email; + if ($breadcrumbObject.name) title = $breadcrumbObject.name; + else title = $breadcrumbObject.email; } else if (t === 'folders') { t = 'domains'; } t = t.replace(/-/g, ' '); t = capitalizeSecondWord(t); return { - label: $page.data.label || t, + label: $page.data.label || title || t, href: Object.keys(listViewFields).includes(tokens[0]) ? tokenPath : null }; }); crumbs.unshift({ label: m.home(), href: '/', icon: 'fa-regular fa-compass' }); if (crumbs[crumbs.length - 1].label != 'edit') pageTitle.set(crumbs[crumbs.length - 1].label); - else pageTitle.set(m.edit()+ ' ' + crumbs[crumbs.length - 2].label); + else pageTitle.set(m.edit() + ' ' + crumbs[crumbs.length - 2].label); } diff --git a/frontend/src/lib/components/Calendar/Calendar.svelte b/frontend/src/lib/components/Calendar/Calendar.svelte index a7af659ac..3750e2e61 100644 --- a/frontend/src/lib/components/Calendar/Calendar.svelte +++ b/frontend/src/lib/components/Calendar/Calendar.svelte @@ -4,6 +4,8 @@ import Notifications from './Notifications.svelte'; import { showNotification } from '$lib/utils/stores'; + import * as m from '$paraglide/messages'; + export let info: object[]; let showNotificationBool = JSON.parse($showNotification); @@ -14,20 +16,28 @@ let daysInMonth = new Date(year, month, 0).getDate(); let firstDay = new Date(year, month - 1, 1).getDay(); - const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; + const daysOfWeek = [ + m.monday(), + m.tuesday(), + m.wednesday(), + m.thursday(), + m.friday(), + m.saturday(), + m.sunday() + ]; const monthNames = [ - 'january', - 'february', - 'march', - 'april', - 'may', - 'june', - 'july', - 'august', - 'september', - 'october', - 'november', - 'december' + m.january(), + m.february(), + m.march(), + m.april(), + m.may(), + m.june(), + m.july(), + m.august(), + m.september(), + m.october(), + m.november(), + m.december() ]; function todayDay() { @@ -112,19 +122,19 @@ class="font-light text-lg border rounded-lg border-white p-2 hover:bg-white text-white hover:text-primary-500 transition duration-300" > - Today + {m.today()} - + --> - {#if showNotificationBool} + diff --git a/frontend/src/lib/components/Chart/DonutChart.svelte b/frontend/src/lib/components/Chart/DonutChart.svelte index 684edde32..38f56f66e 100644 --- a/frontend/src/lib/components/Chart/DonutChart.svelte +++ b/frontend/src/lib/components/Chart/DonutChart.svelte @@ -9,7 +9,7 @@ export let colors: string[] = []; for (const item in values) { - values[item]['name'] = localItems(languageTag())[values[item]['localName']] + values[item]['name'] = localItems(languageTag())[values[item]['localName']]; } let chart_element: HTMLElement | null = null; diff --git a/frontend/src/lib/components/Forms/ModelForm.svelte b/frontend/src/lib/components/Forms/ModelForm.svelte index ce1a165b7..a371870a8 100644 --- a/frontend/src/lib/components/Forms/ModelForm.svelte +++ b/frontend/src/lib/components/Forms/ModelForm.svelte @@ -126,7 +126,13 @@ field="reviewers" label={m.reviewers()} /> - + {:else if URLModel === 'security-measures' || URLModel === 'policies'} {#if schema.shape.category} - {/if} +