Skip to content

Commit

Permalink
Merge pull request #63 from intuitem/CA-155-French-translation
Browse files Browse the repository at this point in the history
Ca 155 french translation
  • Loading branch information
eric-intuitem authored Feb 22, 2024
2 parents cd3488a + d8a4664 commit 3ac7b39
Show file tree
Hide file tree
Showing 27 changed files with 1,148 additions and 459 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
**/node_modules/
.vscode
*.sqlite3
django_secret_key
temp/
db/
15 changes: 11 additions & 4 deletions backend/core/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from datetime import date, timedelta
from re import sub

from django.db.models import Count
from django.shortcuts import get_object_or_404
Expand All @@ -23,6 +24,11 @@
"transfer": "#91cc75",
}

def camel_case(s):
s = sub(r"(_|-)+", " ", s).title().replace(" ", "")

return ''.join([s[0].lower(), s[1:]])


def security_measure_priority(user: User):
def get_quadrant(security_measure):
Expand Down Expand Up @@ -410,6 +416,7 @@ def risk_per_status(user: User):
def security_measure_per_status(user: User):
values = list()
labels = list()
local_lables = list()
color_map = {
"--": "#93c5fd",
"planned": "#fdba74",
Expand All @@ -432,7 +439,8 @@ def security_measure_per_status(user: User):
v = {"value": count, "itemStyle": {"color": color_map[st[0]]}}
values.append(v)
labels.append(st[1])
return {"labels": labels, "values": values}
local_lables = [camel_case(str(l)) for l in labels]
return {"localLables": local_lables,"labels": labels, "values": values}


def security_measure_per_cur_risk(user: User):
Expand Down Expand Up @@ -526,7 +534,6 @@ def aggregate_risks_per_field(
values[m["risk"][i][field]]["count"] += count
return values


def risks_count_per_level(user: User, risk_assessments: list | None = None):
current_level = list()
residual_level = list()
Expand All @@ -535,14 +542,14 @@ def risks_count_per_level(user: User, risk_assessments: list | None = None):
user, "name", risk_assessments=risk_assessments
).items():
current_level.append(
{"name": r[0], "value": r[1]["count"], "color": r[1]["color"]}
{"name": r[0], "value": r[1]["count"], "color": r[1]["color"], "localName": camel_case(r[0])}
)

for r in aggregate_risks_per_field(
user, "name", residual=True, risk_assessments=risk_assessments
).items():
residual_level.append(
{"name": r[0], "value": r[1]["count"], "color": r[1]["color"]}
{"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
176 changes: 174 additions & 2 deletions frontend/messages/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,177 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"Home": "Home",
"Overview": "Overview"
"addButton": "Add {model}",
"associatedObject": "Associated {model}",
"french": "French",
"english": "English",
"home": "Home",
"edit": "Edit",
"overview": "Overview",
"context": "Context",
"governance": "Governance",
"risk": "Risk",
"compliance": "Compliance",
"organization": "Organisation",
"extra": "Extra",
"analytics": "Analytics",
"calendar": "Calendar",
"threats": "Threats",
"securityFunctions": "Security functions",
"securityMeasures": "Security measures",
"assets": "Assets",
"asset": "Asset",
"policies": "Policies",
"riskMatrices": "Risk matrices",
"riskAssessments": "Risk assessments",
"riskScenarios": "Risk scenarios",
"riskScenario": "Risk scenario",
"riskAcceptances": "Risk acceptances",
"riskAcceptance": "Risk acceptance",
"complianceAssessments": "Compliance assessments",
"complianceAssessment": "Compliance assessment",
"evidences": "Evidences",
"evidence": "Evidence",
"frameworks": "Frameworks",
"domains": "Domains",
"projects": "Projects",
"users": "Users",
"user": "User",
"userGroups": "User groups",
"roleAssignments": "Role assignments",
"xRays": "X-rays",
"scoringAssistant": "Scoring assistant",
"libraries": "Libraries",
"backupRestore": "Backup & restore",
"myProfile": "My profile",
"aboutCiso": "About CISO Assistant",
"Logout": "Log out",
"name": "Name",
"description": "Description",
"parentDomain": "Parent domain",
"ref": "Ref",
"refId": "Ref ID",
"businessValue": "Business value",
"email": "Email",
"firstName": "First name",
"lastName": "Last name",
"category": "Category",
"eta": "ETA",
"securityFunction": "Security function",
"securityMeasure": "Security measure",
"provider": "Provider",
"domain": "Domain",
"urn": "URN",
"id": "ID",
"treatmentStatus": "Treatment status",
"currentLevel": "Current level",
"residualLevel": "Residual level",
"riskMatrix": "Risk matrix",
"project": "Project",
"folder": "Folder",
"riskAssessment": "Risk assessment",
"threat": "Threat",
"framework": "Framework",
"file": "File",
"language": "Language",
"builtin": "Builtin",
"next": "Next",
"previous": "Previous",
"show": "Show",
"entries": "entries",
"searchPlaceholder": "Search...",
"noEntriesFound": "No entries found",
"rowCount": "Showing {start} to {end} of {total}",
"status": "Status",
"effort": "Effort",
"impact": "Impact",
"expiryDate": "Expiry date",
"link": "Link",
"createdAt": "Created at",
"updatedAt": "Updated at",
"acceptedAt": "Accepted at",
"rejectedAt": "Rejected at",
"revokedAt": "Revoked at",
"locale": "Locale",
"defaultLocale": "Default locale",
"annotation": "Annotation",
"library": "Library",
"typicalEvidence": "Typical evidence",
"parentAsset": "Parent asset",
"parentAssets": "Parent assets",
"approver": "Approver",
"state": "State",
"justification": "Justification",
"parentFolder": "Parent folder",
"contentType": "Content type",
"lcStatus": "Status",
"internalReference": "Internal reference",
"isActive": "Is active",
"dateJoined": "Date joined",
"version": "Version",
"treatment": "Treatment",
"currentProba": "Current probability",
"currentImpact": "Current impact",
"residualProba": "Residual probability",
"residualImpact": "Residual impact",
"existingMeasures": "Existing measures",
"strengthOfKnowledge": "Strength of knowledge",
"dueDate": "Due date",
"attachment": "Attachment",
"observation": "Observation",
"importMatrices": "Import matrices",
"importFrameworks": "Import frameworks",
"summary": "Summary",
"composer": "Composer",
"statistics": "Statistics",
"myProjects": "My projects",
"scenarios": "Scenarios",
"assignedObjects": "Assigned to {number} {object}",
"currentRiskLevelPerScenario": "Current risk level per risk scenario",
"residualRiskLevelPerScenario": "Residual risk level per risk scenario",
"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",
"watchlist": "Watch list",
"watchlistDescription": "Items that have expired or with close ETA",
"measuresToReview": "Measures to review",
"exceptionsToReview": "Exceptions to review",
"expired": "Expired",
"upcoming": "Upcoming",
"today": "Today",
"actionRequested": "Action requested",
"noObjectYet": "No {object} yet",
"authors": "Authors",
"reviewers": "Reviewers",
"process": "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)",
"composerDescription2": "you are interested in the risk assessment of a specific system, for which you need the risk assessment of the underlying components",
"overallCompliance": "Overall compliance",
"exportButton": "Export",
"treatmentProgressOverview": "Treatment progress overview",
"pendingMeasures": "Your pending measures",
"orderdByRankingScore": "Ordered by ranking score",
"rankingScore": "Ranking score",
"noPendingObject": "No pending {object}",
"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",
"riskOpen": "Risk: open",
"riskMitigate": "Risk: mitigate",
"riskAccept": "Risk: accept",
"riskAvoid": "Risk: avoid",
"measureOpen": "Measure: open",
"measureProgress": "Measure: in progress",
"measureHold": "Measure: on hold",
"measureDone": "Measure: done"

}
Loading

0 comments on commit 3ac7b39

Please sign in to comment.