Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ca 237 translate key words and some auto complete select #92

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c66439e
feat: add EN translation for backup&restore
Mohamed-Hacene Feb 28, 2024
f68ae2b
feat: update backup&restore translations
Mohamed-Hacene Feb 28, 2024
fb8f566
inlang: update translations
Mohamed-Hacene Feb 28, 2024
e27f934
feat: translate getOptions in ModelForm
Mohamed-Hacene Feb 28, 2024
dc23e69
inlang: update translations
Mohamed-Hacene Feb 28, 2024
1027b83
Merge branch 'main' into CA-237-Translate-key-words-and-some-AutoComp…
Mohamed-Hacene Feb 28, 2024
6616a6c
Merge branch 'main' into CA-237-Translate-key-words-and-some-AutoComp…
Mohamed-Hacene Feb 28, 2024
7be74b6
feat: translate values in detailed view
Mohamed-Hacene Feb 28, 2024
558e5fb
fix: remove useless toCamelCase
Mohamed-Hacene Feb 28, 2024
00747da
feat: translte help texts in EN
Mohamed-Hacene Feb 28, 2024
6db8fc4
inlang: update translations
Mohamed-Hacene Feb 28, 2024
56a2830
fix: missing translation in analytic treatment tab
Mohamed-Hacene Feb 28, 2024
606a437
feat: add EN translation for auth pages
Mohamed-Hacene Feb 28, 2024
217fe7c
inlang: update translations
Mohamed-Hacene Feb 28, 2024
c4369ab
inlang: update translations
Mohamed-Hacene Feb 28, 2024
2fdb6e9
feat: translate risk acceptance messages
Mohamed-Hacene Feb 28, 2024
cdf1d57
feat: update accept into validate
Mohamed-Hacene Feb 28, 2024
23deaac
fix: missing translations
Mohamed-Hacene Feb 28, 2024
dd02c26
inlang: update translations
Mohamed-Hacene Feb 28, 2024
e1bf6ea
fix: typo
Mohamed-Hacene Feb 28, 2024
feaaa0b
feat: translate evidence and modals
Mohamed-Hacene Feb 28, 2024
690e822
feat: replace security measure/function by applied/reference control
Mohamed-Hacene Feb 28, 2024
7ae569c
feat: remove matrices labels translation
Mohamed-Hacene Feb 28, 2024
a30b8c5
feat: translate risk scenarios treatment status
Mohamed-Hacene Feb 28, 2024
1a7f713
inlang: update translations
Mohamed-Hacene Feb 28, 2024
e141796
inlang: update translations
Mohamed-Hacene Feb 28, 2024
a9833c5
chore: remove useless console log
Mohamed-Hacene Feb 28, 2024
9895ae6
feat: translate tags in model table
Mohamed-Hacene Feb 28, 2024
06935d9
Merge branch 'main' into CA-237-Translate-key-words-and-some-AutoComp…
Mohamed-Hacene Feb 29, 2024
bc33f32
Merge branch 'main' into CA-237-Translate-key-words-and-some-AutoComp…
Mohamed-Hacene Feb 29, 2024
854605e
ci: update api tests
Mohamed-Hacene Feb 29, 2024
1ecb904
ci: fix startup tests
Mohamed-Hacene Feb 29, 2024
7024f3e
ci: missing update in api tests
Mohamed-Hacene Feb 29, 2024
1ae7d67
fix: user detailed page
Mohamed-Hacene Feb 29, 2024
6f8a08d
fix: tests
Mohamed-Hacene Mar 1, 2024
4fdda10
inlang: update translations
Mohamed-Hacene Mar 1, 2024
b10c9a8
Merge branch 'main' into CA-237-Translate-key-words-and-some-AutoComp…
Mohamed-Hacene Mar 1, 2024
7145b9c
Merge branch 'CA-237-Translate-key-words-and-some-AutoCompleteSelect'…
Mohamed-Hacene Mar 1, 2024
e18060c
fix: security function instead of reference control
Mohamed-Hacene Mar 1, 2024
ae33eb6
fix: login/logout test
Mohamed-Hacene Mar 1, 2024
1ab2122
fix: undo lexicon modifications
Mohamed-Hacene Mar 4, 2024
8e1da2f
Merge branch 'main' into CA-237-Translate-key-words-and-some-AutoComp…
Mohamed-Hacene Mar 4, 2024
f245419
fix: migrations
Mohamed-Hacene Mar 4, 2024
7fcb7b6
fix: typo in tests
Mohamed-Hacene Mar 4, 2024
3d6857f
fix: typo in test-utils
Mohamed-Hacene Mar 4, 2024
dbc20b2
feat: fix typo in tests
Mohamed-Hacene Mar 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions backend/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ def risks_count_per_level(user: User, risk_assessments: list | None = None):
"name": r[0],
"value": r[1]["count"],
"color": r[1]["color"],
"localName": camel_case(r[0]),
}
)

