Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions openaev-front/scripts/i18n-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from 'path';
import { fileURLToPath } from 'url';

import { DEFAULT_LANG, supportedLanguages } from './constants/Lang.js';
import { collectGlossaryViolations, reportGlossaryViolations } from './i18n-glossary.js';

const __filename = fileURLToPath(import.meta.url);

Expand Down Expand Up @@ -86,10 +87,16 @@ const run = () => {
if (Object.keys(missingKeys).length) {
// eslint-disable-next-line no-console
console.error('Missing keys :', missingKeys);
}
const glossaryViolations = collectGlossaryViolations();
if (glossaryViolations.length) {
reportGlossaryViolations(glossaryViolations);
}

if (Object.keys(missingKeys).length || glossaryViolations.length) {
process.exit(1);
} else {
process.exit(0);
}
process.exit(0);
};

run();
50 changes: 50 additions & 0 deletions openaev-front/scripts/i18n-glossary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* eslint-disable no-console */
/* Terms that must never be translated (acronyms, standards, product names).
Consumed by i18n-checker.js. */
import fs from 'node:fs';

import { supportedLanguages } from './constants/Lang.js';

const { globalTerms } = JSON.parse(fs.readFileSync('scripts/i18n-glossary.json', 'utf8'));

// Escaping: a term such as "C++" would make the RegExp throw without it.
const escapeRe = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
// Word boundaries so "URL" is not matched inside "CURL"; the `s?` allows the key's English plural.
const wordRe = term => new RegExp(`\\b${escapeRe(term)}s?\\b`, 'i');

export const collectGlossaryViolations = () => {
const violations = [];

for (const lang of supportedLanguages) {
const file = `src/utils/lang/${lang}.json`;
if (!fs.existsSync(file)) continue;

for (const [key, value] of Object.entries(JSON.parse(fs.readFileSync(file, 'utf8')))) {
if (value === key) continue; // not translated at all: different defect, different check
// Technical keys (openaev_caldera…)
if (/^[a-z0-9]+([_-][a-z0-9]+)+$/.test(key)) continue;

for (const term of globalTerms) {
if (wordRe(term).test(key) && !value.toLowerCase().includes(term.toLowerCase())) {
Comment on lines +27 to +28
violations.push({
lang,
term,
key,
value,
});
}
}
}
}

return violations;
};

