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

Fix: Demo Model Page #903

Closed
wants to merge 7 commits into from
Closed
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
9 changes: 7 additions & 2 deletions td.vue/src/i18n/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ const ara = {
}
},
demo: {
select: 'حدد نموذج تهديد تجريبي من القائمة أدناه'
select: 'حدد نموذج تهديد تجريبي من القائمة أدناه',
"New Threat Model": "نموذج تهديد جديد",
"Demo Threat Model": "نموذج تهديد تجريبي",
"Version 2 New Model": "الإصدار ٢ نموذج جديد",
"Version 2 Demo Model": "الإصدار ٢ نموذج تجريبي"

},
desktop: {
file: {
Expand Down Expand Up @@ -376,4 +381,4 @@ const ara = {
}
};

export default ara;
export default ara;
10 changes: 7 additions & 3 deletions td.vue/src/i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const deu = {
}
},
demo: {
select: 'Wählen Sie ein Beispiel Bedrohungsmodell aus der folgenden Liste'
select: 'Wählen Sie ein Beispiel Bedrohungsmodell aus der folgenden Liste',
"New Threat Model": "Neues Bedrohungsmodell",
"Demo Threat Model": "Demo-Bedrohungsmodell",
"Version 2 New Model": "Version 2 Neues Modell",
"Version 2 Demo Model": "Version 2 Demo-Modell"
},
desktop: {
file: {
Expand All @@ -73,7 +77,7 @@ const deu = {
},
repository: {
select: 'Wählen Sie ein',
from: 'Repository aus folgender Liste', //in line with Github wording https://docs.github.com/de/repositories
from: 'Repository aus folgender Liste', //in line with Github wording https://docs.github.com/de/repositories
noneFound: 'Kein Repository gefunden. Legen Sie zum Starten eine neues Repository an.'
},
branch: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const deu = {
}
};

export default deu;
export default deu;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/el.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const ell = {
}
},
demo: {
select: 'Επιλέξτε ένα δείγμα μοντέλου απειλών από την παρακάτω λίστα'
select: 'Επιλέξτε ένα δείγμα μοντέλου απειλών από την παρακάτω λίστα',
"New Threat Model": "Νέο μοντέλο απειλής",
"Demo Threat Model": "Δοκιμαστικό μοντέλο απειλής",
"Version 2 New Model": "Έκδοση 2 Νέο μοντέλο",
"Version 2 Demo Model": "Έκδοση 2 Δοκιμαστικό μοντέλο"
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const ell = {
}
};

export default ell;
export default ell;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const eng = {
}
},
demo: {
select: 'Select a demo threat model from the list below'
select: 'Select a demo threat model from the list below',
"New Threat Model": "New Threat Model",
"Demo Threat Model": "Demo Threat Model",
"Version 2 New Model": "Version 2 New Model",
"Version 2 Demo Model": "Version 2 Demo Model"
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const eng = {
}
};

export default eng;
export default eng;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const spa = {
}
},
demo: {
select: 'Seleccione un ejemplo de modelo de amenazas (threat model) de la lista a continuación'
select: 'Seleccione un ejemplo de modelo de amenazas (threat model) de la lista a continuación',
"New Threat Model": "Nuevo modelo de amenaza",
"Demo Threat Model": "Modelo de amenaza de demostración",
"Version 2 New Model": "Versión 2 Nuevo modelo",
"Version 2 Demo Model": "Versión 2 Modelo de demostración"
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const spa = {
}
};

export default spa;
export default spa;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const fin = {
}
},
demo: {
select: 'Valitse uhkamalli alla olevista'
select: 'Valitse uhkamalli alla olevista',
"New Threat Model": "Uusi uhkamalli",
"Demo Threat Model": "Demouhkamalli",
"Version 2 New Model": "Versio 2 Uusi malli",
"Version 2 Demo Model": "Versio 2 Demomalli"
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const fin = {
}
};

export default fin;
export default fin;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const fra = {
}
},
demo: {
select: 'Sélectionnez une démo de modèle de menace dans la liste ci-dessous'
select: 'Sélectionnez une démo de modèle de menace dans la liste ci-dessous',
"New Threat Model": "Nouveau modèle de menace",
"Demo Threat Model": "Modèle de menace de démonstration",
"Version 2 New Model": "Version 2 Nouveau modèle",
"Version 2 Demo Model": "Version 2 Modèle de démonstration"
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const fra = {
}
};

export default fra;
export default fra;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/hi.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const hin = {
}
},
demo: {
select: 'नीचे दी गई सूची से एक डेमो थ्रेट मॉडल चुनें'
select: 'नीचे दी गई सूची से एक डेमो थ्रेट मॉडल चुनें',
'New Threat Model': 'नया थ्रेट मॉडल',
'Demo Threat Model': 'डेमो थ्रेट मॉडल',
'Version 2 New Model': 'संस्करण 2 नया मॉडल',
'Version 2 Demo Model': 'संस्करण 2 डेमो मॉडल'
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const hin = {
}
};