Expand All @@ -555,7 +554,6 @@ def risks_count_per_level(user: User, risk_assessments: list | None = None):
"name": r[0],
"value": r[1]["count"],
"color": r[1]["color"],
"localName": camel_case(r[0]),
}
)
return {"current": current_level, "residual": residual_level}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0.2 on 2024-03-04 10:28

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0004_complianceassessment_is_published_and_more'),
]

operations = [
migrations.AlterField(
model_name='project',
name='lc_status',
field=models.CharField(choices=[('undefined', 'Undefined'), ('in_design', 'Design'), ('in_dev', 'Development'), ('in_prod', 'Production'), ('eol', 'EndOfLife'), ('dropped', 'Dropped')], default='in_design', max_length=20, verbose_name='Status'),
),
migrations.AlterField(
model_name='securitymeasure',
name='effort',
field=models.CharField(blank=True, choices=[('S', 'Small'), ('M', 'Medium'), ('L', 'Large'), ('XL', 'Extra Large')], help_text='Relative effort of the measure (using T-Shirt sizing)', max_length=2, null=True, verbose_name='Effort'),
),
]
6 changes: 3 additions & 3 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ class Meta:

class Project(NameDescriptionMixin, FolderMixin):
PRJ_LC_STATUS = [
("undefined", _("--")),
("undefined", _("Undefined")),
("in_design", _("Design")),
("in_dev", _("Development")),
("in_prod", _("Production")),
("eol", _("End Of Life")),
("eol", _("EndOfLife")),
("dropped", _("Dropped")),
]
internal_reference = models.CharField(
Expand Down Expand Up @@ -527,7 +527,7 @@ class Status(models.TextChoices):
("S", _("Small")),
("M", _("Medium")),
("L", _("Large")),
("XL", _("Extra-Large")),
("XL", _("Extra Large")),
]

