-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dictionary files can be used to translate some data automatically depending on audit language Angular expression can be directly used in report template
- Loading branch information
Showing
3 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
var CVSS = { | ||
"Attack Vector": "Vecteur d'attaque", | ||
"Attack Complexity": "Complexité d'attaque", | ||
"Privileges Required": "Privilèges requis", | ||
"User Interaction": "Interaction utilisateur", | ||
"Scope": "Portée", | ||
"Confidentiality": "Confidentialité", | ||
"Integrity": "Intégrité", | ||
"Availability": "Disponibilité", | ||
"Network": "Réseau", | ||
"Adjacent Network": "Réseau Local", | ||
"Physical": "Physique", | ||
"Low": "Faible", | ||
"High": "Haut", | ||
"None": "Aucun", | ||
"Required": "Requis", | ||
"Unchanged": "Inchangé", | ||
"Changed": "Changé" | ||
} | ||
|
||
var Categories = { | ||
"No Category": "Non Catégorisé" | ||
} | ||
|
||
module.exports = { | ||
...CVSS, | ||
...Categories | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var gLocale = 'en' | ||
|
||
function setLocale(locale) { | ||
gLocale = locale | ||
} | ||
exports.setLocale = setLocale | ||
|
||
function translate(message, locale = gLocale) { | ||
try { | ||
let dictionary = require(`./${locale}`) | ||
return dictionary[message] || message | ||
} | ||
catch (error) { | ||
return message | ||
} | ||
} | ||
exports.translate = translate |