export default hin;
export default hin;
34 changes: 19 additions & 15 deletions td.vue/src/i18n/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const por = {
}
},
demo: {
select: 'Select a demo threat model from the list below'
select: "Selecione um modelo de ameaça de demonstração da lista abaixo.",
"New Threat Model": "Novo modelo de ameaça",
"Demo Threat Model": "Modelo de ameaça de demonstração",
"Version 2 New Model": "Versão 2 Novo modelo",
"Version 2 Demo Model": "Versão 2 Modelo de demonstração"
},
desktop: {
file: {
Expand Down Expand Up @@ -302,10 +306,10 @@ const por = {
},
generic: {
dafault: 'Nova ameaça genérica',
cia : 'Nova ameaça da CIA',
die : 'Nova ameaça da DIE',
linddun : 'Nova ameaça LINDDUN',
plot4ai : 'Nova ameaça PLOT4ai',
cia: 'Nova ameaça da CIA',
die: 'Nova ameaça da DIE',
linddun: 'Nova ameaça LINDDUN',
plot4ai: 'Nova ameaça PLOT4ai',
stride: 'Nova ameaça STRIDE'
},
edit: 'Edit Threat',
Expand Down Expand Up @@ -348,18 +352,18 @@ const por = {
showBranding: 'Threat Dragon logo'
},
title: 'Relatório do modelo de ameaças para',
dateGenerated : 'Data Gerada',
executiveSummary : 'Resumo Executivo',
notProvided : 'Não fornecido',
dateGenerated: 'Data Gerada',
executiveSummary: 'Resumo Executivo',
notProvided: 'Não fornecido',
summary: 'Resumo',
threatStats : {
threatStats: {
total: 'Ameaças totais',
mitigated: 'Total Mitigado',
notMitigated : 'Não atenuado',
openHigh : 'Abrir / Alta Prioridade',
openMedium : 'Abrir / Prioridade Média',
openLow : 'Abrir / Baixa Prioridade',
openUnknown : 'Prioridade Aberta / Desconhecida'
notMitigated: 'Não atenuado',
openHigh: 'Abrir / Alta Prioridade',
openMedium: 'Abrir / Prioridade Média',
openLow: 'Abrir / Baixa Prioridade',
openUnknown: 'Prioridade Aberta / Desconhecida'
}
},
upgrade: {
Expand All @@ -374,4 +378,4 @@ const por = {
}
};

export default por;
export default por;
8 changes: 6 additions & 2 deletions td.vue/src/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const zho = {
}
},
demo: {
select: '从下面的列表中选择一个演示威胁模型'
select: '从下面的列表中选择一个演示威胁模型',
"New Threat Model": "新威胁模型",
"Demo Threat Model": "演示威胁模型",
"Version 2 New Model": "第二版新模型",
"Version 2 Demo Model": "第二版演示模型"
},
desktop: {
file: {
Expand Down Expand Up @@ -374,4 +378,4 @@ const zho = {
}
};

export default zho;
export default zho;
2 changes: 1 addition & 1 deletion td.vue/src/views/demo/SelectDemoModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
href="javascript:void(0)"
@click="onModelClick(model)"
:data-model-name="model.name"
>{{ model.name }}</b-list-group-item>
>{{ $t(`demo.${ model.name }`) }}</b-list-group-item>
</b-list-group>
</b-col>
</b-row>
Expand Down
14 changes: 6 additions & 8 deletions td.vue/tests/unit/views/demo/selectDemoModel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ describe('views/demo/SelectDemoModel.vue', () => {
it('displays the demo threat model', () => {
expect(
wrapper.findAllComponents(BListGroupItem)
.filter(x => x.text() === 'Demo Threat Model')
.at(0)
.exists()
.filter(x => x.text() === 'Demo Threat Model')
.at(0)
.exists()
).toEqual(true);
});

it('clears the threatmodels', () => {
expect(mockStore.dispatch).toHaveBeenCalledWith('THREATMODEL_CLEAR');
});
Expand All @@ -61,7 +61,7 @@ describe('views/demo/SelectDemoModel.vue', () => {
describe('selecting a demo model', () => {
let demoModelItem;

beforeEach(async () => {
beforeEach(async() => {
demoModelItem = await wrapper.findAllComponents(BListGroupItem)
.filter(x => x.text() === 'Demo Threat Model')
.at(0);
Expand All @@ -73,9 +73,7 @@ describe('views/demo/SelectDemoModel.vue', () => {
});

it('navigates to the threat model page', () => {
expect(mockRouter.push).toHaveBeenCalledWith(
{ name: 'localThreatModel', params: { threatmodel: 'Demo Threat Model' }}
);
expect(mockRouter.push).toHaveBeenCalledWith({ name: 'localThreatModel', params: { threatmodel: 'Demo Threat Model' } });
});
});
});