MAP_EFFORT = {None: -1, "S": 1, "M": 2, "L": 4, "XL": 8}
Expand Down
73 changes: 67 additions & 6 deletions frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@
"securityMeasuresStatus": "Security measures status",
"currentRisk": "Current risk",
"residualRisk": "Residual risk",
"veryLow": "Very low",
"low": "Low",
"medium": "Medium",
"high": "High",
"veryHigh": "Very high",
"planned": "Planned",
"active": "Active",
"inactive": "Inactive",
Expand All @@ -177,7 +172,7 @@
"noSecurityMeasureYet": "No security measure yet",
"authors": "Authors",
"reviewers": "Reviewers",
"process": "Process",
"processButton": "Process",
"selectTargets": "Select your targets",
"composerDescription": "This will help you aggregate multiple components (projects) to get the compiled view on your risk. This is particularly useful for two use cases",
"composerDescription1": "business intelligence approach to focus on a specific subset across different project domains (eg. across divisions)",
Expand Down Expand Up @@ -344,6 +339,24 @@
"copyright": "Copyright",
"uploadYourLibrary": "Upload your own library",
"libraryFileInYaml": "Library file in YAML format",
"importBackup": "Import backup",
"exportBackup": "Export backup",
"confirmImportBackup": "Are you sure you want to import this backup? This will overwrite all existing data.",
"exportDatabase": "Export database",
"upload": "Upload",
"undefined": "--",
"production": "Production",
"design": "Design",
"development": "Development",
"endOfLife": "End of life",
"dropped": "Dropped",
"technical": "Technical",
"physical": "Physical",
"process": "Process",
"small": "Small",
"medium": "Medium",
"large": "Large",
"extraLarge": "Extra-large",
"rid": "RID",
"scope": "Scope",
"auditor": "Auditor",
Expand Down Expand Up @@ -371,6 +384,54 @@
"residual": "Residual",
"jumpToRiskAssessment": "Jump to risk assessment",
"additionalMeasures": "Additional measures",
"riskAssessmentMatrixHelpText": "WARNING: You will not be able to change the risk matrix after the risk assessment is created",
"etaHelpText": "Estimated time of arrival",
"dueDateHelpText": "Date by which the assessment must be completed",
"expiryDateHelpText": "Date by which the object is no longer valid",
"linkHelpText": "External URL for action follow-up (eg. Jira ticket)",
"effortHelpText": "The effort required to implement the security measure",
"riskAcceptanceJusitficationHelpText": "Justification for the risk acceptance. Only the approver can edit this field.",
"approverHelpText": "Risk owner and approver identity",
"riskAcceptanceRiskScenariosHelpText": "The risk scenarios that are accepted",
"attachmentHelpText": "File for evidence (eg. screenshot, log file, etc.)",
"attachmentWarningText": "WARNING: Uploading a new file will overwrite the existing one",
"isActiveHelpText": "Designates whether this user should be treated as active",
"helloThere": "Hello there 👋",
"thisIsCisoAssistant": "This is CISO Assistant.",
"yourStreamlined": "Your streamlined",
"oneStopShop": "one-stop shop",
"forComplianceRiskManagement": "for compliance and risk management.",
"youCanSetPAsswordHere": "You can set your password here",
"setPassword": "Set password",
"logIntoYourAccount": "Log into your account",
"youNeedToLogIn": "You need to login to access all the features",
"forgtPassword": "Forgot password",
"login": "Login",
"password": "Password",
"enterYourEmail": "Enter your email address below, and we'll send instructions for setting a new one",
"send": "Send",
"goBackToLogin": "Go back to login",
"riskAcceptanceReviewMessage": "This risk acceptance is awaiting processing. Remember to review it before validating or rejecting it, you will not be able to go back.",
"validate": "Validate",
"reject": "Reject",
"revoke": "Revoke",
"riskAcceptanceValidatedMessage": "This risk acceptance is currently validated. It can be revoked at any time, but this will be irrevocable. You will need to duplicate it with a different verison if necessary.",
"confirmModalTitle": "Confirm",
"confirmModalMessage": "Are you sure? This action will permanently affect the following object",
"submit": "Submit",
"requirementAssessment": "Requirement assessment",
"requirementAssessments": "Requirement assessments",
"deleteModalTitle": "Delete",
"deleteModalMessage": "Are you sure you want to delete the following object",
"download": "Download",
"loading": "Loading",
"open": "Opened",
"mitigate": "Mitigated",
"accept": "Accepted",
"avoid": "Avoided",
"transfer": "Shared",
"primary": "Primary",
"support": "Support",
"toDo": "To do",
"inProgress": "In progress",
"nonCompliant": "Non compliant",
Expand Down
99 changes: 80 additions & 19 deletions frontend/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"french": "Français",
"english": "Anglais",
"addThreat": "Ajouter une menace",
"addSecurityFunction": "Ajouter une fonction de sécurité",
"addSecurityMeasure": "Ajouter une mesure de sécurité",
"addSecurityFunction": "Ajouter une mesure de référence",
"addSecurityMeasure": "Ajouter une mesure appliquée",
"addAsset": "Ajouter un bien sensible",
"addRiskAssessment": "Ajouter une évaluation de risque",
"addRiskScenario": "Ajouter un scénario de risque",
Expand All @@ -16,8 +16,8 @@
"addUser": "Ajouter un utilisateur",
"addPolicy": "Ajouter une politique",
"associatedThreats": "Menaces associées",
"associatedSecurityFunctions": "Fonctions de sécurité associées",
"associatedSecurityMeasures": "Mesures de sécurité associées",
"associatedSecurityFunctions": "Mesures de référence associées",
"associatedSecurityMeasures": "Mesures appliquées associées",
"associatedAssets": "Biens sensibles associés",
"associatedRiskAssessments": "Évaluations de risque associées",
"associatedRiskScenarios": "Scénarios de risque associés",
Expand All @@ -40,8 +40,8 @@
"analytics": "Analytiques",
"calendar": "Calendrier",
"threats": "Menaces",
"securityFunctions": "Fonctions de sécurité",
"securityMeasures": "Mesures de sécurité",
"securityFunctions": "Mesures de référence",
"securityMeasures": "Mesures appliquées",
"assets": "Biens sensibles",
"asset": "Bien sensible",
"policy": "Politique",
Expand Down Expand Up @@ -81,8 +81,8 @@
"lastName": "Nom de famille",
"category": "Catégorie",
"eta": "ETA",
"securityFunction": "Fonction de sécurité",
"securityMeasure": "Mesure de sécurité",
"securityFunction": "Mesure de référence",
"securityMeasure": "Mesure appliquée",
"provider": "Fournisseur",
"domain": "Domaine",
"urn": "URN",
Expand Down Expand Up @@ -154,14 +154,9 @@
"assignedProjects": "Assigné à {number} projet{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é",
"securityMeasuresStatus": "Statut des mesures appliquées",
"currentRisk": "Risque courant",
"residualRisk": "Risque résiduel",
"veryLow": "Très faible",
"low": "Faible",
"medium": "Moyen",
"high": "Élevé",
"veryHigh": "Très élevé",
"planned": "Planifié",
"active": "Active",
"inactive": "Inactive",
Expand All @@ -174,10 +169,10 @@
"today": "Aujourd'hui",
"actionRequested": "Action requise",
"noRiskAcceptanceYet": "Aucune acceptation de risque pour le moment",
"noSecurityMeasureYet": "Aucune mesure de sécurité pour le moment",
"noSecurityMeasureYet": "Aucune mesure appliquée pour le moment",
"authors": "Auteurs",
"reviewers": "Relecteurs",
"process": "Traiter",
"processButton": "Traiter",
"selectTargets": "Selectionnez vos cibles",
"composerDescription": "Cela vous aidera à agréger plusieurs composants (projets) pour obtenir une vue d'ensemble de vos risques. Ceci est particulièrement utile pour deux cas d'utilisation",
"composerDescription1": "une approche de veille stratégique pour se concentrer sur un sous-ensemble spécifique à travers différents domaines de projet (par exemple, à travers les divisions)",
Expand All @@ -188,7 +183,7 @@
"pendingMeasures": "Vos mesures en attente",
"orderdByRankingScore": "Classées par score",
"rankingScore": "Score de classement",
"noPendingSecurityMeasure": "Aucune mesure de sécurité en attente",
"noPendingSecurityMeasure": "Aucune mesure appliquée 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",
Expand Down Expand Up @@ -344,12 +339,30 @@
"copyright": "Droits d'auteur",
"uploadYourLibrary": "Téléchargez votre propre bibliothèque",
"libraryFileInYaml": "Fichier de librairie en format YAML",
"importBackup": "Importer une sauvegarde",
"exportBackup": "Exporter une sauvegarde",
"confirmImportBackup": "Êtes-vous sûr de vouloir importer cette sauvegarde ? Cela écrasera toutes les données existantes.",
"exportDatabase": "Exporter la base de données",
"upload": "Télécharger",
"undefined": "--",
"production": "Production",
"design": "Conception",
"development": "Développement",
"endOfLife": "Fin de vie",
"dropped": "Abandonné",
"technical": "Technique",
"physical": "Physique",
"process": "Processus",
"small": "Petit",
"medium": "Moyen",
"large": "Grand",
"extraLarge": "Extra large",
"rid": "RID",
"scope": "Périmètre",
"auditor": "Auditeur",
"lastUpdate": "Dernière mise à jour",
"riskScenarioAssetHelpText": "Biens sensibles impactés par ce scénario de risque",
"riskScenarioMeasureHelpText": "Les mesures de sécurité existantes pour gérer ce risque",
"riskScenarioMeasureHelpText": "Les mesures appliquées existantes pour gérer ce risque",
"currentAssessment": "Évaluation actuelle",
"targetAssessment": "Évaluation cible",
"currentRiskLevel": "Niveau de risque courrant",
Expand All @@ -371,10 +384,58 @@
"residual": "Résiduel",
"jumpToRiskAssessment": "Passer à l'évaluation des risques",
"additionalMeasures": "Mesures supplémentaires",
"riskAssessmentMatrixHelpText": "ATTENTION: Vous ne pourrez pas changer la matrice de risque une fois l'évaluation de risque créée.",
"etaHelpText": "Date d'arrivée estimée",
"dueDateHelpText": "Date à laquelle l'évaluation doit être complétée",
"expiryDateHelpText": "Date à laquelle l'objet n'est plus valide",
"linkHelpText": "URL externe pour le suivi des actions (ex. ticket Jira)",
"effortHelpText": "L'effort requis pour mettre en œuvre la mesure appliquée",
"riskAcceptanceJusitficationHelpText": "Justification de l'acceptation du risque. Seul l'approbateur peut modifier ce champ.",
"approverHelpText": "Identité du propriétaire du risque et de l’approbateur",
"riskAcceptanceRiskScenariosHelpText": "Les scénarios de risques acceptés",
"attachmentHelpText": "Fichier de preuve (eg. capture d'écran, fichier journal, etc.)",
"attachmentWarningText": "ATTENTION: le téléchargement d'un nouveau fichier écrasera celui existant",
"isActiveHelpText": "Désigne si cet utilisateur doit être traité comme actif",
"helloThere": "Bonjour 👋",
"thisIsCisoAssistant": "Voici CISO Assistant.",
"yourStreamlined": "Votre solution",
"oneStopShop": "tout en un",
"forComplianceRiskManagement": "pour la conformité et la gestion des risques.",
"youCanSetPAsswordHere": "Vous pouvez définir votre mot de passe ici",
"setPassword": "Définir le mot de passe",
"logIntoYourAccount": "Connectez-vous à votre compte",
"youNeedToLogIn": "Vous devez vous connecter pour accéder à toutes les fonctionnalités",
"forgtPassword": "Mot de passe oublié",
"login": "Se connecter",
"password": "Mot de passe",
"enterYourEmail": "Entrez votre adresse e-mail ci-dessous et nous vous enverrons des instructions pour en définir un nouveau",
"send": "Envoyer",
"goBackToLogin": "Revenir à la page de connexion",
"riskAcceptanceReviewMessage": "Cette acceptation de risque est en attente de traitement. Pensez à la consulter avant de la valider ou de la rejeter, vous ne pourrez pas revenir en arrière.",
"validate": "Valider",
"reject": "Rejeter",
"revoke": "Révoquer",
"riskAcceptanceValidatedMessage": "Cette acceptation de risque est actuellement validée. Elle peut être révoquée à tout moment, mais cela sera irrévocable. Vous devrez la dupliquer avec une version différente si nécessaire.",
"confirmModalTitle": "Confirmer",
"confirmModalMessage": "Êtes-vous sûr? Cette action affectera définitivement l'objet suivant",
"submit": "Soumettre",
"requirementAssessment": "Évaluation d'exigence",
"requirementAssessments": "Évaluations des exigences",
"deleteModalTitle": "Supprimer",
"deleteModalMessage": "Etes-vous sûr de vouloir supprimer l'objet suivant",
"download": "Télécharger",
"loading": "Chargement",
"open": "Ouvert",
"mitigate": "Atténué",
"accept": "Accepté",
"avoid": "Refusé",
"transfer": "Partagé",
"toDo": "À faire",
"inProgress": "En cours",
"nonCompliant": "Non conforme",
"partiallyCompliant": "Partiellement conforme",
"compliant": "Conforme",
"notApplicable": "Non applicable"
"notApplicable": "Non applicable",
"primary": "Primaire",
"support": "Support"
}
8 changes: 1 addition & 7 deletions frontend/src/lib/components/Chart/DonutChart.svelte
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<script lang="ts">
import { onMount } from 'svelte';
import { localItems } from '$lib/utils/locales';
import { languageTag } from '$paraglide/runtime';

export let name: string;
// export let name: string;
export let s_label: string;

export let values: any[]; // Set the types for these variables later on
export let colors: string[] = [];

for (const item in values) {
values[item]['name'] = localItems(languageTag())[values[item]['localName']];
}

let chart_element: HTMLElement | null = null;
onMount(async () => {
const echarts = await import('echarts');
Expand Down
Loading
Loading