Skip to content

Commit

Permalink
Merge branch 'develop' into feature/cset-2572
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmostafa committed Feb 13, 2024
2 parents 29ae45f + 3fdd66d commit b02b2c3
Show file tree
Hide file tree
Showing 15 changed files with 300 additions and 382 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
{
"pairs": [
{
"key": "overall",
"value": "Загалом"
},
{
"key": "standards",
"value": "Стандарти"
},
{
"key": "default exec summ",
"value": "[UK]Cyber terrorism is a real and growing threat. Standards and guides have been developed, vetted, and widely accepted to assist with protection from cyber attacks. The Cyber Security Evaluation Tool (CSET) includes a selectable array of these standards for a tailored assessment of cyber vulnerabilities. Once the standards were selected and the resulting question sets answered, the CSET created a compliance summary, compiled variance statistics, ranked top areas of concern, and generated security recommendations."
},
{
"key": "default assessment name",
"value": "Нова оцінка"
}
]
"overall": "Загалом",
"standards": "Стандарти",
"default exec summ": "[UK]Cyber terrorism is a real and growing threat. Standards and guides have been developed, vetted, and widely accepted to assist with protection from cyber attacks. The Cyber Security Evaluation Tool (CSET) includes a selectable array of these standards for a tailored assessment of cyber vulnerabilities. Once the standards were selected and the resulting question sets answered, the CSET created a compliance summary, compiled variance statistics, ranked top areas of concern, and generated security recommendations.",
"default assessment name": "Нова оцінка"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"detect": "Виявляти",
"govern": "Керувати",
"identify": "Ідентифікувати",
"protect": "Захищати",
"recover": "Відновити",
"respond": "Відповісти",
"access control": "Управління доступом",
"analysis": "Аналіз",
"anomalies and events": "Аномалії та події",
"asset management": "Управління активами",
"awareness and training": "Обізнаність і навчання",
"business environment": "Бізнес середовище",
"data security": "Безпека даних",
"detection processes": "Процеси виявлення",
"governance": "Управління",
"improvements": "Покращення",
"information protection processes and procedures": "Процеси та процедури захисту інформації",
"maintenance": "Технічне обслуговування",
"mitigation": "Пом'якшення",
"protective technology": "Захисна техніка",
"recovery communications": "Відновлення комунікацій",
"recovery planning": "Планування відновлення",
"response communications": "Комунікації у відповідь",
"response planning": "Планування реагування",
"risk assessment": "Оцінка ризиків",
"risk management": "Управління ризиками",
"risk management strategy": "Стратегія управління ризиками",
"security continuous monitoring": "Постійний моніторинг безпеки"
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ public AssessmentDetail CreateNewAssessment(int? currentUserId, string workflow,
var lang = _tokenManager.GetCurrentLanguage();
if (lang != "en")
{
var msg = _overlay.GetValue("GENERIC", "default exec summ", lang)?.Value;
var msg = _overlay.GetPropertyValue("GENERIC", "default exec summ", lang);
if (msg != null)
{
defaultExecSumm = msg;
}

msg = _overlay.GetValue("GENERIC", "default assessment name", lang)?.Value;
msg = _overlay.GetPropertyValue("GENERIC", "default assessment name", lang);
if (msg != null)
{
defaultAssessmentName = msg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@
<None Update="App_Data\ACET Spanish Question Mapping.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="App_Data\LanguagePacks\UK\CATEGORIES.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="App_Data\LanguagePacks\UK\DEMOGRAPHICS_ORGANIZATION_TYPE.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -177,6 +174,9 @@
<None Update="App_Data\LanguagePacks\UK\SECTOR_INDUSTRY.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="App_Data\LanguagePacks\UK\STANDARD_CATEGORY.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="App_Data\Spanish ACET Groupings.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1261,16 +1261,16 @@ from r in _context.NEW_REQUIREMENT.Where(x => x.Requirement_Id == rs.Requirement
foreach (NEW_REQUIREMENT rq in reqs)
{
// overlay
var translatedCategory = _overlay.GetCat(rq.Standard_Category, _lang);
var translatedCategory = _overlay.GetPropertyValue("STANDARD_CATEGORY", rq.Standard_Category.ToLower(), _lang);
if (translatedCategory != null)
{
rq.Standard_Category = translatedCategory.Value;
rq.Standard_Category = translatedCategory;
}

var translatedSubcat = _overlay.GetCat(rq.Standard_Sub_Category, _lang);
var translatedSubcat = _overlay.GetPropertyValue("STANDARD_CATEGORY", rq.Standard_Sub_Category.ToLower(), _lang);
if (translatedSubcat != null)
{
rq.Standard_Sub_Category = translatedSubcat.Value;
rq.Standard_Sub_Category = translatedSubcat;
}

Requirement r = new Requirement()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class QuestionInformationTabData

private readonly ITokenManager _tokenManager;

private readonly TranslationOverlay _overlay;


public String RequirementFrameworkTitle { get; set; }
public String RelatedFrameworkCategory { get; set; }
Expand Down Expand Up @@ -104,24 +106,43 @@ public QuestionInformationTabData(CSETWebCore.Interfaces.Common.IHtmlFromXamlCon
_converter = converter;
_context = context;
_tokenManager = token;

_overlay = new TranslationOverlay();
}


/// <summary>
///
/// </summary>
public void BuildQuestionTab(QuestionInfoData infoData, SETS set)
{
ShowRequirementFrameworkTitle = true;
BuildFromNewQuestion(infoData, set);
}


/// <summary>
///
/// </summary>
internal void BuildRelatedQuestionTab(RelatedQuestionInfoData questionInfoData, SETS set)
{
BuildFromNewQuestion(questionInfoData, set);
ShowRelatedFrameworkCategory = true;
ShowRequirementFrameworkTitle = true;
RelatedFrameworkCategory = questionInfoData.Category;

var lang = _tokenManager.GetCurrentLanguage();
var cat = _overlay.GetPropertyValue("STANDARD_CATEGORY", questionInfoData.Category.ToLower(), lang);
if (cat != null)
{
RelatedFrameworkCategory = cat;
}
}


/// <summary>
///
/// </summary>
private NEW_QUESTION BuildFromNewQuestion(BaseQuestionInfoData infoData, SETS set)
{
NEW_QUESTION question = infoData.Question;
Expand Down Expand Up @@ -257,10 +278,20 @@ join q in _context.NEW_QUESTION on rq.Question_Id equals q.Question_Id
}

if (!IsComponent)
{
RequirementFrameworkTitle = requirement.Requirement_Title;
}

RelatedFrameworkCategory = requirement.Standard_Sub_Category;

// translate category
var cat = _overlay.GetPropertyValue("STANDARD_CATEGORY", requirement.Standard_Sub_Category.ToLower(), lang);
if (cat != null)
{
RelatedFrameworkCategory = cat;
}


if (requirementData.SetName == StandardConstants.CNSSI_1253_DB || requirementData.SetName == StandardConstants.CNSSI_ICS_PIT_DB
|| requirementData.SetName == StandardConstants.CNSSI_ICS_V1_DB || requirementData.SetName == StandardConstants.CNSSI_1253_V2_DB)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ public QuestionResponse BuildResponse(List<RequirementPlus> requirements,


// translate the Category
var translatedCategory = overlay.GetCat(dbR.Standard_Category, lang);
var translatedCategory = overlay.GetPropertyValue("STANDARD_CATEGORY", dbR.Standard_Category.ToLower(), lang);
if (translatedCategory != null)
{
dbR.Standard_Category = translatedCategory.Value;
dbR.Standard_Category = translatedCategory;
}


Expand All @@ -172,10 +172,10 @@ public QuestionResponse BuildResponse(List<RequirementPlus> requirements,


// translate the Subcategory using the CATEGORIES translation object
var translatedSubcategory = overlay.GetCat(dbR.Standard_Sub_Category, lang);
var translatedSubcategory = overlay.GetPropertyValue("STANDARD_CATEGORY", dbR.Standard_Sub_Category.ToLower(), lang);
if (translatedSubcategory != null)
{
dbR.Standard_Sub_Category = translatedSubcategory.Value;
dbR.Standard_Sub_Category = translatedSubcategory;
}


Expand Down
Loading

0 comments on commit b02b2c3

Please sign in to comment.