export const reportGlossaryViolations = (violations) => {
for (const v of violations) {
console.error(`${v.lang}.json — "${v.term}" missing from the translation`);
console.error(` key : ${v.key.slice(0, 90)}`);
console.error(` value : ${v.value.slice(0, 90)}`);
}
console.error(`Total: ${violations.length} glossary violation(s).`);
};
23 changes: 23 additions & 0 deletions openaev-front/scripts/i18n-glossary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"globalTerms": [
"ATT&CK",
"Caldera",
"Chokepoint",
"CVE",
"CWE",
"EDR",
"IMAP",
"ISPM",
"MITRE",
"NDR",
"OpenAEV",
"SIEM",
"SMTP",
"SOAR",
"SSO",
"URL",
"XDR",
"XTM Hub",
"XTM One"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const getWidgetTitle = (widgetTitle: Widget['widget_config']['title'], ty
} else if (type === 'attack-path') {
return !widgetTitle ? t('Attack Path') : widgetTitle;
} else if (type === 'security-coverage') {
return !widgetTitle ? t('Mitre Coverage') : widgetTitle;
return !widgetTitle ? t('Security Coverage') : widgetTitle;
} else if (type === 'exposure-score') {
return !widgetTitle ? t('Exposure score') : widgetTitle;
} else if (type === 'posture-radar') {
Expand Down
59 changes: 30 additions & 29 deletions openaev-front/src/utils/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"Add asset groups in this inject": "Asset-Gruppen in dieser Injektion hinzufügen",
"Add asset to your allowlist": "Asset zur Zulässigkeitsliste hinzufügen",
"Add asset to your denylist": "Asset zu Ihrer Denyliste hinzufügen",
"Add assets": "Vermögenswerte hinzufügen",
"Add assets": "Assets hinzufügen",
"Add assets in this asset group": "Hinzufügen von Assets zu dieser Asset-Gruppe",
"Add assets in this inject": "Assets in dieser Injektion hinzufügen",
"Add assets, asset groups, teams and persons to your allowlist": "Add assets, asset groups, teams and persons to your allowlist",
Expand Down Expand Up @@ -359,13 +359,13 @@
"AsreproastableAccount": "AS-REP röstbares Konto",
"Assertive": "Assuré",
"ASSESSMENT": "Beurteilungen: Szenarien, Simulationen und Atomtests",
"asset": "vermögenswert",
"asset": "Asset",
"Asset": "Asset",
"asset group": "anlagengruppe",
"asset group": "Asset-Gruppe",
"Asset group": "Asset-Gruppe",
"Asset group posture score": "Posture-Score der Asset-Gruppe",
"Asset groups": "Anlagengruppen",
"Asset Groups": "Anlagengruppen",
"Asset groups": "Asset-Gruppen",
"Asset Groups": "Asset-Gruppen",
"Asset id": "Asset-ID",
"Asset Id": "Asset-Id",
"Asset Information": "Asset Information",
Expand Down Expand Up @@ -641,11 +641,11 @@
"checkbox": "Kontrollkästchen",
"Children": "Kinder",
"Chinese": "Chinesisch",
"chokepoint": "Engpass",
"chokepoint": "Chokepoint",
"Chokepoint": "Chokepoint",
"Chokepoint (most exposed endpoint)": "Engpass (am stärksten exponierter Endpunkt)",
"Chokepoint score": "Engpass-Score",
"Chokepoints rank endpoints by findings weighted by criticality (score = findings × criticality weight), so the top one is the most findings on the most critical endpoint. Click to see how it is computed.": "Engpässe ordnen Endpunkte nach ihren Findings, gewichtet nach Kritikalität (Score = Findings × Kritikalitätsgewicht); ganz oben steht der kritischste Endpunkt mit den meisten Findings. Klicken Sie, um die Berechnung zu sehen.",
"Chokepoint (most exposed endpoint)": "Chokepoint (am stärksten exponierter Endpunkt)",
"Chokepoint score": "Chokepoint-Score",
"Chokepoints rank endpoints by findings weighted by criticality (score = findings × criticality weight), so the top one is the most findings on the most critical endpoint. Click to see how it is computed.": "Chokepoints ordnen Endpunkte nach ihren Findings, gewichtet nach Kritikalität (Score = Findings × Kritikalitätsgewicht); ganz oben steht der kritischste Endpunkt mit den meisten Findings. Klicken Sie, um die Berechnung zu sehen.",
"Choose Execution mode": "Wählen Sie den Ausführungsmodus",
"Choose format": "Choose format",
"Choose the lure email": "Choose the lure email",
Expand Down Expand Up @@ -1014,7 +1014,7 @@
"Decrease": "Verringern",
"Dedicated technical support": "Spezieller technischer Support",
"Default": "Standard",
"Default asset rules": "Standard-Vermögenswertregeln",
"Default asset rules": "Standard-Asset-Regeln",
"Default dashboards": "Standard-Dashboards",
"Default format": "Default format",
"Default kill chain": "Standard-Kill-Chain",
Expand Down Expand Up @@ -1075,7 +1075,7 @@
"DELETED_DURING_EXECUTION": "Während der Ausführung gelöscht",
"Deleting a running simulation will stop its execution.": "Das Löschen einer laufenden Simulation stoppt deren Ausführung.",
"Deleting actions": "Aktionen werden gelöscht",
"Deleting asset groups": "Anlagengruppen werden gelöscht",
"Deleting asset groups": "Asset-Gruppen werden gelöscht",
"Deleting assets": "Assets werden gelöscht",
"Deleting atomic testings": "Atomare Tests werden gelöscht",
"Deleting injects": "Injektoren werden gelöscht",
Expand Down Expand Up @@ -1176,7 +1176,7 @@
"Do you want to change the status of this simulation?": "Möchten Sie den Status dieser Simulation ändern?",
"Do you want to continue and set this new dashboard as {defaultTypeName} default?": "Möchten Sie fortfahren und dieses neue Dashboard als {defaultTypeName} Standard festlegen?",
"Do you want to delete the AI target?": "Mochten Sie das KI-Ziel loschen?",
"Do you want to delete the asset group?": "Möchten Sie die Anlagengruppe löschen?",
"Do you want to delete the asset group?": "Möchten Sie die Asset-Gruppe löschen?",
"Do you want to delete the asset:": "Möchten Sie das Asset löschen:",
"Do you want to delete the connector:": "Möchten Sie den Connector löschen:",
"Do you want to delete the credential:": "Möchten Sie die Anmeldeinformationen löschen:",
Expand All @@ -1189,7 +1189,7 @@
"Do you want to delete the selected actions?": "Möchten Sie die ausgewählten Aktionen löschen?",
"Do you want to delete the selected arsenal items?": "Möchten Sie die ausgewählten Arsenal-Elemente löschen?",
"Do you want to delete the variable?": "Möchten Sie die Variable löschen?",
"Do you want to delete these {count} asset groups?": "Möchten Sie diese {count} Anlagengruppen löschen?",
"Do you want to delete these {count} asset groups?": "Möchten Sie diese {count} Asset-Gruppen löschen?",
"Do you want to delete these {count} assets?": "Möchten Sie diese {count} Assets löschen?",
"Do you want to delete these {count} atomic testings?": "Möchten Sie diese {count} atomaren Tests löschen?",
"Do you want to delete these {count} credentials?": "Do you want to delete these {count} credentials?",
Expand All @@ -1204,7 +1204,7 @@
"Do you want to delete this action?": "Möchten Sie diese Aktion löschen?",
"Do you want to delete this arsenal item: ": "Möchten Sie dieses Arsenal-Element löschen: ",
"Do you want to delete this arsenal item?": "Möchten Sie dieses Arsenal-Element löschen?",
"Do you want to delete this asset group?": "Möchten Sie diese Anlagengruppe löschen?",
"Do you want to delete this asset group?": "Möchten Sie diese Asset-Gruppe löschen?",
"Do you want to delete this asset rule?": "Möchten Sie diese Asset-Regel löschen?",
"Do you want to delete this asset?": "Möchten Sie dieses Asset löschen?",
"Do you want to delete this atomic testing:": "Möchten Sie diese atomaren Tests löschen?",
Expand Down Expand Up @@ -1325,7 +1325,7 @@
"Due Date": "Fälligkeitsdatum",
"Duplicate": "Duplizieren",
"Duration": "Dauer",
"Dynamic assets": "Dynamische Vermögenswerte",
"Dynamic assets": "Dynamische Assets",
"e.g. ec2_instance, s3_bucket, lambda_function": "e.g. ec2_instance, s3_bucket, lambda_function",
"e.g. Reach the domain controller and prove domain admin from an initial foothold": "z. B. Den Domänencontroller erreichen und Domänenadministrator von einem ersten Zugangspunkt aus nachweisen",
"e.g. wrong environment — use staging instead": "z. B. falsche Umgebung – verwende stattdessen „Staging“",
Expand Down Expand Up @@ -1769,7 +1769,7 @@
"healthcheck.button.TEAMS.EMPTY": "Hinzufügen eines Teams",
"healthcheck.description.AGENT_OR_EXECUTOR.EMPTY": "Ein aktiver Agent wird für Injects benötigt, bitte aktualisieren Sie ihn",
"healthcheck.description.ASSET_GROUPS.MANDATORY_CONTENT": "Vermögensgruppe",
"healthcheck.description.ASSETS.MANDATORY_CONTENT": "Vermögenswert",
"healthcheck.description.ASSETS.MANDATORY_CONTENT": "Asset",
"healthcheck.description.BODY.MANDATORY_CONTENT": "Körper",
"healthcheck.description.IMAP.SERVICE_UNAVAILABLE": "fehlende IMAP-Dienste, bitte überprüfen Sie Ihre Konfiguration oder Anmeldedaten",
"healthcheck.description.INJECT.NOT_READY": "Injects haben den Status \"fehlender Inhalt\", bitte aktualisieren Sie sie",
Expand Down Expand Up @@ -1820,7 +1820,7 @@
"hours_singular": "Stunde",
"How can {agent} help you, {name}?": "Wie kann {agent} Ihnen helfen, {name}?",
"How can I help you, {name}?": "Wie kann ich Ihnen helfen, {name}?",
"How chokepoints are scored": "So werden Engpässe bewertet",
"How chokepoints are scored": "So werden Chokepoints bewertet",
"How do I configure detection rules?": "Wie konfiguriere ich Erkennungsregeln?",
"How do you want to execute the selected actions?": "Wie möchten Sie die ausgewählten Aktionen ausführen?",
"How each security platform could detect this action (detection rules).": "Wie jede Sicherheitsplattform diese Aktion erkennen könnte (Erkennungsregeln).",
Expand Down Expand Up @@ -2214,7 +2214,7 @@
"Make it shorter": "Kürzer machen",
"Malware sample": "Malware-Probe",
"Manage": "Verwalte",
"Manage assets": "Verwalten von Vermögenswerten",
"Manage assets": "Verwalten von Assets",
"Manage content": "Verwalten von Inhalten",
"manage custom variables": "benutzerdefinierte Variablen verwalten",
"Manage grants": "Verwalten von Zuschüssen",
Expand Down Expand Up @@ -2303,7 +2303,7 @@
"media-pressure": "Druck der Medien",
"Medias": "Medien",
"Medical_device": "Medical Device",
"Medium": "Medium",
"Medium": "Mittel",
"Members": "Mitglieder",
"message": "Nachricht",
"Message": "Nachricht",
Expand Down Expand Up @@ -2334,7 +2334,6 @@
"Mitigations": "Abhilfemaßnahmen",
"MITRE ATT&CK Coverage": "MITRE ATT&CK-Abdeckung",
"MITRE ATT&CK Results": "MITRE ATT&CK-Ergebnisse",
"Mitre Coverage": "Sicherheitsabdeckung",
"Mitre Filter": "Mitre Filter",
"MMMM Do, YYYY - h:mmA": "MMMM Do, JJJJ - h:mmA",
"Mobile_device": "Mobile device",
Expand All @@ -2348,7 +2347,7 @@
"Modified": "Geändert",
"MODIFIED_AFTER_EXECUTION": "Nach der Ausführung geändert",
"MODIFIED_DURING_EXECUTION": "Während der Ausführung geändert",
"Modify asset groups": "Ändern von Anlagengruppen",
"Modify asset groups": "Ändern von Asset-Gruppen",
"Modify asset groups in this inject": "Ändern Sie Asset-Gruppen in dieser Injektion",
"Modify assets": "Ändern von Assets",
"Modify assets in this inject": "Modify assets in this inject",
Expand Down Expand Up @@ -2455,10 +2454,10 @@
"No alerts have been reported by this security platform.": "Von dieser Sicherheitsplattform wurden keine Alarme gemeldet.",
"No arsenal items match your filters": "Keine Arsenal-Elemente entsprechen Ihren Filtern",
"No asset added yet.": "Noch kein Asset hinzugefügt.",
"No asset group": "Keine Anlagengruppe",
"No asset group": "Keine Asset-Gruppe",
"No asset in this asset group.": "No asset in this asset group.",
"No asset selected. Add asset manually by typing IPs, CIDRs or hostnames or select some in the asset list.": "Kein Asset ausgewählt. Fügen Sie manuell Assets hinzu, indem Sie IPs, CIDRs oder Hostnamen eingeben oder einige aus der Asset-Liste auswählen.",
"No asset selected. Add asset manually or select some in the asset list.": "Kein Vermögenswert ausgewählt. Fügen Sie manuell ein Asset hinzu oder wählen Sie eines aus der Asset-Liste.",
"No asset selected. Add asset manually or select some in the asset list.": "Kein Asset ausgewählt. Fügen Sie manuell ein Asset hinzu oder wählen Sie eines aus der Asset-Liste.",
"No assets in the allow list.": "Keine Assets in der Zulässigkeitsliste.",
"No attack path to display": "No attack path to display",
"No attack-path data for this simulation.": "Keine Angriffspfad-Daten für diese Simulation.",
Expand Down Expand Up @@ -3024,7 +3023,7 @@
"Remove": "Entfernen",
"Remove file": "Datei entfernen",
"Remove Filigran logos": "Filigran-Logos entfernen",
"Remove from the asset group": "Aus der Anlagengruppe entfernen",
"Remove from the asset group": "Aus der Asset-Gruppe entfernen",
"Remove from the Asset Rule": "Aus der Asset-Regel entfernen",
"Remove from the context": "Aus dem Kontext entfernen",
"Remove from the element": "Aus dem Element entfernen",
Expand Down Expand Up @@ -3183,7 +3182,7 @@
"Search across OpenAEV": "In OpenAEV suchen",
"Search across the threat arsenal…": "Im Threat Arsenal suchen…",
"Search agents...": "Agenten suchen…",
"Search assets": "Vermögenswerte suchen",
"Search assets": "Assets suchen",
"Search by target name": "Suche nach Zielnamen",
"Search conversations...": "Konversationen suchen…",
"Search deployed integrations": "Bereitgestellte Integrationen durchsuchen",
Expand All @@ -3208,6 +3207,7 @@
"Secrets_key_mgmt": "Secrets / Key management",
"SECURITY": "Sicherheit",
"Security": "Sicherheit",
"Security Coverage": "Sicherheitsabdeckung",
"Security domain": "Sicherheitsdomäne",
"Security Domains": "Sicherheitsdomänen",
"Security gaps": "Sicherheitslücken",
Expand Down Expand Up @@ -3516,7 +3516,7 @@
"target_teams": "Teams",
"target(s)": "target(s)",
"Targeted asset": "Ziel-Asset",
"Targeted assets": "Gezielte Vermögenswerte",
"Targeted assets": "Gezielte Assets",
"Targeted assets property": "Gezieltes Vermögen Eigentum",
"Targeted players": "Gezielte Spieler",
"Targeted property": "Gezielte Eigenschaft",
Expand Down Expand Up @@ -3780,7 +3780,7 @@
"Tool results": "Tool-Ergebnisse",
"Tools": "Werkzeuge",
"Top attack patterns": "Top-Angriffsmuster",
"Top chokepoints": "Top-Engpässe",
"Top chokepoints": "Top-Chokepoints",
"Top simulation categories": "Wichtigste Simulationskategorien",
"total": "total",
"total actions": "Aktionen insgesamt",
Expand Down Expand Up @@ -3896,7 +3896,7 @@
"Update the action :": "Aktion aktualisieren :",
"Update the AI target": "KI-Ziel aktualisieren",
"Update the arsenal item :": "Arsenal-Element aktualisieren :",
"Update the asset group": "Aktualisieren Sie die Anlagengruppe",
"Update the asset group": "Aktualisieren Sie die Asset-Gruppe",
"Update the asset rule": "Aktualisieren Sie die Asset-Regel",
"Update the atomic testing": "Aktualisieren Sie die Atomtests",
"Update the attack pattern": "Aktualisieren Sie das Angriffsmuster",
Expand Down Expand Up @@ -4010,6 +4010,7 @@
"Verify now": "Verify now",
"Version": "Version",
"Version referenced in the integration catalog. The running instance may use a different version if it was manually overridden.": "Im Integrationskatalog referenzierte Version. Die laufende Instanz kann eine andere Version verwenden, wenn sie manuell überschrieben wurde.",
"Very high": "Sehr hoch",
"Very_high": "Very High",
"View": "Ansicht",
"view custom variables": "benutzerdefinierte Variablen anzeigen",
Expand Down Expand Up @@ -4112,7 +4113,7 @@
"Xdr": "XDR",
"XDR": "XDR",
"XLS mappers": "XLS-Mapper",
"XTM Hub": "XTM-Hub",
"XTM Hub": "XTM Hub",
"XTM Hub Connection Unavailable": "XTM Hub Verbindung nicht verfügbar",
"XTM Hub is a central forum to access resources, share tradecraft, and optimize the use of Filigran's products, fostering collaboration and empowering the community.": "Der XTM Hub ist ein zentrales Forum für den Zugriff auf Ressourcen, den Austausch von Fachwissen und die Optimierung der Nutzung von Filigran-Produkten. Er fördert die Zusammenarbeit und stärkt die Gemeinschaft.",
"XTM Hub Library": "XTM Hub Bibliothek",
Expand Down
5 changes: 3 additions & 2 deletions openaev-front/src/utils/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@
"custom_dashboard_name_number": "Number",
"custom_dashboard_name_posture-radar": "Posture Radar",
"custom_dashboard_name_resilience-gauge": "Resilience Gauge",
"custom_dashboard_name_security-coverage": "Mitre Coverage",
"custom_dashboard_name_security-coverage": "Security Coverage",
"custom_dashboard_name_vertical-barchart": "Vertical Bar",
"custom_dashboard_step_parameters": "Parameters",
"custom_dashboard_step_series": "Dimensions",
Expand Down Expand Up @@ -2334,7 +2334,6 @@
"Mitigations": "Mitigations",
"MITRE ATT&CK Coverage": "MITRE ATT&CK Coverage",
"MITRE ATT&CK Results": "MITRE ATT&CK Results",
"Mitre Coverage": "Security Coverage",
"Mitre Filter": "Mitre Filter",
"MMMM Do, YYYY - h:mmA": "MMMM Do, YYYY - h:mmA",
"Mobile_device": "Mobile device",
Expand Down Expand Up @@ -3208,6 +3207,7 @@
"Secrets_key_mgmt": "Secrets / Key management",
"SECURITY": "Security",
"Security": "Security",
"Security Coverage": "Security Coverage",
"Security domain": "Security domain",
"Security Domains": "Security Domains",
"Security gaps": "Security gaps",
Expand Down Expand Up @@ -4010,6 +4010,7 @@
"Verify now": "Verify now",
"Version": "Version",
"Version referenced in the integration catalog. The running instance may use a different version if it was manually overridden.": "Version referenced in the integration catalog. The running instance may use a different version if it was manually overridden.",
"Very high": "Very high",
"Very_high": "Very High",
"View": "View",
"view custom variables": "view custom variables",
Expand Down
Loading
Loading